結果

問題 No.5001 排他的論理和でランニング
ユーザー maimai
提出日時 2018-05-24 23:25:57
言語 cLay
(20240104-1)
結果
RE  
実行時間 -
コード長 591 bytes
コンパイル時間 1,642 ms
実行使用メモリ 7,028 KB
スコア 15,126,743
最終ジャッジ日時 2021-09-25 19:03:49
合計ジャッジ時間 14,499 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 60 ms
7,020 KB
testcase_01 AC 57 ms
4,976 KB
testcase_02 AC 57 ms
7,020 KB
testcase_03 AC 58 ms
4,976 KB
testcase_04 AC 61 ms
5,164 KB
testcase_05 RE -
testcase_06 AC 58 ms
7,020 KB
testcase_07 RE -
testcase_08 RE -
testcase_09 RE -
testcase_10 AC 57 ms
4,976 KB
testcase_11 RE -
testcase_12 AC 58 ms
7,020 KB
testcase_13 RE -
testcase_14 RE -
testcase_15 RE -
testcase_16 AC 57 ms
4,980 KB
testcase_17 AC 57 ms
7,024 KB
testcase_18 RE -
testcase_19 RE -
testcase_20 RE -
testcase_21 AC 57 ms
4,976 KB
testcase_22 AC 56 ms
7,024 KB
testcase_23 AC 56 ms
4,972 KB
testcase_24 AC 57 ms
7,020 KB
testcase_25 AC 58 ms
4,972 KB
testcase_26 RE -
testcase_27 AC 57 ms
4,976 KB
testcase_28 AC 60 ms
4,972 KB
testcase_29 RE -
testcase_30 AC 56 ms
4,972 KB
testcase_31 AC 59 ms
4,976 KB
testcase_32 RE -
testcase_33 RE -
testcase_34 RE -
testcase_35 AC 59 ms
4,976 KB
testcase_36 AC 61 ms
7,024 KB
testcase_37 RE -
testcase_38 RE -
testcase_39 RE -
testcase_40 AC 56 ms
7,024 KB
testcase_41 AC 57 ms
7,020 KB
testcase_42 RE -
testcase_43 RE -
testcase_44 RE -
testcase_45 AC 60 ms
5,072 KB
testcase_46 AC 60 ms
4,976 KB
testcase_47 AC 58 ms
4,972 KB
testcase_48 RE -
testcase_49 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

mt19937_64 randdev(8901016);
inline int rand(int l, int h) { return uniform_int_distribution<int>(l, h)(randdev); }


int N,M,A[100010];
int x,best;
vector<int> used,unused,ans;

{
    rd(N,M,A(N));
    REP(i,M) x ^= A[N-i-1], used.push_back(N-i-1);
    REP(i,N-M) unused.push_back(i);
    
    REP(_,1000100){
        int j = rand(0,M-1);
        int k = rand(0,N-1);
        x ^= A[used[j]];
        x ^= A[unused[k]];
        if (x > best){
            best = x;
            if (_ > N/10){
                ans = used;
            }
        }
    }
    REP(i,M)
        wtSp(A[ans[i]]);
}
0