結果
| 問題 | 
                            No.1186 長方形の敷き詰め
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2020-08-22 15:25:56 | 
| 言語 | C++14  (gcc 13.3.0 + boost 1.87.0)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 233 bytes | 
| コンパイル時間 | 603 ms | 
| コンパイル使用メモリ | 64,048 KB | 
| 実行使用メモリ | 11,264 KB | 
| 最終ジャッジ日時 | 2024-10-15 09:39:48 | 
| 合計ジャッジ時間 | 1,630 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge2 / judge5 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 21 WA * 3 | 
コンパイルメッセージ
main.cpp:6:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    6 | main()
      | ^~~~
            
            ソースコード
#include<iostream>
using namespace std;
const long mod=998244353;
long dp[1<<20];
long N,M;
main()
{
	cin>>N>>M;
	dp[0]=1;
	for(int i=0;i<M;i++)
	{
		if(i+N<=M)(dp[i+N]+=dp[i])%=mod;
		(dp[i+1]+=dp[i])%=mod;
	}
	cout<<dp[M]<<endl;
}