結果
| 問題 |
No.355 数当てゲーム(2)
|
| コンテスト | |
| ユーザー |
matsu7874
|
| 提出日時 | 2016-04-01 22:53:51 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 851 bytes |
| コンパイル時間 | 214 ms |
| コンパイル使用メモリ | 12,928 KB |
| 実行使用メモリ | 28,456 KB |
| 平均クエリ数 | 1.29 |
| 最終ジャッジ日時 | 2024-07-16 08:59:50 |
| 合計ジャッジ時間 | 13,487 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 1 RE * 51 |
ソースコード
import sys
import random
import itertools
popu = [[j for j in range(10)] for i in range(4)]
ans = []
a = [0,1,2,3]
while True:
print(*a)
sys.stdout.flush()
x, y = map(int, input().split())
for i in range(4):
for _ in range(x):
popu[i].append(a[i])
for _ in range(y):
for k in range(10):
if k == a[i]:
continue
popu[i][a[i]].append(a[i])
if x == 4:
exit()
if x + y == 4:
ans = a[:]
break
else:
a = [random.choice(popu[i]) for i in range(4)]
while any([a.count(i)>1 for i in range(10)]):
a = [random.choice(popu[i]) for i in range(4)]
for a in itertools.permutations(ans):
print(*a)
sys.stdout.flush()
x, y = map(int, input().split())
if x == 4:
exit()
matsu7874