結果

問題 No.5001 排他的論理和でランニング
ユーザー ミドリムシミドリムシ
提出日時 2018-03-16 22:42:04
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 56 ms / 1,500 ms
コード長 422 bytes
コンパイル時間 599 ms
実行使用メモリ 7,424 KB
スコア 35,088,705
最終ジャッジ日時 2020-03-12 19:25:29
ジャッジサーバーID
(参考情報)
judge8 /
純コード判定しない問題か言語
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 53 ms
5,376 KB
testcase_01 AC 10 ms
5,380 KB
testcase_02 AC 14 ms
5,380 KB
testcase_03 AC 27 ms
5,380 KB
testcase_04 AC 56 ms
5,376 KB
testcase_05 AC 20 ms
5,376 KB
testcase_06 AC 35 ms
5,380 KB
testcase_07 AC 38 ms
5,376 KB
testcase_08 AC 48 ms
5,376 KB
testcase_09 AC 2 ms
5,380 KB
testcase_10 AC 17 ms
5,380 KB
testcase_11 AC 23 ms
5,380 KB
testcase_12 AC 17 ms
5,376 KB
testcase_13 AC 49 ms
5,380 KB
testcase_14 AC 33 ms
5,376 KB
testcase_15 AC 20 ms
6,148 KB
testcase_16 AC 10 ms
5,380 KB
testcase_17 AC 14 ms
5,376 KB
testcase_18 AC 29 ms
5,376 KB
testcase_19 AC 23 ms
5,380 KB
testcase_20 AC 16 ms
5,380 KB
testcase_21 AC 15 ms
5,380 KB
testcase_22 AC 6 ms
5,380 KB
testcase_23 AC 5 ms
5,380 KB
testcase_24 AC 21 ms
5,380 KB
testcase_25 AC 45 ms
5,376 KB
testcase_26 AC 38 ms
5,376 KB
testcase_27 AC 25 ms
5,380 KB
testcase_28 AC 38 ms
5,376 KB
testcase_29 AC 44 ms
6,148 KB
testcase_30 AC 8 ms
7,424 KB
testcase_31 AC 35 ms
5,380 KB
testcase_32 AC 16 ms
5,376 KB
testcase_33 AC 52 ms
5,380 KB
testcase_34 AC 56 ms
5,380 KB
testcase_35 AC 36 ms
5,376 KB
testcase_36 AC 51 ms
5,380 KB
testcase_37 AC 39 ms
5,380 KB
testcase_38 AC 16 ms
5,380 KB
testcase_39 AC 20 ms
5,376 KB
testcase_40 AC 26 ms
5,376 KB
testcase_41 AC 8 ms
5,380 KB
testcase_42 AC 23 ms
5,380 KB
testcase_43 AC 26 ms
5,376 KB
testcase_44 AC 45 ms
5,376 KB
testcase_45 AC 48 ms
5,380 KB
testcase_46 AC 48 ms
5,384 KB
testcase_47 AC 23 ms
5,380 KB
testcase_48 AC 17 ms
5,376 KB
testcase_49 AC 42 ms
5,380 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <algorithm>
#include <vector>
#include <random>
using namespace std;

random_device rnd;

int main(){
    int N, M;
    cin >> N >> M;
    int nums[N];
    for(int i = 0; i < N; i++){
        cin >> nums[i];
    }
    sort(nums, nums + N);
    int ans = nums[N - 1];
    cout << nums[N - 1] << " ";
    for(int i = 0; i < M - 1; i++){
        cout << nums[i] << " ";
    }
    cout << endl;
}
0