結果
問題 |
No.3161 Find Presents
|
ユーザー |
![]() |
提出日時 | 2025-05-23 20:32:37 |
言語 | PyPy3 (7.3.15) |
結果 |
RE
|
実行時間 | - |
コード長 | 805 bytes |
コンパイル時間 | 341 ms |
コンパイル使用メモリ | 82,608 KB |
実行使用メモリ | 95,456 KB |
平均クエリ数 | 8002.00 |
最終ジャッジ日時 | 2025-05-23 20:33:53 |
合計ジャッジ時間 | 42,102 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | RE * 80 |
ソースコード
def question(xl, xr, yl, yr): print("?", xl, xr, yl, yr) 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 print("!", len(A)) for X, Y in A: print(X, Y)