結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 AC 1 ms
4,380 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 AC 1 ms
4,376 KB
testcase_20 AC 2 ms
4,376 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[6], count = 0;
	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 + 6);
	repr(i, 5){
		if (suma[i] != suma[4]) {
			printf("%d\n", suma[i]);
			return 0;
		}
	}

	return 0;
}
0