結果

問題 No.1304 あなたは基本が何か知っていますか?私は知っています.
ユーザー %20%20
提出日時 2020-12-01 12:56:43
言語 C
(gcc 12.3.0)
結果
AC  
実行時間 3 ms / 2,000 ms
コード長 480 bytes
コンパイル時間 1,499 ms
コンパイル使用メモリ 29,624 KB
実行使用メモリ 4,384 KB
最終ジャッジ日時 2023-09-03 03:24:38
合計ジャッジ時間 6,666 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 0 ms
4,376 KB
testcase_01 AC 1 ms
4,380 KB
testcase_02 AC 1 ms
4,380 KB
testcase_03 AC 1 ms
4,380 KB
testcase_04 AC 2 ms
4,380 KB
testcase_05 AC 1 ms
4,380 KB
testcase_06 AC 1 ms
4,380 KB
testcase_07 AC 2 ms
4,376 KB
testcase_08 AC 1 ms
4,376 KB
testcase_09 AC 2 ms
4,376 KB
testcase_10 AC 1 ms
4,380 KB
testcase_11 AC 2 ms
4,376 KB
testcase_12 AC 2 ms
4,376 KB
testcase_13 AC 1 ms
4,380 KB
testcase_14 AC 1 ms
4,380 KB
testcase_15 AC 1 ms
4,376 KB
testcase_16 AC 1 ms
4,376 KB
testcase_17 AC 1 ms
4,376 KB
testcase_18 AC 1 ms
4,384 KB
testcase_19 AC 1 ms
4,376 KB
testcase_20 AC 0 ms
4,380 KB
testcase_21 AC 1 ms
4,380 KB
testcase_22 AC 1 ms
4,380 KB
testcase_23 AC 2 ms
4,380 KB
testcase_24 AC 3 ms
4,376 KB
testcase_25 AC 1 ms
4,380 KB
testcase_26 AC 1 ms
4,376 KB
testcase_27 AC 1 ms
4,376 KB
testcase_28 AC 1 ms
4,380 KB
testcase_29 AC 1 ms
4,380 KB
testcase_30 AC 1 ms
4,380 KB
testcase_31 AC 1 ms
4,380 KB
testcase_32 AC 1 ms
4,380 KB
testcase_33 AC 1 ms
4,376 KB
testcase_34 AC 1 ms
4,376 KB
testcase_35 AC 1 ms
4,380 KB
testcase_36 AC 1 ms
4,376 KB
testcase_37 AC 1 ms
4,376 KB
testcase_38 AC 1 ms
4,380 KB
testcase_39 AC 1 ms
4,376 KB
testcase_40 AC 1 ms
4,380 KB
testcase_41 AC 1 ms
4,376 KB
testcase_42 AC 1 ms
4,376 KB
testcase_43 AC 1 ms
4,376 KB
testcase_44 AC 1 ms
4,376 KB
04_evil_A_01 RE -
04_evil_A_02 RE -
04_evil_A_03 RE -
04_evil_A_04 RE -
04_evil_A_05 RE -
04_evil_A_06 RE -
04_evil_A_07 RE -
04_evil_A_08 RE -
04_evil_A_09 RE -
04_evil_A_10 RE -
05_evil_B_01 RE -
05_evil_B_02 RE -
05_evil_B_03 RE -
05_evil_B_04 RE -
05_evil_B_05 RE -
05_evil_B_06 RE -
05_evil_B_07 RE -
05_evil_B_08 RE -
05_evil_B_09 RE -
05_evil_B_10 RE -
06_evil_C_01 RE -
06_evil_C_02 RE -
06_evil_C_03 RE -
06_evil_C_04 RE -
06_evil_C_05 RE -
06_evil_C_06 RE -
06_evil_C_07 RE -
06_evil_C_08 RE -
06_evil_C_09 RE -
06_evil_C_10 AC 1 ms
4,380 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c: 関数 ‘main’ 内:
main.c:4:9: 警告: 関数 ‘scanf’ の暗黙的な宣言です [-Wimplicit-function-declaration]
    4 |         scanf("%d%d%d%d",&N,&K,&X,&Y);
      |         ^~~~~
main.c:1:1: 備考: include ‘<stdio.h>’ or provide a declaration of ‘scanf’
  +++ |+#include <stdio.h>
    1 | int N,K,M,X,Y,A[1024],B[1024],i,j,k;
main.c:4:9: 警告: 組み込み関数 ‘scanf’ の互換性がない暗黙的な宣言です [-Wbuiltin-declaration-mismatch]
    4 |         scanf("%d%d%d%d",&N,&K,&X,&Y);
      |         ^~~~~
main.c:4:9: 備考: include ‘<stdio.h>’ or provide a declaration of ‘scanf’
main.c:28:9: 警告: 関数 ‘printf’ の暗黙的な宣言です [-Wimplicit-function-declaration]
   28 |         printf("%ld\n",z%998244353);
      |         ^~~~~~
main.c:28:9: 備考: include ‘<stdio.h>’ or provide a declaration of ‘printf’
main.c:28:9: 警告: 組み込み関数 ‘printf’ の互換性がない暗黙的な宣言です [-Wbuiltin-declaration-mismatch]
main.c:28:9: 備考: include ‘<stdio.h>’ or provide a declaration of ‘printf’

ソースコード

diff #

int N,K,M,X,Y,A[1024],B[1024],i,j,k;
long d[40][1024],z;
int main(){
	scanf("%d%d%d%d",&N,&K,&X,&Y);
	for(;K--;){
		int k;scanf("%d",&k);
		if(!B[k]++){
			A[M++]=k;
		}
	}
	for(i=M;i--;){
		++d[0][A[i]];
		for(j=M;j--;)if(j!=i){
			++d[1][A[i]^A[j]];
		}
	}
	for(i=2;i<N;++i){
		for(j=1024;j--;){
			for(k=M;k--;){
				d[i][j^A[k]]+=d[i-1][j];
			}
			d[i][j]-=d[i-2][j]*(M-1);
		}
	}
	for(i=Y<1023?Y:1023;i>=X;--i){
		z+=d[N-1][i];
	}
	printf("%ld\n",z%998244353);
	return 0;
}
0