結果
| 問題 | No.3598 Queen vs. King |
| コンテスト | |
| ユーザー |
nikoro256
|
| 提出日時 | 2026-07-24 22:31:48 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 204 ms / 2,000 ms |
| + 2µs | |
| コード長 | 1,038 bytes |
| 記録 | |
| コンパイル時間 | 251 ms |
| コンパイル使用メモリ | 96,104 KB |
| 実行使用メモリ | 84,736 KB |
| 平均クエリ数 | 2195.83 |
| 最終ジャッジ日時 | 2026-07-24 22:31:52 |
| 合計ジャッジ時間 | 3,204 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 10 |
ソースコード
T=int(input())
for _ in range(T):
H,W=map(int,input().split())
x,y=map(int,input().split())
if x == 0 and y == 0:
continue
if x == H:
print(H-1, 1)
x, y = map(int,input().split())
if x == 0 and y == 0:
continue
print(H-1, y)
x, y = map(int,input().split())
if x == 0 and y == 0:
continue
if H != 3:
yn = 1
print(H-2, 1)
else:
yn = 2
print(H-2, 2)
x,y = map(int,input().split())
if x == 0 and y == 0:
continue
if x == H:
print(H-1, yn)
x, y = map(int,input().split())
if x == 0 and y == 0:
continue
print(H-1, y)
x, y = map(int,input().split())
if x == 0 and y == 0:
continue
else:
print(H-2, y)
x, y = map(int,input().split())
if x == 0 and y == 0:
continue
print(H-1, y)
x, y = map(int,input().split())
if x == 0 and y == 0:
continue
nikoro256