結果
| 問題 | No.1340 おーじ君をさがせ |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-08-15 21:05:43 |
| 言語 | Python3 (3.14.2 + numpy 2.4.0 + scipy 1.16.3) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 271 bytes |
| 記録 | |
| コンパイル時間 | 257 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 44,712 KB |
| 最終ジャッジ日時 | 2024-10-08 05:41:02 |
| 合計ジャッジ時間 | 34,279 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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 (np.linalg.matrix_power(p, n) @ q)))