結果
問題 | No.1304 あなたは基本が何か知っていますか?私は知っています. |
ユーザー | 👑 testestest |
提出日時 | 2020-12-02 20:26:28 |
言語 | C (gcc 12.3.0) |
結果 |
AC
|
実行時間 | 855 ms / 2,000 ms |
コード長 | 511 bytes |
コンパイル時間 | 452 ms |
コンパイル使用メモリ | 30,592 KB |
実行使用メモリ | 18,704 KB |
最終ジャッジ日時 | 2024-06-12 14:12:11 |
合計ジャッジ時間 | 62,700 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 6 ms
16,636 KB |
testcase_01 | AC | 6 ms
13,880 KB |
testcase_02 | AC | 243 ms
14,016 KB |
testcase_03 | AC | 836 ms
13,888 KB |
testcase_04 | AC | 855 ms
15,792 KB |
testcase_05 | AC | 298 ms
15,620 KB |
testcase_06 | AC | 843 ms
13,896 KB |
testcase_07 | AC | 387 ms
18,464 KB |
testcase_08 | AC | 138 ms
16,804 KB |
testcase_09 | AC | 450 ms
18,412 KB |
testcase_10 | AC | 52 ms
15,688 KB |
testcase_11 | AC | 183 ms
18,704 KB |
testcase_12 | AC | 490 ms
15,560 KB |
testcase_13 | AC | 128 ms
18,256 KB |
testcase_14 | AC | 495 ms
15,480 KB |
testcase_15 | AC | 110 ms
18,208 KB |
testcase_16 | AC | 588 ms
18,388 KB |
testcase_17 | AC | 649 ms
16,040 KB |
testcase_18 | AC | 427 ms
15,496 KB |
testcase_19 | AC | 210 ms
8,124 KB |
testcase_20 | AC | 58 ms
8,048 KB |
testcase_21 | AC | 121 ms
10,104 KB |
testcase_22 | AC | 673 ms
8,640 KB |
testcase_23 | AC | 704 ms
8,784 KB |
testcase_24 | AC | 352 ms
9,024 KB |
testcase_25 | AC | 294 ms
6,944 KB |
testcase_26 | AC | 50 ms
9,460 KB |
testcase_27 | AC | 387 ms
9,996 KB |
testcase_28 | AC | 136 ms
9,088 KB |
testcase_29 | AC | 448 ms
9,092 KB |
testcase_30 | AC | 49 ms
6,944 KB |
testcase_31 | AC | 179 ms
6,940 KB |
testcase_32 | AC | 494 ms
9,980 KB |
testcase_33 | AC | 125 ms
8,080 KB |
testcase_34 | AC | 503 ms
9,984 KB |
testcase_35 | AC | 24 ms
8,188 KB |
testcase_36 | AC | 139 ms
8,048 KB |
testcase_37 | AC | 552 ms
8,060 KB |
testcase_38 | AC | 402 ms
6,940 KB |
testcase_39 | AC | 95 ms
6,944 KB |
testcase_40 | AC | 694 ms
8,056 KB |
testcase_41 | AC | 828 ms
6,944 KB |
testcase_42 | AC | 476 ms
8,312 KB |
testcase_43 | AC | 579 ms
8,180 KB |
testcase_44 | AC | 513 ms
8,056 KB |
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 | TLE | - |
06_evil_C_01 | MLE | - |
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]
ソースコード
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),b[j]++; for(i=k=0;i<1024;i++)if(b[i])a[k++]=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); }