結果
| 問題 | No.851 テストケース |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-03-28 10:36:04 |
| 言語 | C++17 (gcc 15.2.0 + boost 1.90.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 3,153 ms |
| コード長 | 596 bytes |
| 記録 | |
| コンパイル時間 | 2,903 ms |
| コンパイル使用メモリ | 281,560 KB |
| 実行使用メモリ | 6,528 KB |
| 最終ジャッジ日時 | 2026-07-04 06:44:52 |
| 合計ジャッジ時間 | 3,980 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 20 |
ソースコード
#include <bits/stdc++.h>
#include <atcoder/all>
using namespace std;
using namespace atcoder;
using ll = long long;
using ld = long double;
int main() {
int N; cin >> N;
string dummy; getline(cin, dummy);
ll a[3];
int i = 0;
string num;
while (i < 3) {
getline(cin, num);
if (num.find(' ') != -1) {
cout << "\"assert\"" << endl;
return 0;
}
a[i] = stoll(num);
i++;
}
set<ll> ans;
for (int i = 0; i < 3; i++) {
for (int j = i + 1; j < 3; j++) {
ans.insert(a[i] + a[j]);
}
}
cout << *prev(prev(ans.end())) << endl;
return 0;
}