結果

問題 No.1400 すごろくで世界旅行
ユーザー convexineqconvexineq
提出日時 2021-02-19 22:48:14
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 341 bytes
コンパイル時間 318 ms
コンパイル使用メモリ 87,240 KB
実行使用メモリ 77,172 KB
最終ジャッジ日時 2023-10-15 03:49:43
合計ジャッジ時間 6,864 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 70 ms
75,696 KB
testcase_01 AC 70 ms
71,272 KB
testcase_02 AC 78 ms
76,288 KB
testcase_03 AC 190 ms
77,172 KB
testcase_04 WA -
testcase_05 AC 83 ms
76,604 KB
testcase_06 AC 729 ms
77,032 KB
testcase_07 TLE -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline
v,d = map(int,input().split())
e = [int(input(),2) for _ in range(v)]
M = (1<<v) - 1
for i in range(v):
    p = 1<<i
    for _ in range(min(d,4001)):
        np = 0
        for j in range(v):
            if p>>j&1: np |= e[j]
        p = np
    if p != M:
        print("No")
        exit()
print("Yes")
0