結果
| 問題 |
No.355 数当てゲーム(2)
|
| コンテスト | |
| ユーザー |
n_knuu
|
| 提出日時 | 2016-04-02 02:44:31 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 987 bytes |
| コンパイル時間 | 221 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 27,880 KB |
| 平均クエリ数 | 16.50 |
| 最終ジャッジ日時 | 2024-07-16 09:34:58 |
| 合計ジャッジ時間 | 5,940 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 46 RE * 6 |
ソースコード
def is_finish(x, y):
return x == 4
l = list(range(4))
a = set(range(10))
print(*l)
X, Y = map(int, input().split())
if is_finish(X, Y):
exit(0)
for i in range(4):
not_in = a - set(l)
ng = []
for n in not_in:
tmpl = l[:]
tmpl[i] = n
print(*tmpl)
tmpx, tmpy = map(int, input().split())
if is_finish(tmpx, tmpy):
exit(0)
if X + Y <= tmpx + tmpy:
ng.append(n)
if tmpx > X:
l = tmpl[:]
X, Y = tmpx, tmpy
break
elif tmpx < X:
break
else:
for j in range(i+1, 4):
tmpl = l[:]
tmpl[i], tmpl[j] = tmpl[j], ng[0]
print(*tmpl)
tmpx, tmpy = map(int, input().split())
if is_finish(tmpx, tmpy):
exit(0)
if tmpx > X:
l = tmpl[:]
X, Y = tmpx, tmpy
break
else:
assert(0)
assert(0)
n_knuu