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 ...
随机推荐
- 【终极答案】搭建selenium3.11 +Firefox+python3.6自动化UI测试环境踩的坑
1 运行之后,出现如下报错 Selenium.common.exceptions.WebDriverException: Message: 'geckodriver' executable needs ...
- nginx自动启动脚本
#!/bin/bash#nginx - this script starts and stops the nginx daemin # # chkconfig: - 85 15 # descripti ...
- oracle学习笔记一:用户管理(2)创建删除用户
本文主要介绍如何创建和删除用户,当然里面牵涉很多知识,慢慢道来. 1,创建用户 需求:假设你是oracle管理员,当一个同事入职,你需要分配给一个账号. 创建用户,一般需要有相应权限的用户才可以创建用 ...
- vmware虚拟机centOs安装教程
1安装vmware 虚拟机软件 1.解压vmware安装 汉化vmware虚拟机 复制注册码,并填写进vmware 2安装linux(centos)虚拟机 1. 点击文件----->新建虚拟机 ...
- matlab中的结构体
今天用imfinfo函数 >> K = imfinfo(‘colorbar_copy1.jpg’) K = 包含以下字段的 struct: Filename: 'E:\matlab\col ...
- 好文推荐系列--------(2)GruntJS——重复乏味的工作总会有人做(反正我不做)
GruntJS 是基于JavaScript的命令行构建工具,它可以帮助开发者们自动化重复性的工作.你可以把它看成是JavaScript下的Make或者Ant.它可以完成诸如精简.编译.单元测试.lin ...
- VMware Workstation “以独占方式锁定此配置文件失败。可能其它正在运行VMware进程在使用此配置文件”
VMware Workstation客户机异常关闭之后,再启动时提示“以独占方式锁定此配置文件失败...”. 解决方法: 进入客户机的安装目录(注意,非VMware的安装目录),删除所有后缀为lck的 ...
- npp 文本编辑器 开源
下载地址 https://notepad-plus-plus.org/download/v6.8.4.html
- bzoj4873(最大权闭合子图)
今天学了最大权闭合子图..然后找了这道题,发现完全不会..... 看了题解发现这种有诸如选了一个就一定要选另外的一些的限制又要求最优值的题有的可以转化成最大权闭合子图, 这个题我们首先想到不会选相交的 ...
- 21069207《Linux内核原理与分析》第四周作业
本周首先我结合mooc网的视频资料,了解了计算机的三大法宝,分别是存储程序计算机,函数调用堆栈和中断机制. 在计算机的三大法宝中,存储程序计算机是根本,函数调用堆栈是高级语言运行的基础,而中断机制成就 ...