結果
| 問題 | No.3496 協力カード当て |
| コンテスト | |
| ユーザー |
harurun
|
| 提出日時 | 2026-04-14 23:21:29 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 1,609 bytes |
| 記録 | |
| コンパイル時間 | 601 ms |
| コンパイル使用メモリ | 20,828 KB |
| 実行使用メモリ | 40,888 KB |
| スコア | 0 |
| 平均クエリ数 | 3.00 |
| 最終ジャッジ日時 | 2026-04-14 23:55:18 |
| 合計ジャッジ時間 | 16,010 ms |
|
ジャッジサーバーID (参考情報) |
judge2_1 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | RE * 16 |
ソースコード
import os
def main():
idd,N,M=map(int,input().split())
c=list(map(int,input().split()))
d=[0]*M
for i in c:
d[i-1]+=1
ans=[]
if idd==1:
with open("A.txt",mode="w")as f:
f.write(" ".join(map(str,c)))
while not os.path.exists("B.txt"):
pass
with open("B.txt")as f:
cc=list(map(int,f.readline().split()))
for i in cc:
d[i-1]+=1
else:
with open("B.txt",mode="w")as f:
f.write(" ".join(map(str,c)))
while not os.path.exists("A.txt"):
pass
with open("A.txt")as f:
cc=list(map(int,f.readline().split()))
for i in cc:
d[i-1]+=1
idx=0
while 1:
op=input()
if "END" in op:
break
elif op=="TURN":
while d[idx]==idx+1:
idx+=1
if idx==M:
break
if idx==M:
# assert(len(ans)==N)
ans.sort()
print("GUESS "+" ".join(map(str,ans)))
input()
else:
print(f"ASK {idx+1}")
_,x,k=input().split()
for i in range(d[idx],int(k)+1):
ans.append(int(x))
idx+=1
else:
opp,x,k=input().split()
if opp=="GUESSED":
continue
else:
for i in range(d[int(x)-1],int(k)+1):
ans.append(int(x))
idx=x
return
if __name__=="__main__":
main()
harurun