結果
問題 |
No.571 3人兄弟(その2)
|
ユーザー |
|
提出日時 | 2020-06-28 15:35:24 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 456 bytes |
コンパイル時間 | 1,971 ms |
コンパイル使用メモリ | 198,692 KB |
最終ジャッジ日時 | 2025-01-11 13:21:29 |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 12 |
ソースコード
#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; }