結果
| 問題 |
No.2199 lower_bound and upper_bound
|
| コンテスト | |
| ユーザー |
SSRS
|
| 提出日時 | 2023-01-20 22:26:00 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 417 bytes |
| コンパイル時間 | 1,622 ms |
| コンパイル使用メモリ | 168,136 KB |
| 実行使用メモリ | 13,764 KB |
| 最終ジャッジ日時 | 2024-06-23 10:22:56 |
| 合計ジャッジ時間 | 5,274 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 9 TLE * 1 -- * 12 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
const int MOD = 998244353;
int main(){
int N, L, U;
cin >> N >> L >> U;
vector<int> dp(N + U + 1, 0);
dp[0] = 1;
for (int i = 0; i < N; i++){
for (int j = 1; j <= i + U + 1; j++){
dp[j] += dp[j - 1];
dp[j] %= MOD;
}
}
long long ans = 0;
for (int i = N + L; i <= N + U; i++){
ans += dp[i];
}
ans %= MOD;
cout << ans << endl;
}
SSRS