結果
問題 | No.571 3人兄弟(その2) |
ユーザー |
![]() |
提出日時 | 2018-05-25 16:55:11 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 710 bytes |
コンパイル時間 | 2,287 ms |
コンパイル使用メモリ | 170,316 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-28 18:00:49 |
合計ジャッジ時間 | 2,359 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 12 |
コンパイルメッセージ
main.cpp:6:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 6 | main(){ | ^~~~
ソースコード
#include<bits/stdc++.h>typedef long long ll;using namespace std;int INF = 1LL << 30;int MOD = 1e9+7;main(){vector<pair<pair<int,int>,char> > v(3);for(int i = 0;i < 3;i++){int a,b;cin >> a >> b;v[i] = make_pair(make_pair(a,b),'A' + i);}for(int i = 0;i < 3;i++){for(int j = i;j < 3;j++){if(v[i].first.first < v[j].first.first){swap(v[i],v[j]);}else if(v[i].first.first == v[j].first.first &&v[i].first.second > v[j].first.second){swap(v[i],v[j]);}}}//sort(v.rbegin(),v.rend());for(auto p:v){cout << p.second << endl;}}