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