結果

問題 No.851 テストケース
ユーザー 👑 nullnull
提出日時 2019-07-26 21:48:58
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 1,167 bytes
コンパイル時間 418 ms
コンパイル使用メモリ 59,888 KB
実行使用メモリ 4,384 KB
最終ジャッジ日時 2023-09-15 01:06:23
合計ジャッジ時間 1,429 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

/*
このコード、と~おれ!
Be accepted!
  ∧_∧ 
(。・ω・。)つ━☆・*。
⊂   ノ    ・゜+.
 しーJ   °。+ *´¨)
         .· ´¸.·*´¨) ¸.·*¨)
          (¸.·´ (¸.·'* ☆
*/

#define rep(i, n) for(int i = 0; i < (n); ++i)
#define repr(i, n) for(int i = n; i >= 0; --i)
#define printyn(a) printf(a ? "Yes\n" : "No\n")
#define printYN(a) printf(a ? "YES\n" : "NO\n")
#define printfin(a) printf(a ? "possible\n" : "inposible\n")
#define all(x) (x).begin(), (x).end()
using ll = long long;

//マクロとかここまで

#include <stdio.h>
#include <algorithm>
#include <string>
#include <cmath>
#include <cstring>
#include <vector>

using namespace std;

int main() {

	int n, a[3], suma[3], count = 0, ans;
	char c;
	scanf("%d", &n);

	scanf("%d%c", &a[0], &c);
	if (c == ' ') {
		printf("\"assert\"\n");
		return 0;
	}
	scanf("%d%d" ,&a[1], &a[2]);
	rep(i, 3) {
		for (int j = i + 1; j < 3; ++j) {
			suma[count] = a[i] + a[j];
				++count;
		}
	}
	sort(suma, suma + 3);
	if (suma[2] != suma[1])ans = suma[1];
	else ans = suma[0];
	printf("%d\n", ans);
	return 0;
}
0