結果
問題 |
No.851 テストケース
|
ユーザー |
![]() |
提出日時 | 2020-08-28 08:16:57 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
RE
|
実行時間 | - |
コード長 | 588 bytes |
コンパイル時間 | 1,612 ms |
コンパイル使用メモリ | 79,892 KB |
最終ジャッジ日時 | 2025-01-13 15:56:38 |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 1 RE * 2 |
other | AC * 1 WA * 18 RE * 1 |
ソースコード
#include <iostream> #include <string> #include <vector> #include <algorithm> using namespace std; int main(){ int N; cin >> N; char c; cin >> c; string 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; } }