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