結果

問題 No.1304 あなたは基本が何か知っていますか?私は知っています.
ユーザー tempura_pptempura_pp
提出日時 2020-12-01 03:48:24
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
TLE  
実行時間 -
コード長 483 bytes
コンパイル時間 2,263 ms
コンパイル使用メモリ 202,820 KB
実行使用メモリ 7,640 KB
最終ジャッジ日時 2023-09-03 03:16:36
合計ジャッジ時間 12,345 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
7,600 KB
testcase_01 AC 2 ms
4,380 KB
testcase_02 AC 2 ms
4,380 KB
testcase_03 AC 1 ms
4,380 KB
testcase_04 AC 11 ms
4,384 KB
testcase_05 AC 3 ms
4,376 KB
testcase_06 AC 1 ms
4,376 KB
testcase_07 AC 7 ms
4,380 KB
testcase_08 TLE -
testcase_09 AC 6 ms
4,380 KB
testcase_10 AC 4 ms
4,376 KB
testcase_11 AC 7 ms
4,380 KB
testcase_12 AC 5 ms
4,376 KB
testcase_13 AC 3 ms
4,380 KB
testcase_14 AC 4 ms
4,376 KB
testcase_15 AC 3 ms
4,380 KB
testcase_16 AC 4 ms
4,384 KB
testcase_17 AC 52 ms
4,380 KB
testcase_18 AC 4 ms
4,380 KB
testcase_19 AC 2 ms
4,380 KB
testcase_20 AC 1 ms
4,380 KB
testcase_21 TLE -
testcase_22 AC 5 ms
4,380 KB
testcase_23 AC 6 ms
4,380 KB
testcase_24 AC 12 ms
4,380 KB
testcase_25 AC 217 ms
4,376 KB
testcase_26 AC 988 ms
4,376 KB
testcase_27 TLE -
testcase_28 -- -
testcase_29 -- -
testcase_30 -- -
testcase_31 -- -
testcase_32 -- -
testcase_33 -- -
testcase_34 -- -
testcase_35 -- -
testcase_36 -- -
testcase_37 -- -
testcase_38 -- -
testcase_39 -- -
testcase_40 -- -
testcase_41 -- -
testcase_42 -- -
testcase_43 -- -
testcase_44 -- -
04_evil_A_01 -- -
04_evil_A_02 -- -
04_evil_A_03 -- -
04_evil_A_04 -- -
04_evil_A_05 -- -
04_evil_A_06 -- -
04_evil_A_07 -- -
04_evil_A_08 -- -
04_evil_A_09 -- -
04_evil_A_10 -- -
05_evil_B_01 -- -
05_evil_B_02 -- -
05_evil_B_03 -- -
05_evil_B_04 -- -
05_evil_B_05 -- -
05_evil_B_06 -- -
05_evil_B_07 -- -
05_evil_B_08 -- -
05_evil_B_09 -- -
05_evil_B_10 -- -
06_evil_C_01 -- -
06_evil_C_02 -- -
06_evil_C_03 -- -
06_evil_C_04 -- -
06_evil_C_05 -- -
06_evil_C_06 -- -
06_evil_C_07 -- -
06_evil_C_08 -- -
06_evil_C_09 -- -
06_evil_C_10 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
using namespace std;
#define REP(i,m,n) for(int i=(int)(m) ; i < (int) (n) ; ++i )
#define rep(i,n) REP(i,0,n)

int n, k, x, y, ans;
set<int> a;
void dfs(int num, int val, int pre) {
    if(num == n){
        ans += x<= val && val <= y;
        return;
    }
    for(auto e:a){
        if(e!=pre)dfs(num+1,val^e,e);
    }
}
int main(){
    cin>>n>>k>>x>>y;
    rep(i,k){
        int p;cin>>p;
        a.insert(p);
    }
    dfs(0,0,-1);
    cout<<ans<<endl;
}
0