結果
| 問題 |
No.3018 目隠し宝探し
|
| コンテスト | |
| ユーザー |
あじゃじゃ
|
| 提出日時 | 2025-01-09 14:32:50 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 521 bytes |
| コンパイル時間 | 270 ms |
| コンパイル使用メモリ | 81,672 KB |
| 実行使用メモリ | 84,012 KB |
| 平均クエリ数 | 2.91 |
| 最終ジャッジ日時 | 2025-01-25 21:58:31 |
| 合計ジャッジ時間 | 4,344 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 16 RE * 5 |
ソースコード
h,w=map(int,input().split())
cand=[]
if h*w==1:
print("!",1,1,flush=True)
exit()
if h==1 or w==1:
print("!",)
print("?",1,1,flush=True)
rr=int(input())
if h==1 or w==1:
for i in range(1,h+1):
for j in range(1,w+1):
if (i-1)**2+(j-1)**2==rr:
exit(print("!",i,j,flush=True))
print("?",h,1,flush=True)
dd=int(input())
for i in range(1,h+1):
for j in range(1,w+1):
if (i-1)**2+(j-1)**2==rr and (i-h)**2+(j-1)**2==dd:
exit(print("!",i,j,flush=True))
あじゃじゃ