結果

問題 No.570 3人兄弟(その1)
コンテスト
ユーザー ajiruajiru
提出日時 2020-02-05 11:00:57
言語 C++14
(gcc 15.3.0 + boost 1.92.0)
コンパイル:
g++-15 -O2 -lm -std=c++14 -Wuninitialized -DONLINE_JUDGE -o a.out _filename_
実行:
./a.out
結果
AC  
実行時間 1 ms / 2,000 ms
+ 364µs
コード長 430 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 517 ms
コンパイル使用メモリ 92,780 KB
実行使用メモリ 9,704 KB
最終ジャッジ日時 2026-09-02 06:12:26
合計ジャッジ時間 1,428 ms
ジャッジサーバーID
(参考情報)
judge1_1 / judge3_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 5
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#include <iostream>
#include <algorithm>
#include <vector>
using namespace std;
int main(void) {
	vector<pair<int, int> > h(3);
	for (int i = 0; i < 3; ++i) {
		cin >> h[i].first;
		h[i].second = i;
	}
	sort(h.begin(), h.end(), greater<pair<int, int> >());
	for (int i = 0; i < 3; ++i) {
		if (h[i].second == 0) cout << "A\n";
		else if (h[i].second == 1) cout << "B\n";
		else if (h[i].second == 2) cout << "C\n";
	}
	return 0;
}
0