题目51
来源:互联网 发布:rrt算法 编辑:程序博客网 时间:2024/05/01 18:20
#include<stdio.h>#include<math.h>#include<stdlib.h>#include<string.h>int c[10005];int main(){int m;int x,y, i,q;int a,b;scanf("%d", &m);getchar();while(m--){q=0;memset(c, 0, sizeof(int)*10005);scanf("%d%d", &x,&y);getchar();while(y--){scanf("%d%d", &a,&b);getchar();for(;a<=b;a++){if(c[a] == 0)c[a] = 1;}}for(i=0;i<=x;i++){if(c[i] == 0)q++;}printf("%d\n", q);}return 0;}
0 0
- 题目51
- 题目51:素数
- 51-题目1163:素数
- 题目
- 题目
- 题目
- 题目
- 题目
- 题目
- 题目
- 题目
- 题目
- 题目
- 题目
- 题目
- 题目
- 题目
- 题目
- BZOJ3427: Poi2013 Bytecomputer
- Hdu-5289 Assignment (二分+RMQ || 单调队列)
- 题目50
- min与windef.h
- 极猫流量邀请码 10183831
- 题目51
- oracle使用exp与imp对数据迁移备份的方法
- java实现关机、重启、打开运用程序及网站
- Html5 中的 WebSocket通信
- AFNetworking 报错 JSON text did not start with array or object and option to allow fragments not set
- 第9周项目2- 我的数组类
- 仿悟空遥控器控制页面
- 最大公约数
- 一个奇怪的Exception