結果
| 問題 |
No.851 テストケース
|
| コンテスト | |
| ユーザー |
SSRS
|
| 提出日時 | 2020-08-28 08:06:40 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 510 bytes |
| コンパイル時間 | 848 ms |
| コンパイル使用メモリ | 79,156 KB |
| 最終ジャッジ日時 | 2025-01-13 15:56:32 |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | RE * 3 |
| other | RE * 20 |
ソースコード
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
using namespace std;
int main(){
int N;
cin >> N;
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, A3};
sort(A.begin(), A.end());
cout << A.back() + A.front() << endl;
}
}
SSRS