結果

問題 No.5001 排他的論理和でランニング
ユーザー maimai
提出日時 2018-05-24 23:41:55
言語 cLay
(20240104-1)
結果
WA  
実行時間 -
コード長 623 bytes
コンパイル時間 1,642 ms
実行使用メモリ 7,024 KB
スコア 10,235,035
最終ジャッジ日時 2021-09-25 19:04:13
合計ジャッジ時間 25,875 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 RE -
testcase_02 RE -
testcase_03 AC 432 ms
7,020 KB
testcase_04 AC 436 ms
5,108 KB
testcase_05 AC 429 ms
4,976 KB
testcase_06 RE -
testcase_07 RE -
testcase_08 AC 437 ms
7,020 KB
testcase_09 AC 429 ms
4,976 KB
testcase_10 AC 429 ms
4,972 KB
testcase_11 AC 432 ms
7,024 KB
testcase_12 RE -
testcase_13 AC 438 ms
7,024 KB
testcase_14 AC 429 ms
7,020 KB
testcase_15 AC 427 ms
7,024 KB
testcase_16 WA -
testcase_17 AC 434 ms
4,976 KB
testcase_18 AC 436 ms
4,976 KB
testcase_19 RE -
testcase_20 WA -
testcase_21 AC 423 ms
7,020 KB
testcase_22 RE -
testcase_23 RE -
testcase_24 RE -
testcase_25 RE -
testcase_26 RE -
testcase_27 RE -
testcase_28 RE -
testcase_29 RE -
testcase_30 AC 431 ms
7,024 KB
testcase_31 AC 433 ms
4,972 KB
testcase_32 AC 429 ms
4,972 KB
testcase_33 AC 433 ms
5,332 KB
testcase_34 AC 435 ms
5,280 KB
testcase_35 WA -
testcase_36 WA -
testcase_37 RE -
testcase_38 WA -
testcase_39 AC 428 ms
4,972 KB
testcase_40 WA -
testcase_41 AC 427 ms
7,024 KB
testcase_42 AC 427 ms
4,972 KB
testcase_43 AC 423 ms
4,972 KB
testcase_44 RE -
testcase_45 WA -
testcase_46 RE -
testcase_47 WA -
testcase_48 WA -
testcase_49 AC 439 ms
4,976 KB
権限があれば一括ダウンロードができます

ソースコード

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(_,8000100){
        int j = rand(0,M-1);
        int k = rand(0,N-M-1);
        x ^= A[used[j]];
        x ^= A[unused[k]];
        swap(used[j],used[k]);
        if (x > best){
            best = x;
            if (_ > N/10){
                ans = used;
            }
        }
    }
    REP(i,M)
        wtSp(A[ans[i]]);
}
0