2017年西南民族大学程序设计竞赛-网络同步赛(代码)
2017-12-30 21:57
399 查看
20598954 nmphy D 答案正确 8 512 486 C++ 2017-12-30 14:30:35 20598712 nmphy E 答案正确 3 504 695 C++ 2017-12-30 14:25:59 20598181 nmphy E 答案正确 3 484 659 C++ 2017-12-30 14:15:16 20597638 nmphy E 答案正确 3 504 505 C++ 2017-12-30 14:05:08//比赛时候这里显示的是WA,而且显示准确率5% 20597208 nmphy F 答案正确 3 272 569 C++ 2017-12-30 13:57:09 20596793 nmphy H 答案正确 3 384 312 C++ 2017-12-30 13:49:00 20596485 nmphy J 答案正确 15 512 493 C++ 2017-12-30 13:43:23 20596125 nmphy G 答案正确 4 396 768 C++ 2017-12-30 13:36:12 20596077 nmphy G 答案正确 3 384 768 C++ 2017-12-30 13:35:22 20595884 nmphy G 答案错误 4 384 840 C++ 2017-12-30 13:31:43 20595709 nmphy G 答案错误 4 384 825 C++ 2017-12-30 13:28:29 20595099 nmphy I 答案正确 4 384 386 C++ 2017-12-30 13:16:36 20594924 nmphy K 答案正确 4 436 555 C++ 2017-12-30 13:13:09 20594652 nmphy D 段错误 3 384 485 C++ 2017-12-30 13:07:57 20594225 nmphy C 答案正确 71 3904 560 C++ 2017-12-30 12:59:14 20594201 nmphy C 答案正确 69 4028 560 C++ 2017-12-30 12:58:48 20593760 nmphy B 答案正确 3 512 553 C++ 2017-12-30 12:49:38 20593541 nmphy A 答案正确 516 13056 988 C++ 2017-12-30 12:44:16
反正就是12.30左右知道他们有比赛,赶紧注册的。。14.30AK,(其中还有E题耽误的不少时间)排名第7。。。可见其题难道。。。难道我是难题渣。。。水题王。。。打表。。。贪心。。。
E题比赛时错了很多次,后来刷新后就A了。。。可能数据有点极端。(耽误了我20分钟。比完才告诉我A了,我以为10题挂机,结果AK了)。
A:
#include<cstdio> #include<cstdlib> #include<cstring> #include<iostream> #include<algorithm> #include<string> #define ll long long using namespace std; const int maxn=10010; ll sum[maxn],Max; int main() { int n,m,i,j,L,R; while(~scanf("%d%d",&n,&m)){ Max=0;for(i=1;i<=5000;i++) sum[i]=0; for(i=1;i<=n;i++) { scanf("%d%d",&L,&R); sum[L]++; sum[R+1]--; } for(i=1;i<=5000;i++) { sum[i]+=sum[i-1]; if(sum[i]>Max) Max=sum[i]; } if(Max%m==0) printf("%lld\n",Max/m); else printf("%lld\n",Max/m+1); } return 0; }
View Code
相关文章推荐
- 2017年西南民族大学程序设计竞赛-网络同步赛-(A~K)
- 2017年西南民族大学程序设计竞赛-网络同步赛
- 【2017年西南民族大学程序设计竞赛-网络同步赛】A C D E I J
- 2017年西南民族大学程序设计竞赛-网络同步赛 C 装进肚子【贪心】
- 2017年西南民族大学程序设计竞赛-网络同步赛
- 2017年西南民族大学程序设计竞赛-网络同步赛
- 2017年西南民族大学程序设计竞赛-网络同步赛 E 开心的涂刷【排列 + 快速幂】
- 2017年西南民族大学程序设计竞赛-网络同步赛-C:装进肚子(思维)
- 2017年西南民族大学程序设计竞赛-网络同步赛 A 星图【思维维护】
- 2017年西南民族大学程序设计竞赛-网络同步赛
- 2017年西南民族大学程序设计竞赛-网络同步赛
- 2017年中国大学生程序设计竞赛网络赛杭电OJ---1003 Friend-Graph
- 2017年浙江工业大学大学生程序设计迎新赛决赛—网络同步赛 D-序列【莫队算法】
- 2017年浙江工业大学大学生程序设计迎新赛决赛—网络同步赛 I 栗酱和仙剑【模拟】
- 杭州电子科技大学程序设计竞赛(2016’12)- 网络同步赛 1004
- 2017年西南民族大学程序设计竞赛
- 第十一届北京师范大学程序设计竞赛(网络同步赛)+沙漠之旅
- 北航程序设计竞赛决赛网络同步赛 A 浪哥的烦恼 dp or 母函数
- 2017年浙江工业大学大学生程序设计迎新赛决赛—网络同步赛
- 2017年浙江工业大学大学生程序设计迎新赛决赛—网络同步赛 J 栗酱和火柴【water】