結果
| 問題 |
No.3018 目隠し宝探し
|
| コンテスト | |
| ユーザー |
ntuda
|
| 提出日時 | 2025-11-05 23:11:29 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 481 bytes |
| コンパイル時間 | 352 ms |
| コンパイル使用メモリ | 82,432 KB |
| 実行使用メモリ | 71,032 KB |
| 平均クエリ数 | 2.68 |
| 最終ジャッジ日時 | 2025-11-05 23:11:34 |
| 合計ジャッジ時間 | 3,693 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 16 WA * 5 |
ソースコード
H, W = map(int, input().split())
if H == 1 and W == 1:
print("!", 1, 1)
elif H == 1:
print("?", 1, 1)
a = int(input())
print(1, int(round(a,0)) - 1)
elif W == 1:
print("?", 1, 1)
a = int(input())
print(int(round(a,0)) - 1, 1)
else:
W1 = W - 1
print("?", 1, 1)
d1 = int(input())
print("?", 1, W)
d2 = int(input())
x1 = int(round((d1 - d2 + W1 ** 2) / 2 / W1,0))
y = int(round((d1 - x1 ** 2)**0.5,0))
print("!", y+1, x1+1)
ntuda