結果
問題 |
No.3018 目隠し宝探し
|
ユーザー |
|
提出日時 | 2025-09-12 05:50:21 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 663 bytes |
コンパイル時間 | 481 ms |
コンパイル使用メモリ | 82,128 KB |
実行使用メモリ | 77,760 KB |
平均クエリ数 | 2.68 |
最終ジャッジ日時 | 2025-09-12 05:50:26 |
合計ジャッジ時間 | 4,483 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 1 |
other | AC * 6 WA * 15 |
ソースコード
h,w=map(int,input().split()) if h==w==1: print('!',1,1,flush=True) exit() if h==1: print('?',1,1,flush=True) x=int(input()) for i in range(1,w+1): if (i-1)*(i-1)==x: print('!',1,i,flush=True) exit() if w==1: print('?',1,1,flush=True) x=int(input()) for i in range(1,h+1): if (i-1)*(i-1)==x: print('!',i,1,flush=True) exit() print('?',1,1,flush=True) x=int(input()) print('?',h,1,flush=True) y=int(input()) for i in range(1,h+1): for j in range(1,w+1): a=(i-1)*(i-1)+(j-1)*(j-1) b=(i-h)*(i-h)+(j-1)*(j-1) if x==a and b==y: print('!',a,b,flush=True) exit()