結果

問題 No.1208 anti primenumber game
ユーザー 夜
提出日時 2020-10-01 03:43:03
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 805 bytes
コンパイル時間 930 ms
コンパイル使用メモリ 94,164 KB
実行使用メモリ 5,200 KB
最終ジャッジ日時 2023-09-21 01:00:38
合計ジャッジ時間 6,762 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,380 KB
testcase_01 AC 1 ms
4,380 KB
testcase_02 AC 1 ms
4,376 KB
testcase_03 WA -
testcase_04 AC 2 ms
4,376 KB
testcase_05 AC 1 ms
4,380 KB
testcase_06 AC 2 ms
4,376 KB
testcase_07 WA -
testcase_08 AC 1 ms
4,376 KB
testcase_09 AC 1 ms
4,376 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 AC 1 ms
4,380 KB
testcase_14 AC 2 ms
4,380 KB
testcase_15 AC 32 ms
4,892 KB
testcase_16 AC 33 ms
4,888 KB
testcase_17 WA -
testcase_18 AC 33 ms
4,884 KB
testcase_19 AC 32 ms
4,884 KB
testcase_20 AC 33 ms
4,896 KB
testcase_21 WA -
testcase_22 AC 37 ms
5,176 KB
testcase_23 AC 34 ms
5,000 KB
testcase_24 WA -
testcase_25 WA -
testcase_26 AC 109 ms
4,948 KB
testcase_27 AC 109 ms
4,868 KB
testcase_28 AC 110 ms
4,896 KB
testcase_29 AC 109 ms
4,888 KB
testcase_30 WA -
testcase_31 WA -
testcase_32 AC 33 ms
4,972 KB
testcase_33 AC 34 ms
4,872 KB
testcase_34 WA -
testcase_35 AC 32 ms
4,884 KB
testcase_36 WA -
testcase_37 WA -
testcase_38 WA -
testcase_39 AC 87 ms
4,892 KB
testcase_40 AC 107 ms
5,052 KB
testcase_41 AC 40 ms
4,960 KB
testcase_42 AC 41 ms
4,888 KB
testcase_43 WA -
testcase_44 AC 40 ms
5,060 KB
testcase_45 WA -
testcase_46 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <string>
#include <algorithm>
#include <vector>
#include <iomanip>
#include <cmath>
#include <stdio.h>
#include <queue>
#include <deque>
#include <cstdio>
#include <set>
#include <map>
#include <bitset>
#include <stack>
#include <cctype>
using namespace std;
long long a[200020];
int main() {
    long long n, m;
    cin >> n >> m;
    for (int i = 0; i < n; i++) {
        cin >> a[i];
    }
    long long f = 0, s = 0;
    sort(a, a + n);
    for (int i = n - 1; i >= 0; i--) {
        if ((n - i) % 2 == 1) {
            f += a[i] - 1;
        }
        else {
            s += a[i] - 1;
        }
    }
    f -= (n + 1) / 2 * m;
    s -= n / 2 * m;
    if (f > s) {
        cout << "First" << endl;
    }
    else {
        cout << "Second" << endl;
    }
    return 0;
}
0