結果
| 問題 |
No.851 テストケース
|
| コンテスト | |
| ユーザー |
SSRS
|
| 提出日時 | 2020-11-13 16:24:44 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 590 bytes |
| コンパイル時間 | 755 ms |
| コンパイル使用メモリ | 76,552 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-07-22 20:04:07 |
| 合計ジャッジ時間 | 1,566 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 WA * 1 |
| other | AC * 18 WA * 2 |
ソースコード
#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;
}
}
SSRS