結果
| 問題 |
No.274 The Wall
|
| コンテスト | |
| ユーザー |
kosakkun
|
| 提出日時 | 2016-11-29 18:01:08 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 1,116 bytes |
| コンパイル時間 | 683 ms |
| コンパイル使用メモリ | 90,772 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-11-27 13:35:45 |
| 合計ジャッジ時間 | 3,725 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 6 WA * 1 RE * 15 |
ソースコード
#include <iostream>
#include <string>
#include <vector>
#include <queue>
#include <stack>
#include <map>
#include <algorithm>
#include <sstream>
#include <cmath>
#include <set>
#include <iomanip>
#include <deque>
#include <stdio.h>
using namespace std;
#define REP(i,n) for(int (i)=0;(i)<(int)(n);(i)++)
#define RREP(i,n) for(int (i)=(int)(n)-1;i>=0;i--)
#define iREP(i,Itr) for(auto (i)=(Itr).begin();(i)!=(Itr).end();(i)++)
#define REMOVE(Itr,n) (Itr).erase(remove((Itr).begin(),(Itr).end(),n),(Itr).end())
#define UNIQUE(Itr) sort((Itr).begin(),(Itr).end()); (Itr).erase(unique((Itr).begin(),(Itr).end()),(Itr).end())
#define LBOUND(Itr,val) lower_bound((Itr).begin(),(Itr).end(),(val))
#define UBOUND(Itr,val) upper_bound((Itr).begin(),(Itr).end(),(val))
typedef long long ll;
int imos[2010];
int main(){
int N,M; cin>>N>>M;
REP(i,N){
int L,R; cin>>L>>R;
imos[L]++; imos[R+1]--;
}
REP(i,2009)imos[i+1]=imos[i+1]+imos[i];
REP(i,M/2)if(imos[i]+imos[M-1-i]>2){
cout<<"NO"<<endl;
return 0;
}
cout<<"YES"<<endl;
return 0;
}
kosakkun