結果
問題 |
No.3018 目隠し宝探し
|
ユーザー |
![]() |
提出日時 | 2025-01-09 14:22:31 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 450 bytes |
コンパイル時間 | 162 ms |
コンパイル使用メモリ | 82,244 KB |
実行使用メモリ | 153,924 KB |
平均クエリ数 | 3.18 |
最終ジャッジ日時 | 2025-01-25 21:58:02 |
合計ジャッジ時間 | 4,730 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge9 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 9 WA * 12 |
ソースコード
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+1,j+1)) while 1: now=int(input()) if now==-1: print("yy") exit() 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)