結果

問題 No.1816 MUL-DIV Game
ユーザー asaringoasaringo
提出日時 2022-01-22 02:17:38
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 767 bytes
コンパイル時間 2,193 ms
コンパイル使用メモリ 167,140 KB
実行使用メモリ 4,384 KB
最終ジャッジ日時 2023-08-17 14:09:57
合計ジャッジ時間 4,033 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,384 KB
testcase_01 AC 2 ms
4,380 KB
testcase_02 AC 1 ms
4,380 KB
testcase_03 AC 2 ms
4,376 KB
testcase_04 AC 1 ms
4,376 KB
testcase_05 AC 1 ms
4,376 KB
testcase_06 AC 1 ms
4,376 KB
testcase_07 AC 2 ms
4,380 KB
testcase_08 AC 1 ms
4,376 KB
testcase_09 AC 5 ms
4,380 KB
testcase_10 AC 18 ms
4,380 KB
testcase_11 AC 16 ms
4,380 KB
testcase_12 AC 13 ms
4,380 KB
testcase_13 AC 28 ms
4,376 KB
testcase_14 AC 16 ms
4,376 KB
testcase_15 AC 21 ms
4,376 KB
testcase_16 AC 6 ms
4,376 KB
testcase_17 AC 38 ms
4,380 KB
testcase_18 AC 35 ms
4,380 KB
testcase_19 AC 19 ms
4,376 KB
testcase_20 AC 39 ms
4,380 KB
testcase_21 AC 15 ms
4,376 KB
testcase_22 AC 11 ms
4,380 KB
testcase_23 WA -
testcase_24 WA -
testcase_25 AC 46 ms
4,384 KB
testcase_26 AC 39 ms
4,376 KB
testcase_27 AC 45 ms
4,380 KB
testcase_28 AC 39 ms
4,380 KB
testcase_29 AC 46 ms
4,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std ;
typedef long long ll ;
typedef long double ld ;
typedef pair<ll,ll> P ;
typedef tuple<bool,ll,ll,ll> TP ;
#define chmin(a,b) a = min(a,b)
#define chmax(a,b) a = max(a,b)
#define bit_count(x) __builtin_popcountll(x)
#define gcd(a,b) __gcd(a,b)
#define lcm(a,b) a / gcd(a,b) * b
#define rep(i,n) for(int i = 0 ; i < n ; i++)
#define rrep(i,a,b) for(int i = a ; i < b ; i++)
#define endl "\n"

int n ;
ll A[101010] ;

int main(){
    cin >> n ;
    rep(i,n) cin >> A[i] ;
    if(n % 2 == 1){
        if(n >= 2) cout << 1 << endl ;
        if(n == 1) cout << A[0] << endl ;
        return 0 ;
    }
    if(n == 2){
        cout << A[0] * A[1] << endl ;
        return 0 ;
    }
    sort(A,A+n) ;
    cout << A[2] << endl ;
}
0