結果
| 問題 | No.3496 協力カード当て |
| コンテスト | |
| ユーザー |
titia
|
| 提出日時 | 2026-04-15 04:01:52 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 1,309 bytes |
| 記録 | |
| コンパイル時間 | 694 ms |
| コンパイル使用メモリ | 20,828 KB |
| 実行使用メモリ | 40,728 KB |
| スコア | 81 |
| 平均クエリ数 | 45.81 |
| 最終ジャッジ日時 | 2026-04-15 04:02:08 |
| 合計ジャッジ時間 | 12,521 ms |
|
ジャッジサーバーID (参考情報) |
judge3_1 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 13 RE * 3 |
ソースコード
import sys
input = sys.stdin.readline
from collections import Counter
LIST=[]
C=Counter()
com,N,M=list(map(int,input().split()))
A=list(map(int,input().split()))
ind=0
while True:
if len(LIST)==N and ind==N:
break
S=input().strip()
if S=="TURN":
if ind<N:
print("ASK",A[ind],flush=True)
ind+=1
else:
break
elif S=="WAIT":
pass
ret=input().split()
if ret[0]=="COUNT":
x,y=int(ret[1]),int(ret[2])
C[x]=y
if S=="WAIT":
LIST.append(x)
while True:
S=input().strip()
if S=="TURN":
flag=0
for i in range(1,M+1):
if i in C:
pass
else:
flag=1
print("ASK",i,flush=True)
break
if flag==0:
ANS=[]
C1=Counter(A)
C2=Counter(LIST)
for i in range(1,M+1):
x=C[i]-C1[i]-C2[i]
ANS+=[i]*x
print("GUESS",*ANS,flush=True)
elif S=="WAIT":
pass
else:
if S[0]=="E":
break
ret=input().split()
if ret[0]=="COUNT":
x,y=int(ret[1]),int(ret[2])
C[x]=y
titia