結果
問題 | No.274 The Wall |
ユーザー |
![]() |
提出日時 | 2022-09-13 02:40:48 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 77 ms / 2,000 ms |
コード長 | 323 bytes |
コンパイル時間 | 265 ms |
コンパイル使用メモリ | 82,080 KB |
実行使用メモリ | 71,712 KB |
最終ジャッジ日時 | 2024-11-30 05:07:29 |
合計ジャッジ時間 | 2,861 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 22 |
ソースコード
N,M=map(int,input().split())A=[0]*Mfor i in range(N):l,r=map(int,input().split())for j in range(l,r+1):A[min(j,M-1-j)]+=1if M%2==0:if max(A)<=2:print("YES")else:print("NO")else:if max(A)<=2 and A[M//2]<=1:print("YES")else:print("NO")