結果
| 問題 | No.1340 おーじ君をさがせ |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-08-15 21:04:41 |
| 言語 | Python3 (3.14.7 + numpy 2.5.2 + scipy 1.18.0 + ACL) |
| 結果 |
RE
不安定
|
| 実行時間 | - |
| コード長 | 271 bytes |
| 記録 | |
| コンパイル時間 | 59 ms |
| コンパイル使用メモリ | 15,104 KB |
| 実行使用メモリ | 34,176 KB |
| 最終ジャッジ日時 | 2026-09-11 20:58:47 |
| 合計ジャッジ時間 | 22,922 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 RE * 2 |
| other | AC * 3 WA * 1 RE * 55 |
ソースコード
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))))