結果

問題 No.571 3人兄弟(その2)
コンテスト
ユーザー Naoyk1212
提出日時 2017-10-06 23:39:02
言語 C++11
(gcc 15.2.0 + boost 1.89.0)
コンパイル:
g++-15 -O2 -lm -std=gnu++11 -Wuninitialized -DONLINE_JUDGE -o a.out _filename_
実行:
./a.out
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 532 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 562 ms
コンパイル使用メモリ 93,244 KB
実行使用メモリ 7,972 KB
最終ジャッジ日時 2026-05-12 04:52:14
合計ジャッジ時間 3,011 ms
ジャッジサーバーID
(参考情報)
tmp-judge_1 / judge3_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 12
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#include<iostream>
#include<functional>
#include<vector>
#include<utility>
#include<algorithm>

const int mod = 998244353;

struct Status {
	int h, w;
	char name;

	bool operator<(const Status& another) const {
		if (h != another.h) {
			return h > another.h;
		}
		return w < another.w;
	}
};

int main() {
	std::vector<Status> v(3);
	for (int i = 0; i < 3; i++) {
		std::cin >> v[i].h >> v[i].w;
		v[i].name = 'A' + i;
	}

	std::sort(v.begin(), v.end());

	for (int i = 0; i < 3; i++) {
		std::cout << v[i].name << std::endl;
	}
}
0