結果

問題 No.571 3人兄弟(その2)
ユーザー evawenisevawenis
提出日時 2020-06-28 15:35:24
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 456 bytes
コンパイル時間 2,163 ms
コンパイル使用メモリ 205,348 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-09-22 01:45:21
合計ジャッジ時間 2,831 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,380 KB
testcase_01 AC 1 ms
4,376 KB
testcase_02 AC 2 ms
4,376 KB
testcase_03 AC 2 ms
4,376 KB
testcase_04 AC 1 ms
4,376 KB
testcase_05 AC 2 ms
4,380 KB
testcase_06 AC 1 ms
4,376 KB
testcase_07 AC 2 ms
4,376 KB
testcase_08 AC 2 ms
4,376 KB
testcase_09 AC 1 ms
4,380 KB
testcase_10 AC 2 ms
4,376 KB
testcase_11 AC 1 ms
4,376 KB
testcase_12 AC 1 ms
4,380 KB
testcase_13 AC 1 ms
4,380 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
using namespace std;
struct pr{
	int h,w,n;
	bool operator<(const pr&oth)const{
		if(this->h==oth.h){
			if(this->w<oth.w)return true;
			else return false;
		}
		if(this->h>oth.h)return true;
		return false;
	}
};

int main(){
	cin.tie(0),ios::sync_with_stdio(false);
	vector<pr>abc(3);
	for(int i=0;i<3;++i)cin>>abc.at(i).h>>abc.at(i).w,abc.at(i).n=i;
	sort(abc.begin(),abc.end());
	for(auto&&i:abc)cout<<(char)(i.n+'A')<<"\n"s;
}
0