POJ 2894
#include<iostream>
#define MAXN 1005
using namespace std; int a[MAXN]; int main()
{
//freopen("acm.acm","r",stdin);
int test;
int num;
char c;
int i;
int j;
int x;
int max;
int y;
cin>>test;
while(test --)
{
memset(a,,sizeof(a));
cin>>num;
max = -;
for(i = ; i < num; ++ i)
{
cin>>c;
cin>>x>>y;
if(x > max)
max = x;
if(y > max)
max = y;
for(j = x; j < y; ++ j)
{
++ a[j];
}
}
for(i = ; i < max; ++ i)
{
if(a[i] == )
continue;
else
cout<<char(a[i]-+);
}
cout<<endl;
}
}
POJ 2894的更多相关文章
- 【转载】图论 500题——主要为hdu/poj/zoj
转自——http://blog.csdn.net/qwe20060514/article/details/8112550 =============================以下是最小生成树+并 ...
- POJ 3370. Halloween treats 抽屉原理 / 鸽巢原理
Halloween treats Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 7644 Accepted: 2798 ...
- POJ 2356. Find a multiple 抽屉原理 / 鸽巢原理
Find a multiple Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 7192 Accepted: 3138 ...
- POJ 2965. The Pilots Brothers' refrigerator 枚举or爆搜or分治
The Pilots Brothers' refrigerator Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 22286 ...
- POJ 1753. Flip Game 枚举or爆搜+位压缩,或者高斯消元法
Flip Game Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 37427 Accepted: 16288 Descr ...
- POJ 3254. Corn Fields 状态压缩DP (入门级)
Corn Fields Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 9806 Accepted: 5185 Descr ...
- POJ 2739. Sum of Consecutive Prime Numbers
Sum of Consecutive Prime Numbers Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 20050 ...
- POJ 2255. Tree Recovery
Tree Recovery Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 11939 Accepted: 7493 De ...
- POJ 2752 Seek the Name, Seek the Fame [kmp]
Seek the Name, Seek the Fame Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 17898 Ac ...
随机推荐
- 02 Django配置信息
2-1 基本配置信息 import os # 项目路径 BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) # ...
- 安装docker跨主机网络flannel
一.实验环境 机器 操作系统 安装服务 172.16.4.36 centos7 docker etcd flannel 172.16.4.37 centos7 docker etcd flanne ( ...
- c#编程模仿的1stopt界面
* Levenberg-Marquardt法 (LM)+ 通用全局优化算法(Universal Global Optimization - UGO) * Quasi-Newton法 (BFGS)+ 通 ...
- 通过request获取网页资讯 通过BeautifulSoup剖析网页元素
import requests newsUrl ='http://news.sina.com.cn/china/' res = requests.get(newsUrl) res.encoding ...
- JAVA所属公司与非盈利组织
版权 现在是Oracle公司的 Apache 负责Java发展的,重要的非盈利组织,主要产品包括Struts.Tomcat
- MVC框架-.net-摘
MVC模式(三层架构模式)(Model-View-Controller)是软件工程中的一种软件架构模式,把软件系统分为三个基本部分:模型(Model).视图(View)和控制器(Controller) ...
- Java理论学时第六节。课后作业。
package Fuction; class Grandparent { public Grandparent() { System.out.println("GrandParent Cre ...
- Android 响应menu,back键,点击外部消失
点击外部消失,只需要设置popupWindow.setBackgroundDrawable(new PaintDrawable()); 设置 popupWindow.setFocusable(true ...
- java中逗号分隔的字符串和List相互转换
1.将逗号分隔的字符串转换为List String str = "a,b,c"; List<String> result = Arrays.asList(str.spl ...
- CSS 基础 例子 display属性:block、inline和inline-block的区别
HTML中块级元素(block)和行级元素(inline):比如div就是常见的块级元素,span就是常见的行级元素. 可以通过css的display属性来设置一个元素到底是块级,还是行级元素:dis ...