結果
| 問題 |
No.3161 Find Presents
|
| コンテスト | |
| ユーザー |
detteiuu
|
| 提出日時 | 2025-05-23 20:39:39 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 874 bytes |
| コンパイル時間 | 404 ms |
| コンパイル使用メモリ | 82,348 KB |
| 実行使用メモリ | 87,300 KB |
| 最終ジャッジ日時 | 2025-05-23 20:39:50 |
| 合計ジャッジ時間 | 10,949 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | TLE * 1 -- * 79 |
ソースコード
def question(xl, xr, yl, yr):
print("?", xl, xr, yl, yr)
ans = int(input())
if ans == -1:
exit()
return int(input()) == 1
A = []
left = 0
while left <= 10**6 and question(left, 10**6, 0, 10**6):
l = left
r = 10**6
while l+1 < r:
m = (l+r)//2
if not question(l, m, 0, 10**6):
l = m+1
else:
r = m
if not question(l, l, 0, 10**6):
l += 1
left2 = 0
while left2 <= 10**6 and question(l, l, left2, 10**6):
l2 = left2
r2 = 10**6
while l2+1 < r2:
m = (l2+r2)//2
if not question(l, l, l2, m):
l2 = m+1
else:
r2 = m
if not question(l, l, l2, l2):
l2 += 1
A.append((l, l2))
left2 = l2+1
left = l+1
print("!", len(A))
for X, Y in A:
print(X, Y)
detteiuu