結果
問題 |
No.851 テストケース
|
ユーザー |
![]() |
提出日時 | 2020-11-13 16:25:18 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 3,153 ms |
コード長 | 600 bytes |
コンパイル時間 | 851 ms |
コンパイル使用メモリ | 76,928 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-22 20:04:09 |
合計ジャッジ時間 | 1,483 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 20 |
ソースコード
#include <iostream> #include <string> #include <vector> #include <algorithm> using namespace std; int main(){ int N; cin >> N; string S; getline(cin, S); getline(cin, S); int M = S.size(); bool ok = true; for (int i = 0; i < M; i++){ if (S[i] == ' '){ ok = false; } } if (!ok){ cout << '"' << "assert" << '"' << endl; } else { long long A1 = stoll(S); long long A2; cin >> A2; long long A3; cin >> A3; vector<long long> A = {A1 + A2, A2 + A3, A3 + A1}; sort(A.begin(), A.end()); A.erase(unique(A.begin(), A.end()), A.end()); cout << A[A.size() - 2] << endl; } }