結果
問題 | No.1400 すごろくで世界旅行 |
ユーザー | convexineq |
提出日時 | 2021-02-19 23:05:35 |
言語 | PyPy3 (7.3.15) |
結果 |
TLE
|
実行時間 | - |
コード長 | 399 bytes |
コンパイル時間 | 458 ms |
コンパイル使用メモリ | 81,772 KB |
実行使用メモリ | 81,896 KB |
最終ジャッジ日時 | 2023-10-16 22:16:35 |
合計ジャッジ時間 | 6,593 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge12 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 36 ms
57,844 KB |
testcase_01 | AC | 37 ms
53,480 KB |
testcase_02 | AC | 36 ms
53,476 KB |
testcase_03 | AC | 50 ms
64,176 KB |
testcase_04 | AC | 37 ms
53,480 KB |
testcase_05 | AC | 43 ms
61,484 KB |
testcase_06 | AC | 57 ms
72,368 KB |
testcase_07 | AC | 67 ms
75,348 KB |
testcase_08 | AC | 49 ms
64,168 KB |
testcase_09 | AC | 47 ms
63,540 KB |
testcase_10 | AC | 53 ms
68,268 KB |
testcase_11 | AC | 48 ms
63,564 KB |
testcase_12 | AC | 100 ms
75,340 KB |
testcase_13 | AC | 217 ms
76,764 KB |
testcase_14 | TLE | - |
testcase_15 | -- | - |
testcase_16 | -- | - |
testcase_17 | -- | - |
testcase_18 | -- | - |
testcase_19 | -- | - |
testcase_20 | -- | - |
ソースコード
def check(i): p = 1<<i for _ in range(min(d,4001)): np = 0 for j,sj in enumerate(bin(p)[:1:-1]): if sj=="1": np |= e[j] if np == M: return True p = np return False v,d = map(int,input().split()) e = [int(input()[::-1],2) for _ in range(v)] M = (1<<v) - 1 for i in range(v): if not check(i): print("No") exit() print("Yes")