結果

問題 No.851 テストケース
ユーザー KuraKura
提出日時 2019-08-16 20:13:24
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 2 ms / 3,153 ms
コード長 1,112 bytes
コンパイル時間 713 ms
コンパイル使用メモリ 85,928 KB
実行使用メモリ 4,348 KB
最終ジャッジ日時 2023-10-23 20:13:23
合計ジャッジ時間 2,644 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,348 KB
testcase_01 AC 2 ms
4,348 KB
testcase_02 AC 2 ms
4,348 KB
testcase_03 AC 2 ms
4,348 KB
testcase_04 AC 2 ms
4,348 KB
testcase_05 AC 2 ms
4,348 KB
testcase_06 AC 2 ms
4,348 KB
testcase_07 AC 2 ms
4,348 KB
testcase_08 AC 2 ms
4,348 KB
testcase_09 AC 2 ms
4,348 KB
testcase_10 AC 2 ms
4,348 KB
testcase_11 AC 2 ms
4,348 KB
testcase_12 AC 2 ms
4,348 KB
testcase_13 AC 1 ms
4,348 KB
testcase_14 AC 2 ms
4,348 KB
testcase_15 AC 2 ms
4,348 KB
testcase_16 AC 2 ms
4,348 KB
testcase_17 AC 1 ms
4,348 KB
testcase_18 AC 2 ms
4,348 KB
testcase_19 AC 1 ms
4,348 KB
testcase_20 AC 1 ms
4,348 KB
testcase_21 AC 1 ms
4,348 KB
testcase_22 AC 2 ms
4,348 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#define _USE_MATH_DEFINES//M_PI
#include<iostream>
#include<algorithm>
#include<string>
#include<vector>
#include<iomanip>
#include"math.h"
#include<map>
#define llong long long
#define int(s) atoi(s.c_str())
#define dou(s) atof(s.c_str())
#define llo(s) atoll(s.c_str())
#define str(n) to_string(n)
#define rep(i,a,b) for(int i=a;i<b;i++)
#define rrep(i,b,a) for(int i=b;i>=a;i--)
#define all(a) a.begin(),a.end()
#define fion(n) fixed<<setprecision(n)
#define endl '\n'
#define OR ||
#define AND &&
#define NOT !
#define lin(n) scanf("%lld",&n)
#define iin(n) scanf("%d",&n)
#define din(z) scanf("%lf",&z)
#define sin(s) cin>>s
#define input(s) getline(cin,s)
#define START int main
using namespace std;
START() {
	llong a, b, c; string s;
	input(s);
	input(s);
	rep(i,0,s.size()) {
		if (s[i] == ' ') {
			cout << '"' << 'a' << 's' << 's' << 'e' << 'r' << 't' << '"' << endl;
			return 0;
		}
	}
	a = llo(s);
	cin >> b >> c;
	llong n = a + b; a = a + c; b = b + c;
	c = max({ n,a,b });
	if (n == c)n = 0;
	if (a == c)a = 0;
	if (b == c)b = 0;
	cout << max({ n, a, b }) << endl;
}
0