結果
| 問題 |
No.3018 目隠し宝探し
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-01-25 14:46:54 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 439 bytes |
| コンパイル時間 | 543 ms |
| コンパイル使用メモリ | 81,408 KB |
| 実行使用メモリ | 81,664 KB |
| 平均クエリ数 | 2.95 |
| 最終ジャッジ日時 | 2025-01-25 23:29:49 |
| 合計ジャッジ時間 | 4,131 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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)
d1 = int(input())
print("?",1,w)
d2 = int(input())
print("?",h,1)
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))