Moving Tables
2016-03-22 21:33
274 查看
Moving Tables
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 12304 Accepted Submission(s): 4226
[align=left]Problem Description[/align]
The famous ACM (Advanced Computer Maker) Company has rented a floor of a building whose shape is in the following figure.
#include<stdio.h> #include<string.h> int main() { int count[205]; int end,begin; int T,n; int temp,i; int max; scanf("%d",&T); while(T--) { memset(count,0,sizeof(count)); scanf("%d",&n); while(n--) { scanf("%d %d",&begin,&end); if(begin>end) {temp=begin;begin=end;end=temp;} for(i=(begin+1)/2;i<=(end+1)/2;i++) { count[i]++; } } max=0; for(i=1;i<=202;i++) { if(max<count[i]){max=count[i];} } printf("%d\n",10*max); } }
View Code
相关文章推荐
- 特殊的HttpApplication事件处理
- Better History(历史记录)
- Problem-1017
- 【HDU3466】Proud Merchants(01背包)
- Java初学者需掌握的30个基本概念
- Simpsons’ Hidden Talents (HDU_2594) KMP
- Java并发编程:volatile关键字解析
- 世界是数字的阅读笔记
- BZOJ3589: 动态树
- leetcode——290——Word Pattern
- B - Biorhythms——(中国剩余定理)
- FOJ FZU 2197 最小花费【贪心】
- 典型递归问题--爬楼梯
- 表格组件列属性formatter和styler使用方法
- struts自定义类型转换器,局部和全局
- crm服务调用测试
- parseSdkContent failed Could not initialize class android.graphics
- OSI七层模型的每一层都有哪些协议
- Tomcat7 starts too late on Ubuntu 14.04 x64 [Digitalocean]
- mysql 转发自 WhyWin