結果

問題 No.3018 目隠し宝探し
コンテスト
ユーザー hato336
提出日時 2025-01-25 13:40:58
言語 PyPy3
(7.3.17)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
WA  
実行時間 -
コード長 731 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 467 ms
コンパイル使用メモリ 85,120 KB
実行使用メモリ 106,072 KB
平均クエリ数 3.68
最終ジャッジ日時 2026-06-23 23:24:19
合計ジャッジ時間 5,491 ms
ジャッジサーバーID
(参考情報)
judge1_0 / judge3_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 1
other WA * 15 RE * 6
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

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)
0