結果
問題 | No.801 エレベーター |
ユーザー | hogeandfuga |
提出日時 | 2019-03-18 16:11:04 |
言語 | PyPy3 (7.3.15) |
結果 |
TLE
|
実行時間 | - |
コード長 | 493 bytes |
コンパイル時間 | 474 ms |
コンパイル使用メモリ | 87,120 KB |
実行使用メモリ | 152,236 KB |
最終ジャッジ日時 | 2023-09-25 13:42:24 |
合計ジャッジ時間 | 9,467 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge12 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 73 ms
75,792 KB |
testcase_01 | AC | 73 ms
71,512 KB |
testcase_02 | AC | 77 ms
71,320 KB |
testcase_03 | AC | 493 ms
76,728 KB |
testcase_04 | AC | 476 ms
76,708 KB |
testcase_05 | AC | 454 ms
76,700 KB |
testcase_06 | AC | 474 ms
76,756 KB |
testcase_07 | AC | 481 ms
76,816 KB |
testcase_08 | AC | 489 ms
76,636 KB |
testcase_09 | AC | 470 ms
76,804 KB |
testcase_10 | AC | 465 ms
76,812 KB |
testcase_11 | AC | 469 ms
76,808 KB |
testcase_12 | AC | 475 ms
76,656 KB |
testcase_13 | TLE | - |
testcase_14 | -- | - |
testcase_15 | -- | - |
testcase_16 | -- | - |
testcase_17 | -- | - |
testcase_18 | -- | - |
testcase_19 | -- | - |
testcase_20 | -- | - |
testcase_21 | -- | - |
testcase_22 | -- | - |
testcase_23 | -- | - |
testcase_24 | -- | - |
testcase_25 | -- | - |
testcase_26 | -- | - |
testcase_27 | -- | - |
testcase_28 | -- | - |
ソースコード
n, m, k = map(int, input().split()) mod = 10**9+7 t = [tuple(map(int, input().split())) for _ in range(m)] cnt = [[0]*(n+1) for _ in range(n+1)] for i in range(m): l, r = t[i] for i in range(l, r+1): for j in range(l, r+1): cnt[i][j] += 1 dp = [[0]*(n+1) for _ in range(k+1)] dp[0][1] = 1 for i in range(1, k+1): for j in range(1, n+1): for x in range(1, n+1): dp[i][j] += dp[i-1][x]*cnt[x][j]%mod dp[i][j] %= mod print(dp[k][n])