結果
問題 |
No.1400 すごろくで世界旅行
|
ユーザー |
![]() |
提出日時 | 2021-02-19 22:42:31 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
TLE
|
実行時間 | - |
コード長 | 310 bytes |
コンパイル時間 | 277 ms |
コンパイル使用メモリ | 12,416 KB |
実行使用メモリ | 44,192 KB |
最終ジャッジ日時 | 2024-09-16 21:08:12 |
合計ジャッジ時間 | 14,894 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 10 TLE * 1 -- * 7 |
ソースコード
import numpy as np v, d = map(int, input().split()) e = np.array([list(map(int, input())) for _ in range(v)], dtype='bool') now = np.identity(v, dtype='bool') while d: if d & 1: now = np.dot(now, e) e = np.dot(e, e) d >>= 1 if all(all(r) for r in e): print('Yes') else: print('No')