結果
| 問題 | No.3496 協力カード当て |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-04-15 01:11:04 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 1,502 bytes |
| 記録 | |
| コンパイル時間 | 420 ms |
| コンパイル使用メモリ | 85,612 KB |
| 実行使用メモリ | 87,944 KB |
| スコア | 0 |
| 平均クエリ数 | 3.00 |
| 最終ジャッジ日時 | 2026-04-15 01:11:10 |
| 合計ジャッジ時間 | 6,067 ms |
|
ジャッジサーバーID (参考情報) |
judge3_1 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | RE * 16 |
ソースコード
p,n,m=map(int,input().split())
C=[0]+[0]*n
A=list(map(int,input().split()))
AA=A[:]
B=[]
A.sort()
if 1 in A:
A=A[1:]
AC=[0]+[0]*m
for i in A:
AC[i]+=1
Q=[]
for i in range(m+1):
if AC[i]!=0:
Q.append((AC[i],i))
Q.sort()
QQ=[]
pre=1
for I in Q:
while I[0]!=pre:
pre+=1
QQ.append((0,1))
QQ.append(I)
q=0
fin=0
while True:
turn=input()
if turn=="TURN":
if q<len(QQ):
print(QQ[q][1])
q+=1
res,a,b=input().split()
C[a]=int(b)
else:
BC=[]
c=0
for i in B:
if i==1:
c+=1
else:
for j in range(c):
BC.append(i)
while len(BC)<n:
BC.append(1)
G=[]
for i in range(m+1):
q=C[i]-AA.count(i)-BC.count(i)
for j in range(q):
G.append(i)
while len(G)<n:
G.append(m)
print("GUESSED",*G)
res,a,b=input().split()
if b=="1":
fin+=1
if fin==2:
exit()
else:
res,a,b=input().split()
if res=="COUNT":
C[a]=int(b)
B.append(int(a))
if res=="GUESSED":
if b=="1":
fin+=1
if fin==2:
exit()