結果
| 問題 | No.1186 長方形の敷き詰め |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-08-22 15:06:27 |
| 言語 | C++14 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 392 bytes |
| 記録 | |
| コンパイル時間 | 1,503 ms |
| コンパイル使用メモリ | 167,892 KB |
| 実行使用メモリ | 11,024 KB |
| 最終ジャッジ日時 | 2024-10-15 09:23:37 |
| 合計ジャッジ時間 | 2,382 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 16 WA * 8 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
long long mod=998244353;
#define int long long
signed main(){
int N,M; cin>>N>>M;
if(N>M){cout<<1<<endl; return 0;}
if(N==M){cout<<2<<endl; return 0;}
int count=M-N;
vector<long long>ans(count+3);
ans[0]=1;
ans[1]=1;
for(int i=2;i<count+3;i++){ans[i]=ans[i-1]+ans[i-2];ans[i]%=mod;}
cout<<ans[count+2]<<endl;
}