結果

問題 No.1304 あなたは基本が何か知っていますか?私は知っています.
ユーザー 👑 testestesttestestest
提出日時 2020-12-02 20:23:52
言語 C
(gcc 12.3.0)
結果
WA  
実行時間 -
コード長 514 bytes
コンパイル時間 251 ms
コンパイル使用メモリ 30,592 KB
実行使用メモリ 13,892 KB
最終ジャッジ日時 2024-06-12 14:09:43
合計ジャッジ時間 57,967 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 AC 255 ms
13,888 KB
testcase_03 AC 868 ms
9,504 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 WA -
testcase_29 WA -
testcase_30 AC 52 ms
6,940 KB
testcase_31 AC 187 ms
6,944 KB
testcase_32 WA -
testcase_33 WA -
testcase_34 WA -
testcase_35 WA -
testcase_36 WA -
testcase_37 WA -
testcase_38 AC 417 ms
6,944 KB
testcase_39 AC 98 ms
6,940 KB
testcase_40 WA -
testcase_41 WA -
testcase_42 WA -
testcase_43 WA -
testcase_44 WA -
04_evil_A_01 WA -
04_evil_A_02 WA -
04_evil_A_03 WA -
04_evil_A_04 WA -
04_evil_A_05 WA -
04_evil_A_06 WA -
04_evil_A_07 WA -
04_evil_A_08 WA -
04_evil_A_09 WA -
04_evil_A_10 WA -
05_evil_B_01 TLE -
05_evil_B_02 TLE -
05_evil_B_03 TLE -
05_evil_B_04 TLE -
05_evil_B_05 TLE -
05_evil_B_06 TLE -
05_evil_B_07 TLE -
05_evil_B_08 TLE -
05_evil_B_09 TLE -
05_evil_B_10 WA -
06_evil_C_01 WA -
06_evil_C_02 MLE -
06_evil_C_03 MLE -
06_evil_C_04 MLE -
06_evil_C_05 MLE -
06_evil_C_06 MLE -
06_evil_C_07 MLE -
06_evil_C_08 MLE -
06_evil_C_09 MLE -
06_evil_C_10 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
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]

ソースコード

diff #

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);
	for(i=0;i<1024;i++)for(j=0;j<1024;j++)sum[i]+=dp[i][j];
	for(i=0;i<1024;i++)for(j=0;j<1024;j++)if((i^j)>=x&(i^j)<=y){
		ans+=sum[i]*sum[j];
		for(q=0;q<1024;q++)ans-=dp[i][q]*dp[j][q];
	}
	printf("%d",ans%998244353);
}
0