結果
問題 | No.1340 おーじ君をさがせ |
ユーザー |
|
提出日時 | 2021-08-15 21:03:57 |
言語 | PyPy3 (7.3.15) |
結果 |
RE
|
実行時間 | - |
コード長 | 271 bytes |
コンパイル時間 | 278 ms |
コンパイル使用メモリ | 82,304 KB |
実行使用メモリ | 65,024 KB |
最終ジャッジ日時 | 2024-10-08 05:36:50 |
合計ジャッジ時間 | 5,675 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | RE * 3 |
other | RE * 59 |
ソースコード
import numpy as np n, m, t = map(int, input().split()) p = np.zeros((n, n), dtype = np.bool) for _ in range(m): a, b = map(int, input().split()) p[b][a] = 1 q = np.zeros((n, 1), dtype = np.bool) q[0][0] = 1 print(sum(i[0] for i in (q @ np.linalg.matrix_power(p, n))))