結果

問題 No.1400 すごろくで世界旅行
ユーザー ytoki28ytoki28
提出日時 2021-02-19 23:58:07
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
TLE  
実行時間 -
コード長 270 bytes
コンパイル時間 119 ms
コンパイル使用メモリ 11,788 KB
実行使用メモリ 103,124 KB
最終ジャッジ日時 2023-10-17 01:16:58
合計ジャッジ時間 16,927 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 464 ms
42,372 KB
testcase_01 AC 479 ms
42,368 KB
testcase_02 AC 470 ms
42,368 KB
testcase_03 AC 486 ms
42,368 KB
testcase_04 AC 480 ms
42,368 KB
testcase_05 AC 498 ms
42,368 KB
testcase_06 AC 598 ms
42,372 KB
testcase_07 AC 769 ms
42,368 KB
testcase_08 AC 490 ms
42,368 KB
testcase_09 AC 491 ms
42,368 KB
testcase_10 AC 507 ms
42,372 KB
testcase_11 AC 480 ms
42,372 KB
testcase_12 TLE -
testcase_13 TLE -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
import numpy as np

readline = sys.stdin.readline
read = sys.stdin.read

v, d = map(int, readline().split())
a = [list(map(int,readline().rstrip('\n'))) for i in range(v)]
a = np.array(a)
ans = "Yes" if np.all(np.linalg.matrix_power(a,d)) else "No"
print(ans)
0