結果

問題 No.570 3人兄弟(その1)
コンテスト
ユーザー hanorver
提出日時 2017-11-25 11:10:40
言語 C++14
(gcc 15.3.0 + boost 1.92.0 + ACL)
コンパイル:
g++-15 -O2 -lm -std=c++14 -Wuninitialized -DONLINE_JUDGE -o a.out _filename_
実行:
./a.out
結果
AC  
実行時間 1 ms / 2,000 ms
+ 366µs
コード長 711 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 411 ms
コンパイル使用メモリ 97,804 KB
実行使用メモリ 9,820 KB
最終ジャッジ日時 2026-09-30 18:49:53
合計ジャッジ時間 1,953 ms
ジャッジサーバーID
(参考情報)
judge4_0 / judge3_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 5
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <map>
#include <stack>
#include <cmath>
#include <queue>
#include <numeric>


int main()
{
	int height[3];

	for (size_t i = 0; i < 3; i++)
	{
		std::cin >> height[i];
	}

	char name[3][2] = { "A", "B", "C" };
	int pos[3] = { 0, 1, 2 };

	if (height[0] < height[1]) {
		std::swap(height[0], height[1]);
		std::swap(pos[0], pos[1]);
	}

	if (height[1] < height[2]) {
		std::swap(height[1], height[2]);
		std::swap(pos[1], pos[2]);
	}

	if (height[0] < height[1]) {
		std::swap(height[0], height[1]);
		std::swap(pos[0], pos[1]);
	}

	for (size_t i = 0; i < 3; i++)
	{
		std::cout << name[pos[i]] << std::endl;
	}

	return 0;
}
0