题目不难。。。但坑得是数据大小。。N 的大小越大越好。。。

#include <bits/stdc++.h>
#include <cstdio>
#include <cmath>
#define rep(i, a, b) for(int i = a; i <= b; i++)
#define min(a, b) ((a) < (b) ? (a) : (b))
#define max(a, b) ((a) > (b) ? (a) : (b))
int gcd(int a, int b){return b == 0 ? a : gcd(a%b, a);}
const int N = 10011;
int main()
{
int L, M, a, b, c[N];
scanf("%d %d", &L, &M);
rep(i, 0, L) c[i] = 1;
while(M--)
{
scanf("%d %d", &a, &b);
rep(i, a, b) c[i] = 0;
}
c[10010] = 0;
rep(i, 0, L) c[10010] += c[i];
printf("%d\n", c[10010]);
return 0;
}

  

最新文章

  1. jquery.min.map 404 (Not Found)出错的原因及解决办法
  2. javascript事件监听与事件委托
  3. Gym 100851K
  4. Golang tips ----- 函数
  5. 【转】pageX、clientX、screenX、offsetX、layerX、x
  6. easyVS
  7. asp动态生成google的sitemap地图的代码
  8. 《RESTful Web Services》第一章 使用统一接口
  9. VM虚拟机上 实现CentOS 6.X下部署LVS(NAT)+keepalived实现高性能高可用负载均衡
  10. BZOJ 2661 连连看
  11. python2与python3
  12. EF OrderBy(string propertyname), OrderByDescending(string propertyname) 按属性排序,扩展方法
  13. java 使用对象
  14. About the diffrence of wait timed_wait and block in java
  15. 蓝桥杯-算法训练--ALGO-8 操作格子
  16. js的call和apply拾遗
  17. BZOJ4870: [Shoi2017]组合数问题
  18. URL中包含url参数,(文件路径作为参数)
  19. 【1】JDK8 HashMap扩容优化
  20. pronaunciation

热门文章

  1. 空指针和NULL
  2. js面向对象的程序设计 --- 中篇(创建对象) 之 工厂模式和 构造函数模式
  3. sql server和eclipse连接代码
  4. OpenCV之XML和YAML文件读写
  5. DVWA全级别之Insecure CAPTCHA(不安全的验证码)
  6. Codeforces Round #619 (Div. 2)D(模拟)
  7. AC3 IMDCT
  8. [AGC027E]ABBreviate
  9. js的一些基础
  10. 【代码总结】Spring MVC数据校验