結果

問題 No.1304 あなたは基本が何か知っていますか?私は知っています.
ユーザー KKT89KKT89
提出日時 2020-12-02 00:45:33
言語 C
(gcc 12.3.0)
結果
AC  
実行時間 34 ms / 2,000 ms
コード長 495 bytes
コンパイル時間 395 ms
コンパイル使用メモリ 30,336 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-06-12 13:36:00
合計ジャッジ時間 5,601 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 3 ms
5,248 KB
testcase_01 AC 6 ms
5,376 KB
testcase_02 AC 3 ms
5,376 KB
testcase_03 AC 34 ms
5,376 KB
testcase_04 AC 3 ms
5,376 KB
testcase_05 AC 3 ms
5,376 KB
testcase_06 AC 3 ms
5,376 KB
testcase_07 AC 4 ms
5,376 KB
testcase_08 AC 8 ms
5,376 KB
testcase_09 AC 4 ms
5,376 KB
testcase_10 AC 3 ms
5,376 KB
testcase_11 AC 3 ms
5,376 KB
testcase_12 AC 3 ms
5,376 KB
testcase_13 AC 3 ms
5,376 KB
testcase_14 AC 3 ms
5,376 KB
testcase_15 AC 3 ms
5,376 KB
testcase_16 AC 3 ms
5,376 KB
testcase_17 AC 5 ms
5,376 KB
testcase_18 AC 3 ms
5,376 KB
testcase_19 AC 3 ms
5,376 KB
testcase_20 AC 3 ms
5,376 KB
testcase_21 AC 5 ms
5,376 KB
testcase_22 AC 3 ms
5,376 KB
testcase_23 AC 3 ms
5,376 KB
testcase_24 AC 3 ms
5,376 KB
testcase_25 AC 15 ms
5,376 KB
testcase_26 AC 8 ms
5,376 KB
testcase_27 AC 8 ms
5,376 KB
testcase_28 AC 10 ms
5,376 KB
testcase_29 AC 7 ms
5,376 KB
testcase_30 AC 12 ms
5,376 KB
testcase_31 AC 18 ms
5,376 KB
testcase_32 AC 7 ms
5,376 KB
testcase_33 AC 15 ms
5,376 KB
testcase_34 AC 7 ms
5,376 KB
testcase_35 AC 11 ms
5,376 KB
testcase_36 AC 16 ms
5,376 KB
testcase_37 AC 11 ms
5,376 KB
testcase_38 AC 12 ms
5,376 KB
testcase_39 AC 20 ms
5,376 KB
testcase_40 AC 11 ms
5,376 KB
testcase_41 AC 21 ms
5,376 KB
testcase_42 AC 12 ms
5,376 KB
testcase_43 AC 11 ms
5,376 KB
testcase_44 AC 16 ms
5,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 2 ms
5,376 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
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: warning: type defaults to 'int' in declaration of 'n' [-Wimplicit-int]
main.c:2:3: warning: type defaults to 'int' in declaration of 'k' [-Wimplicit-int]
    2 | n,k,m,x,y,a,i,j,l;
      |   ^
main.c:2:5: warning: type defaults to 'int' in declaration of 'm' [-Wimplicit-int]
    2 | n,k,m,x,y,a,i,j,l;
      |     ^
main.c:2:7: warning: type defaults to 'int' in declaration of 'x' [-Wimplicit-int]
    2 | n,k,m,x,y,a,i,j,l;
      |       ^
main.c:2:9: warning: type defaults to 'int' in declaration of 'y' [-Wimplicit-int]
    2 | n,k,m,x,y,a,i,j,l;
      |         ^
main.c:2:11: warning: type defaults to 'int' in declaration of 'a' [-Wimplicit-int]
    2 | n,k,m,x,y,a,i,j,l;
      |           ^
main.c:2:13: warning: type defaults to 'int' in declaration of 'i' [-Wimplicit-int]
    2 | n,k,m,x,y,a,i,j,l;
      |             ^
main.c:2:15: warning: type defaults to 'int' in declaration of 'j' [-Wimplicit-int]
    2 | n,k,m,x,y,a,i,j,l;
      |               ^
main.c:2:17: warning: 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: warning: 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: warning: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   22 |     printf("%d",r%M);
      |     ^~~~~~
main.c:22:5: note: include '<stdio.h>'

ソースコード

diff #

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);
}
0