結果

問題 No.1400 すごろくで世界旅行
ユーザー takelifetimetakelifetime
提出日時 2021-02-19 21:56:51
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 208 bytes
コンパイル時間 188 ms
コンパイル使用メモリ 10,588 KB
実行使用メモリ 94,396 KB
最終ジャッジ日時 2023-10-15 01:20:31
合計ジャッジ時間 10,510 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 141 ms
94,396 KB
testcase_01 AC 139 ms
29,524 KB
testcase_02 AC 140 ms
29,508 KB
testcase_03 WA -
testcase_04 AC 138 ms
29,452 KB
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 TLE -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

import numpy as np
v, d = map(int, input().split())
e = np.array([list(map(int, list(input()))) for _ in range(v)], dtype=np.int8)
e_d = np.linalg.matrix_power(e, d)
print("Yes" if np.all(e_d != 0) else "No")
0