提出 #481075


ソースコード 拡げる


//----------------------------------------------------------------------------------------------------------------------
#include <iostream>
#include <cmath>
#include <algorithm>
#include <cassert>
#include <cstdlib>
#include <cstring>
#include <string>
#include <iomanip>
#include <fstream>
#include <cctype>
#include <utility>
#include <vector>
#include <unordered_map>
#include <map>
#include <set>
#include <cctype>
#include <queue>
#include <stack>

using namespace std;

//-------------------------------------------  Local Read and Write Setting---------------------------------------------


//----------------------------------------- Default Definitions Part   -------------------------------------------------

#define ll long long int
#define SP " "
#define CO1(a) cout << (a) << endl;
#define CO2(a, b) cout << (a) << SP << (b) << endl;
#define CO3(a, b, c) cout << (a) << SP << (b) << SP << (c) << endl;
#define FOR(ii, m, n) for(int ii = m; ii < n; ++ii)
#define REP(ii, n) FOR(ii, 0, n)
#define FORD(ii, m, n) for(int ii = m; ii >= n; --ii)
#define REPD(ii, m) FORD(ii, m, 0)
#define PB push_back
#define MP(a, b) make_pair((a), (b))

#define IFNUL(a) if((a) == NULL)
#define IFNNUL(a) if((a) != NULL)


//----------------------------------------------------------------------------------------------------------------------





//-----------------------------------------  Main function  ------------------------------------------------------------
int main() {
    //TODO insert content
    int a, b, c, d, e;
    int x, y, z, k;
    while(cin >> a >> b >> c >> d >> e){
        x = e + d + a;
        y = c + d + b;
        z = c + e + b;
        k = max(x, y);
        k = max(k, z);
        cout << k << endl;
    }




    return EXIT_SUCCESS;
}
//----------------------------------------------------------------------------------------------------------------------

提出情報

提出日時
問題 C - 数を3つ選ぶマン
ユーザ cilam
言語 C++11 (GCC 4.9.2)
得点 100
コード長 1961 Byte
結果 AC
実行時間 32 ms
メモリ 924 KiB

ジャッジ結果

セット名 Sample All
得点 / 配点 0 / 0 100 / 100
結果
AC × 2
AC × 15
セット名 テストケース
Sample example_0.txt, example_1.txt
All example_0.txt, example_1.txt, handmade_0.txt, handmade_1.txt, handmade_2.txt, handmade_3.txt, handmade_4.txt, handmade_5.txt, random_0.txt, random_1.txt, random_2.txt, random_3.txt, random_4.txt, example_0.txt, example_1.txt
ケース名 結果 実行時間 メモリ
example_0.txt AC 28 ms 924 KiB
example_1.txt AC 27 ms 796 KiB
handmade_0.txt AC 27 ms 748 KiB
handmade_1.txt AC 26 ms 792 KiB
handmade_2.txt AC 26 ms 804 KiB
handmade_3.txt AC 27 ms 796 KiB
handmade_4.txt AC 26 ms 920 KiB
handmade_5.txt AC 28 ms 804 KiB
random_0.txt AC 28 ms 804 KiB
random_1.txt AC 29 ms 736 KiB
random_2.txt AC 32 ms 796 KiB
random_3.txt AC 26 ms 920 KiB
random_4.txt AC 27 ms 672 KiB