結果
| 問題 | No.274 The Wall |
| コンテスト | |
| ユーザー |
eitaho
|
| 提出日時 | 2015-08-30 20:02:44 |
| 言語 | Python3 (3.15.0 + numpy 2.5.4 + scipy 1.18.1 + ACL) |
| 結果 |
WA
不安定
|
| 実行時間 | - |
| コード長 | 355 bytes |
| 記録 | |
| コンパイル時間 | 73 ms |
| コンパイル使用メモリ | 15,104 KB |
| 実行使用メモリ | 11,776 KB |
| 最終ジャッジ日時 | 2026-10-13 08:46:40 |
| 合計ジャッジ時間 | 2,563 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 12 WA * 8 |
ソースコード
N, W = map(int, input().split())
segments = []
for i in range(N):
L, R = map(int, input().split())
segments.append([R, L, i])
segments.append([W - 1 - L, W - 1 - R, i])
segments.sort()
x = -1
used = [0] * N
for R, L, i in segments:
if not used[i] and L > x:
used[i] = 1
x = R
print("YES" if used.count(0) == 0 else "NO")
eitaho