結果
| 問題 |
No.3246 80% Accuracy Calculator
|
| コンテスト | |
| ユーザー |
titia
|
| 提出日時 | 2025-09-02 03:40:21 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 3,484 bytes |
| コンパイル時間 | 263 ms |
| コンパイル使用メモリ | 12,800 KB |
| 実行使用メモリ | 29,336 KB |
| 平均クエリ数 | 25.00 |
| 最終ジャッジ日時 | 2025-09-02 03:40:29 |
| 合計ジャッジ時間 | 7,158 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | RE * 43 |
ソースコード
import sys
input = sys.stdin.readline
from collections import Counter
A=[]
for i in range(8):
print("?","A",flush=True)
ret=int(input())
print(ret, file=sys.stderr, flush=True)
A.append(ret)
B=[]
for i in range(8):
print("?","B",flush=True)
ret=int(input())
print(ret, file=sys.stderr, flush=True)
B.append(ret)
CA=Counter(A)
A0=CA.most_common()[0][0]
CB=Counter(B)
B0=CB.most_common()[0][0]
while True:
print("+","C","C","A",flush=True)
ret=int(input())
print(ret, file=sys.stderr, flush=True)
A=[]
for i in range(8):
print("?","A",flush=True)
print(ret, file=sys.stderr, flush=True)
ret=int(input())
A.append(ret)
CA=Counter(A)
A=CA.most_common()[0][0]
if CA[0][1]>=7 and A==0:
break
count=0
NOW=[0,B0,0]
if A0%2==0:
while count<A0:
if count%2==0:
while True:
print("+","C","B","A",flush=True)
ret=int(input())
print(ret, file=sys.stderr, flush=True)
A=[]
for i in range(8):
print("?","A",flush=True)
ret=int(input())
print(ret, file=sys.stderr, flush=True)
A.append(ret)
CA=Counter(A)
A=CA.most_common()[0][0]
if CA[0][1]>=7 and A==NOW[1]+NOW[2]:
NOW[0]=NOW[1]+NOW[2]
count+=1
break
else:
while True:
print("+","A","B","C",flush=True)
ret=int(input())
print(ret, file=sys.stderr, flush=True)
C=[]
for i in range(8):
print("?","C",flush=True)
ret=int(input())
print(ret, file=sys.stderr, flush=True)
C.append(ret)
CC=Counter(C)
C=CC.most_common()[0][0]
if CC[0][1]>=7 and C==NOW[0]+NOW[1]:
NOW[2]=NOW[0]+NOW[1]
count+=1
break
else:
while count<A0:
if count%2==1:
while True:
print("+","C","B","A",flush=True)
ret=int(input())
print(ret, file=sys.stderr, flush=True)
A=[]
for i in range(8):
print("?","A",flush=True)
ret=int(input())
print(ret, file=sys.stderr, flush=True)
A.append(ret)
CA=Counter(A)
A=CA.most_common()[0][0]
if CA[0][1]>=7 and A==NOW[1]+NOW[2]:
NOW[0]=NOW[1]+NOW[2]
count+=1
break
else:
while True:
print("+","A","B","C",flush=True)
ret=int(input())
print(ret, file=sys.stderr, flush=True)
C=[]
for i in range(8):
print("?","C",flush=True)
ret=int(input())
print(ret, file=sys.stderr, flush=True)
C.append(ret)
CC=Counter(C)
C=CC.most_common()[0][0]
if CC[0][1]>=7 and C==NOW[0]+NOW[1]:
NOW[2]=NOW[0]+NOW[1]
count+=1
break
print("!","C",flush=True)
titia