結果
| 問題 |
No.801 エレベーター
|
| コンテスト | |
| ユーザー |
titia
|
| 提出日時 | 2019-04-06 05:20:00 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 413 bytes |
| コンパイル時間 | 320 ms |
| コンパイル使用メモリ | 12,800 KB |
| 実行使用メモリ | 18,848 KB |
| 最終ジャッジ日時 | 2024-06-23 08:15:36 |
| 合計ジャッジ時間 | 4,824 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 10 TLE * 1 -- * 15 |
ソースコード
import itertools
import sys
input = sys.stdin.readline
N,M,K=map(int,input().split())
LR=[list(map(int,input().split())) for i in range(M)]
mod=10**9+7
DP=[0]*(N+2)
DP[1]=1
for move in range(K):
NDP=[0]*(N+2)
SUM=list(itertools.accumulate(DP))
for l,r in LR:
x=SUM[r]-SUM[l-1]
NDP[l]+=x%mod
NDP[r+1]-=x%mod
DP=list(itertools.accumulate(NDP))
print(DP[N]%mod)
titia