結果
問題 | No.2252 Find Zero |
ユーザー | ああいい |
提出日時 | 2023-03-25 00:04:00 |
言語 | PyPy3 (7.3.15) |
結果 |
RE
|
実行時間 | - |
コード長 | 619 bytes |
コンパイル時間 | 269 ms |
コンパイル使用メモリ | 81,708 KB |
実行使用メモリ | 89,496 KB |
平均クエリ数 | 150.83 |
最終ジャッジ日時 | 2023-10-18 21:44:34 |
合計ジャッジ時間 | 3,631 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge11 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | RE | - |
testcase_01 | RE | - |
testcase_02 | AC | 97 ms
69,728 KB |
testcase_03 | AC | 139 ms
80,292 KB |
testcase_04 | AC | 122 ms
75,268 KB |
testcase_05 | AC | 98 ms
69,736 KB |
testcase_06 | AC | 126 ms
77,316 KB |
testcase_07 | AC | 121 ms
75,268 KB |
testcase_08 | AC | 130 ms
77,308 KB |
testcase_09 | AC | 147 ms
80,292 KB |
testcase_10 | AC | 98 ms
69,736 KB |
testcase_11 | RE | - |
testcase_12 | RE | - |
testcase_13 | AC | 99 ms
69,736 KB |
testcase_14 | AC | 97 ms
69,736 KB |
testcase_15 | RE | - |
testcase_16 | AC | 97 ms
69,736 KB |
testcase_17 | AC | 94 ms
69,736 KB |
ソースコード
N = int(input()) import sys if N % 2 == 1: s = set() count = 0 for i in range(N): if count == N // 2:break if i not in s: print("?",i,i) a = int(input()) if a == i: print("!",a) exit() else: s.add(a) s.add(i) for i in range(N): if i not in s: print("!",i) exit() else: print("? 0 0") a = int(input()) now = a for _ in range(N // 2 - 1): print("?",a,now) now = int(input()) print("!",now)