結果
| 問題 |
No.3018 目隠し宝探し
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-01-25 13:40:58 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 731 bytes |
| コンパイル時間 | 354 ms |
| コンパイル使用メモリ | 82,880 KB |
| 実行使用メモリ | 107,408 KB |
| 平均クエリ数 | 3.68 |
| 最終ジャッジ日時 | 2025-01-25 22:55:39 |
| 合計ジャッジ時間 | 5,864 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge10 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 1 |
| other | WA * 15 RE * 6 |
ソースコード
import collections,sys,math,functools,operator,itertools,bisect,heapq,decimal,string,time,random
#sys.setrecursionlimit(10**9)
#sys.set_int_max_str_digits(0)
#input = sys.stdin.readline
#n = int(input())
#alist = list(map(int,input().split()))
#alist = []
#s = input()
h,w = map(int,input().split())
#for i in range(n):
# alist.append(list(map(int,input().split())))
print('?',1,1,flush=True)
d1 = int(input())
print('?',1,w,flush=True)
d2 = int(input())
y = -1
for i in range(1,w+1):
if (1 - i)**2 - (w - i)**2 == d1 - d2:
y = i
break
print('?',h,1,flush=True)
d3 = int(input())
x = -1
for i in range(1,h+1):
if (1 - i)**2 - (h - i)**2 == d1 - d3:
x = i
break
print('!',x,y,flush=True)