結果

問題 No.388 階段 (1)
ユーザー KKT89KKT89
提出日時 2020-12-01 15:13:05
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 342 bytes
コンパイル時間 565 ms
コンパイル使用メモリ 69,424 KB
実行使用メモリ 4,480 KB
最終ジャッジ日時 2023-10-11 03:35:51
合計ジャッジ時間 3,646 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 RE -
testcase_03 RE -
testcase_04 RE -
testcase_05 AC 1 ms
4,372 KB
testcase_06 AC 2 ms
4,356 KB
testcase_07 RE -
testcase_08 RE -
testcase_09 RE -
testcase_10 RE -
testcase_11 RE -
testcase_12 RE -
testcase_13 WA -
testcase_14 RE -
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp:3:96: 警告: ISO C++ では型の無い ‘main’ の宣言を禁止しています [-Wreturn-type]
    3 | using namespace std;using l=long long;const l N=1024,M=998244353;l A[N],d[42][N],n,k,m,x,y,a,r;main(){cin>>n>>m>>x>>y;while(m--)cin>>a,k+=(A[a]?0:++A[a]);d[0][0]=1;z(i,n)z(j,N){z(l,N)d[i+1][j^l]+=A[l]*d[i][j];d[i+2][j]-=d[i][j]*(k-(i>0));}z(i,min(N,y+1))r+=(x<=i)*d[n][i];cout<<r%M<<"\n";}
      |                                                                                                ^~~~

ソースコード

diff #

#include "iostream"
#define z(i,n)for(l i=0;i<n;i++)
using namespace std;using l=long long;const l N=1024,M=998244353;l A[N],d[42][N],n,k,m,x,y,a,r;main(){cin>>n>>m>>x>>y;while(m--)cin>>a,k+=(A[a]?0:++A[a]);d[0][0]=1;z(i,n)z(j,N){z(l,N)d[i+1][j^l]+=A[l]*d[i][j];d[i+2][j]-=d[i][j]*(k-(i>0));}z(i,min(N,y+1))r+=(x<=i)*d[n][i];cout<<r%M<<"\n";}
0