結果
| 問題 |
No.3018 目隠し宝探し
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-01-25 14:55:04 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 483 bytes |
| コンパイル時間 | 197 ms |
| コンパイル使用メモリ | 82,288 KB |
| 実行使用メモリ | 84,656 KB |
| 平均クエリ数 | 2.95 |
| 最終ジャッジ日時 | 2025-01-25 23:33:08 |
| 合計ジャッジ時間 | 4,308 ms |
|
ジャッジサーバーID (参考情報) |
judge6 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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))