結果
問題 | No.571 3人兄弟(その2) |
ユーザー |
![]() |
提出日時 | 2018-08-08 10:21:54 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 684 bytes |
コンパイル時間 | 883 ms |
コンパイル使用メモリ | 78,928 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-09-22 03:51:42 |
合計ジャッジ時間 | 1,497 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 12 |
ソースコード
#include<iostream>#include<string>#include<algorithm>#include<functional>#include<vector>#include<set>#include<queue>#include<list>#include<stdio.h>#include<stdlib.h>#include<map>using namespace std;int main() {string s = "ABC";vector<pair<pair<int, int>, char>> v;for (int i = 0; i < 3; ++i) {int a, b; cin >> a >> b;v.push_back({{ a,b }, s[i]});}sort(v.begin(), v.end(), [&](pair<pair<int, int>, char> a, pair<pair<int, int>, char> b) {if (a.first.first!=b.first.first) {return a.first.first > b.first.first;}else {return a.first.second < b.first.second;}});for (auto p:v) {cout << p.second << endl;}return 0;}