結果
問題 | No.1304 あなたは基本が何か知っていますか?私は知っています. |
ユーザー |
👑 ![]() |
提出日時 | 2020-12-02 20:22:58 |
言語 | C (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 325 bytes |
コンパイル時間 | 1,292 ms |
コンパイル使用メモリ | 28,544 KB |
実行使用メモリ | 14,020 KB |
最終ジャッジ日時 | 2024-06-12 14:08:35 |
合計ジャッジ時間 | 41,111 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 1 |
other | AC * 5 WA * 52 TLE * 9 MLE * 8 |
コンパイルメッセージ
main.c:2:1: warning: data definition has no type or storage class 2 | a[1024],b[1024]; | ^ main.c:2:1: warning: type defaults to 'int' in declaration of 'a' [-Wimplicit-int] main.c:2:9: warning: type defaults to 'int' in declaration of 'b' [-Wimplicit-int] 2 | a[1024],b[1024]; | ^ main.c:3:1: warning: data definition has no type or storage class 3 | n,k,x,y; | ^ main.c:3:1: warning: type defaults to 'int' in declaration of 'n' [-Wimplicit-int] main.c:3:3: warning: type defaults to 'int' in declaration of 'k' [-Wimplicit-int] 3 | n,k,x,y; | ^ main.c:3:5: warning: type defaults to 'int' in declaration of 'x' [-Wimplicit-int] 3 | n,k,x,y; | ^ main.c:3:7: warning: type defaults to 'int' in declaration of 'y' [-Wimplicit-int] 3 | n,k,x,y; | ^ main.c:4:1: warning: data definition has no type or storage class 4 | i,j,q; | ^ main.c:4:1: warning: type defaults to 'int' in declaration of 'i' [-Wimplicit-int] main.c:4:3: warning: type defaults to 'int' in declaration of 'j' [-Wimplicit-int] 4 | i,j,q; | ^ main.c:4:5: warning: type defaults to 'int' in declaration of 'q' [-Wimplicit-int] 4 | i,j,q; | ^ main.c:5:1: warning: return type defaults to 'int' [-Wimplicit-int] 5 | f(m,x,p){ | ^ main.c: In function 'f': main.c:5:1: warning: type of 'm' defaults to 'int' [-Wimplicit-int] main.c:5:1: warning: type of 'x' defaults to 'int' [-Wimplicit-int] main.c:5:1: warning: type of 'p' defaults to 'int' [-Wimplicit-int] main.c: At top level: main.c:9:1: warning: return type defaults to 'int' [-Wimplicit-int] 9 | main(){ | ^~~~ main.c: In function 'main': main.c:10:9: warning: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 10 | scanf("%d%d%d%d",&n,&k,&x,&y); | ^~~~~ main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf' +++ |+#include <stdio.h> 1 | long dp[1024][1024],sum[1024]
ソースコード
long dp[1024][1024],sum[1024],ans; a[1024],b[1024]; n,k,x,y; i,j,q; f(m,x,p){ if(m==n/2)dp[x][p]++; else for(int i=0;i<k;i++)if(p!=a[i])f(m+1,x^a[i],a[i]); } main(){ scanf("%d%d%d%d",&n,&k,&x,&y); for(i=0;i<k;i++)scanf("%d",&j),a[j]++; for(i=k=0;i<1024;i++)if(a[i])b[k++]=a[i]; f(0,0,-1); printf("%d",ans%998244353); }