結果
| 問題 | No.850 企業コンテスト2位 |
| コンテスト | |
| ユーザー |
tktk_snsn
|
| 提出日時 | 2021-11-07 14:33:28 |
| 言語 | Python3 (3.15.0 + numpy 2.5.4 + scipy 1.18.1 + ACL) |
| 結果 |
RE
不安定
|
| 実行時間 | - |
| コード長 | 390 bytes |
| 記録 | |
| コンパイル時間 | 54 ms |
| コンパイル使用メモリ | 15,232 KB |
| 実行使用メモリ | 13,440 KB |
| 平均クエリ数 | 144.18 |
| 最終ジャッジ日時 | 2026-09-21 20:49:07 |
| 合計ジャッジ時間 | 5,586 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge5_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 1 |
| other | AC * 2 WA * 2 RE * 23 |
ソースコード
N = int(input())
cand = list(range(1, N + 1))
while len(cand) > 2:
nxt = []
while len(cand) >= 2:
a = cand.pop()
b = cand.pop()
print("? {} {}".format(a, b))
ans = int(input())
nxt.append(ans)
if cand:
nxt.append(cand)
cand = nxt
a, b = cand
print("? {} {}".format(a, b))
ans = int(input())
print("! {}".format(a ^ b ^ ans))
tktk_snsn