結果

問題 No.571 3人兄弟(その2)
ユーザー forest3
提出日時 2020-04-07 15:41:37
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 590 bytes
コンパイル時間 2,077 ms
コンパイル使用メモリ 175,140 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-07-07 14:21:03
合計ジャッジ時間 2,128 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 12
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

int main()
{
	vector<tuple<int, int, char>> a( 3 );
	for( int i = 0; i < 3; i++ ) {
		int H, W;
		cin >> H >> W;
		a[i] = make_tuple( H, W, (char)('A' + i) );
	}

	sort( a.begin(), a.end(), []( tuple<int, int, char> u, tuple<int, int, char> v )
							{
								if( get<0>( u ) > get<0>( v ) ) return true;
								else if( get<0>( u ) == get<0>( v ) ) {
									if( get<1>( u ) < get<1>( v ) ) return true;
									else return false;
								}
								else return false;
							} );
	for( auto e : a ) {
		cout << get<2>( e ) << endl;
	}
}
0