結果

問題 No.274 The Wall
ユーザー pluto77pluto77
提出日時 2018-02-11 10:27:20
言語 PyPy2
(7.3.13)
結果
AC  
実行時間 108 ms / 2,000 ms
コード長 216 bytes
コンパイル時間 1,025 ms
コンパイル使用メモリ 77,888 KB
実行使用メモリ 80,012 KB
最終ジャッジ日時 2023-09-04 02:28:53
合計ジャッジ時間 4,203 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 73 ms
76,408 KB
testcase_01 AC 84 ms
78,732 KB
testcase_02 AC 79 ms
78,888 KB
testcase_03 AC 93 ms
79,344 KB
testcase_04 AC 74 ms
76,228 KB
testcase_05 AC 75 ms
76,340 KB
testcase_06 AC 72 ms
76,524 KB
testcase_07 AC 74 ms
76,520 KB
testcase_08 AC 74 ms
76,528 KB
testcase_09 AC 74 ms
76,536 KB
testcase_10 AC 81 ms
78,748 KB
testcase_11 AC 106 ms
79,740 KB
testcase_12 AC 99 ms
79,576 KB
testcase_13 AC 80 ms
78,496 KB
testcase_14 AC 95 ms
79,680 KB
testcase_15 AC 93 ms
79,800 KB
testcase_16 AC 108 ms
80,012 KB
testcase_17 AC 106 ms
79,864 KB
testcase_18 AC 103 ms
79,708 KB
testcase_19 AC 103 ms
79,812 KB
testcase_20 AC 96 ms
79,832 KB
testcase_21 AC 96 ms
79,944 KB
testcase_22 AC 97 ms
80,000 KB
testcase_23 AC 96 ms
79,720 KB
testcase_24 AC 103 ms
79,528 KB
testcase_25 AC 96 ms
79,720 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#yuki274

n,m=map(int,raw_input().split())
a=[0 for i in xrange(m)]
for i in xrange(n):
 l,r=map(int,raw_input().split())
 for j in xrange(l,r+1):
  a[j]+=1
  a[m-j-1]+=1
if max(a)<=2:
 print 'YES'
else:
 print 'NO'
0