結果
問題 |
No.3018 目隠し宝探し
|
ユーザー |
![]() |
提出日時 | 2025-01-09 14:20:48 |
言語 | PyPy3 (7.3.15) |
結果 |
RE
|
実行時間 | - |
コード長 | 401 bytes |
コンパイル時間 | 218 ms |
コンパイル使用メモリ | 81,920 KB |
実行使用メモリ | 154,016 KB |
平均クエリ数 | 2.41 |
最終ジャッジ日時 | 2025-01-25 21:58:03 |
合計ジャッジ時間 | 5,295 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 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)