結果
問題 |
No.3018 目隠し宝探し
|
ユーザー |
|
提出日時 | 2025-01-25 14:58:50 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 483 bytes |
コンパイル時間 | 424 ms |
コンパイル使用メモリ | 81,708 KB |
実行使用メモリ | 83,700 KB |
平均クエリ数 | 2.95 |
最終ジャッジ日時 | 2025-01-25 23:37:47 |
合計ジャッジ時間 | 4,728 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge13 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 1 |
other | WA * 15 RE * 6 |
ソースコード
def dist(a,b): return (a[0]-b[0])**2 + (a[1]-b[1])**2 h,w = map(int,input().split()) print("?",1,1,flush=True) d1 = int(input()) print("?",1,w,flush=True) d2 = int(input()) print("?",h,1,flush=True) d3 = int(input()) for i in range(h): for j in range(w): if dist((i,j),(0,0)) != d1: continue if dist((i,j),(0,w-1)) != d2: continue if dist((i,j),(h-1,0)) != d3: continue exit(print("!",i+1,j+1,flush=True))