Codeforces Round #453 (Div. 2) A
来源:互联网 发布:js valueof 比较大小 编辑:程序博客网 时间:2024/06/05 01:01
暴力涂色
考虑边界
#include<iostream>#include<algorithm>#include<iomanip>#include<cstdio>#include<cstdlib>#include<cstring>#include<string>#include<cmath>#include<set>#include<queue>#include<stack>#include<map>#define PI acos(-1.0)#define in freopen("in.txt", "r", stdin)#define out freopen("out.txt", "w", stdout)#define kuaidian ios::sync_with_stdio(0);using namespace std;typedef long long ll;typedef unsigned long long ull;const int maxn = 1e4 + 7, maxd = 1e8;const ll mod = 1e9 + 7;const int INF = 0x7f7f7f7f;int n, m, b, bb;int a[maxn] = {0};int main() { kuaidian; cin >> n >> m; for(int i = 0; i < n; ++i) { cin >> b >> bb; for(int i = b; i < bb; ++i) a[i] = 1; } for(int i = 0; i < m; ++i) { if(a[i] == 0) { cout << "NO" << endl; return 0; } } cout << "YES" << endl; return 0;}
阅读全文
1 0
- Codeforces Round #453 (Div. 2) A-C
- Codeforces Round #453 (Div. 2) A,B
- Codeforces Round #453 (Div. 2) A
- Codeforces Round #453 (Div. 2)(A-E题解)
- Codeforces Round #453 (Div. 2) B. Coloring a Tree
- Codeforces Round #453 (Div. 2)A,B,C
- Codeforces Round #131 (Div. 2) A B
- Codeforces Round #174 (Div. 2) Problem A
- Codeforces Round #173 (Div. 2) A.Bit++
- Codeforces Round #181 (Div. 2) A题
- Codeforces Round #184 (Div. 2) A题
- Codeforces Round #185 (Div. 2)--A,B
- Codeforces Round #172 (Div. 2) A题
- Codeforces Round #166 (Div. 2) A题
- Codeforces Round #132 (Div. 2) A题
- Codeforces Round #131 (Div. 2) A题
- Codeforces Round #133 (Div. 2) A题
- Codeforces Round #137 (Div. 2) A题
- Android中的visibility属性
- spring--自定义ReturnValueHandler
- C语言:可变参数宏以及##和#符的使用
- win32开发(绘制bitmap)
- Alpha-beta剪枝-井字棋
- Codeforces Round #453 (Div. 2) A
- java多线程[9]:线程池(ExecutorService)
- 汇编语言的执行过程
- 离合器预减振超载造成变速箱怠速异响matlab仿真分析
- 【Laravel】数据库事务
- random模块有关
- 坚持#第247天~sed和awk进阶
- 【ASM】Oracleasm命令
- hdu1007 Quoit Design 【计算几何+分治】