結果

問題 No.1149 色塗りゲーム
ユーザー c-yan
提出日時 2020-08-07 21:59:09
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 390 bytes
コンパイル時間 117 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 28,288 KB
平均クエリ数 1.94
最終ジャッジ日時 2024-07-17 04:40:04
合計ジャッジ時間 7,373 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 1 WA * 4 RE * 45
権限があれば一括ダウンロードができます

ソースコード

diff #

import random

N = int(input())

d = [0] * N
print(1, 1)
d[0] = 1
while True:
    t = int(input())
    if t in [0, 1]:
        break
    k, x = map(int, input().split())
    d[x - 1] = 1
    if k == 2:
        d[x] = 1
    if t == 2:
        break
    for i in range(N):
        c = []
        if d[i] == 0:
            c.append(i)
    x = random.choice(c)
    d[x] = 1
    print(1, x + 1)
0