結果
問題 |
No.3246 80% Accuracy Calculator
|
ユーザー |
👑 |
提出日時 | 2025-08-22 22:22:17 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 859 bytes |
コンパイル時間 | 334 ms |
コンパイル使用メモリ | 82,772 KB |
実行使用メモリ | 95,108 KB |
平均クエリ数 | 1010.70 |
最終ジャッジ日時 | 2025-08-22 22:22:47 |
合計ジャッジ時間 | 9,146 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | WA * 43 |
ソースコード
from collections import defaultdict STR_MAP = ["A", "B", "C"] val = [0, 0, 0] def get_value(pos): cand = defaultdict(int) for _ in range(50): print("?", STR_MAP[pos]) cand[int(input())] += 1 return [v for v, c in cand.items() if c == max(cand.values())][0] def add(pos_0, pos_1, pos_2): while True: print("+", STR_MAP[pos_0], STR_MAP[pos_1], STR_MAP[pos_2]) input() if val[pos_0] + val[pos_1] == get_value(pos_2): val[pos_2] = val[pos_0] + val[pos_1] break X = val[0] = get_value(0) Y = val[1] = get_value(1) ans_pos = 2 tmp_pos = 1 for i in range(9, -1, -1): if (Y >> i) & 1 == 1: add(0, ans_pos, tmp_pos) ans_pos, tmp_pos = tmp_pos, ans_pos add(ans_pos, ans_pos, tmp_pos) ans_pos, tmp_pos = tmp_pos, ans_pos print("!", STR_MAP[ans_pos])