結果
| 問題 | No.1304 あなたは基本が何か知っていますか?私は知っています. |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-12-02 01:09:34 |
| 言語 | C(gnu17) (gcc 15.2.0) |
| 結果 |
CE
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 476 bytes |
| 記録 | |
| コンパイル時間 | 89 ms |
| コンパイル使用メモリ | 25,652 KB |
| 最終ジャッジ日時 | 2026-02-22 06:27:10 |
|
ジャッジサーバーID (参考情報) |
judge2 / judge2 |
(要ログイン)
コンパイルエラー時のメッセージ・ソースコードは、提出者また管理者しか表示できないようにしております。(リジャッジ後のコンパイルエラーは公開されます)
ただし、clay言語の場合は開発者のデバッグのため、公開されます。
ただし、clay言語の場合は開発者のデバッグのため、公開されます。
コンパイルメッセージ
main.c:2:1: warning: data definition has no type or storage class
2 | k,m,x,y,a,i,j,l;
| ^
main.c:2:1: error: type defaults to 'int' in declaration of 'k' [-Wimplicit-int]
main.c:2:3: error: type defaults to 'int' in declaration of 'm' [-Wimplicit-int]
2 | k,m,x,y,a,i,j,l;
| ^
main.c:2:5: error: type defaults to 'int' in declaration of 'x' [-Wimplicit-int]
2 | k,m,x,y,a,i,j,l;
| ^
main.c:2:7: error: type defaults to 'int' in declaration of 'y' [-Wimplicit-int]
2 | k,m,x,y,a,i,j,l;
| ^
main.c:2:9: error: type defaults to 'int' in declaration of 'a' [-Wimplicit-int]
2 | k,m,x,y,a,i,j,l;
| ^
main.c:2:11: error: type defaults to 'int' in declaration of 'i' [-Wimplicit-int]
2 | k,m,x,y,a,i,j,l;
| ^
main.c:2:13: error: type defaults to 'int' in declaration of 'j' [-Wimplicit-int]
2 | k,m,x,y,a,i,j,l;
| ^
main.c:2:15: error: type defaults to 'int' in declaration of 'l' [-Wimplicit-int]
2 | k,m,x,y,a,i,j,l;
| ^
main.c:3:1: error: return type defaults to 'int' [-Wimplicit-int]
3 | main(n){
| ^~~~
main.c: In function 'main':
main.c:3:1: warning: old-style function definition [-Wold-style-definition]
main.c:3:1: error: type of 'n' defaults to 'int' [-Wimplicit-int]
main.c:4:5: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
4 | scanf("%d%d%d%d",&n,&m,&x,&y);
| ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
+++ |+#include <stdio.h>
1 | long M=998244353,N=1024,A[1024],d[42][1024]={1},r;
main.c:4:5: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
4 | scanf("%d%d%d%d",&n,&m,&x,&y);
| ^~~~~
main.c:4:5: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:21:5: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
21 | printf
ソースコード
long M=998244353,N=1024,A[1024],d[42][1024]={1},r;
k,m,x,y,a,i,j,l;
main(n){
scanf("%d%d%d%d",&n,&m,&x,&y);
for(i=0;i<m;i++){
scanf("%d",&a);
k+=(A[a]?0:++A[a]);
}
for(i=0;i<n;i++){
for(j=0;j<N;j++){
for(l=0;l<N;l++){
d[i+1][j^l]+=A[l]*d[i][j];
}
d[i+2][j]-=d[i][j]*(k-(i>0));
}
}
for(;x<N;x++){
r+=d[n][x];
if(x==y)break;
}
printf("%d",r%M);
}