結果
| 問題 |
No.3018 目隠し宝探し
|
| コンテスト | |
| ユーザー |
あじゃじゃ
|
| 提出日時 | 2025-01-09 14:17:28 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 397 bytes |
| コンパイル時間 | 169 ms |
| コンパイル使用メモリ | 82,840 KB |
| 実行使用メモリ | 154,320 KB |
| 平均クエリ数 | 2.41 |
| 最終ジャッジ日時 | 2025-01-25 22:15:10 |
| 合計ジャッジ時間 | 4,937 ms |
|
ジャッジサーバーID (参考情報) |
judge7 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 1 |
| other | WA * 8 RE * 13 |
ソースコード
h,w=map(int,input().split())
cand=[]
print("?",1,1,flush=True)
y,x=1,1
for i in range(h):
for j in range(w):
cand.append((i,j))
while 1:
now=int(input())
if now==0:
print(y,x,flush=True)
exit()
tmp=[]
for i,j in cand:
if (i-y)**2+(j-x)**2==now:
tmp.append((i,j))
cand=tmp
y,x=cand[0]
print("?",y,x,flush=True)
あじゃじゃ