結果
| 問題 | No.1186 長方形の敷き詰め |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-08-26 10:18:53 |
| 言語 | C++17 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 547 bytes |
| 記録 | |
| コンパイル時間 | 2,360 ms |
| コンパイル使用メモリ | 193,444 KB |
| 最終ジャッジ日時 | 2025-01-13 14:57:04 |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 21 WA * 3 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
#define REP(i,n) for(int i=0; i<(int)(n); i++)
#define FOR(i,b,e) for (int i=(int)(b); i<(int)(e); i++)
#define ALL(x) (x).begin(), (x).end()
const double PI = acos(-1);
const long long MOD = 998244353;
int main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
int n, m;
cin >> n >> m;
vector<long long> dp(m+1);
dp[0] = 1;
for (int i = 1; i <= m; i++) {
dp[i] = dp[i-1];
if (i - n >= 0)
dp[i] += dp[i-n];
dp[i] %= MOD;
}
cout << dp[m] << endl;
return 0;
}