結果
問題 | No.571 3人兄弟(その2) |
ユーザー |
|
提出日時 | 2017-12-04 04:49:20 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 689 bytes |
コンパイル時間 | 1,582 ms |
コンパイル使用メモリ | 171,768 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-28 15:06:19 |
合計ジャッジ時間 | 2,366 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 12 |
ソースコード
#include <bits/stdc++.h>#define FOR(i,a,b) for(int i = (a); i < (b); ++i)#define REP(i,n) FOR(i,0,n)#define SZ(n) (int)(n).size()#define ALL(n) (n).begin(), (n).end()#define MOD % 1000000007using namespace std;typedef long long LL;typedef vector<int> VI;typedef pair<int, int> PI;int main() {pair<pair<int, int>, char> p[3];REP(i, 3) {cin >> p[i].first.first >> p[i].first.second;p[i].second = 'A' + i;}sort(p, p + 3, greater<pair<pair<int, int>, char>>());REP(i, 2) {FOR(j, i + 1, 3) {if (p[i].first.first == p[j].first.first && p[i].first.second > p[j].first.second) swap(p[i], p[j]);}}REP(i, 3) {cout << p[i].second << endl;}return 0;}