結果
| 問題 | No.870 無敵囲い |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-11-19 21:10:57 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 594 bytes |
| 記録 | |
| コンパイル時間 | 93 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 10,880 KB |
| 最終ジャッジ日時 | 2024-06-29 06:46:10 |
| 合計ジャッジ時間 | 1,432 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 WA * 1 |
| other | AC * 12 WA * 6 |
ソースコード
def isContain(goal,s):
ans = 'YES'
for v in goal:
if v not in s:
ans = 'NO'
return ans
n = int(input())
xy1 = []
xy2 = []
goal = [[2, 8], [3, 9], [7, 9]]
for i in range(n):
xi1, yi1, xi2, yi2 = map(int, input().split())
xy1.append([xi1, yi1])
xy2.append([xi2, yi2])
ans = 'NO'
s = [xy1[i] for i in range(n)]
s.sort()
ans = isContain(goal, s)
if ans == 'YES':
print(ans)
else:
for i in range(n):
s[s.index(xy1[i])] = xy2[i]
s.sort()
ans = isContain(goal, s)
if ans == 'YES':
break
print(ans)