結果
問題 |
No.1816 MUL-DIV Game
|
ユーザー |
![]() |
提出日時 | 2022-01-21 23:11:26 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 431 bytes |
コンパイル時間 | 5,100 ms |
コンパイル使用メモリ | 230,828 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-26 02:40:09 |
合計ジャッジ時間 | 5,627 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 WA * 1 |
other | AC * 9 WA * 18 |
ソースコード
#include<bits/stdc++.h> #include<atcoder/all> #define fi first #define se second #define eb emplace_back using namespace std; using namespace atcoder; using ll = long long; int main() { int N; cin >> N; vector<ll> A(N); for (int i = 0; i < N; ++i) cin >> A[i]; sort(A.begin(), A.end()); if (N == 1) cout << A[0] << endl; else if (N % 2) cout << 1 << endl; else cout << A[0] << endl; return 0; }