結果
問題 | No.571 3人兄弟(その2) |
ユーザー |
![]() |
提出日時 | 2017-10-06 23:39:02 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 532 bytes |
コンパイル時間 | 1,062 ms |
コンパイル使用メモリ | 68,728 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-17 02:13:06 |
合計ジャッジ時間 | 1,390 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 12 |
ソースコード
#include<iostream>#include<functional>#include<vector>#include<utility>#include<algorithm>const int mod = 998244353;struct Status {int h, w;char name;bool operator<(const Status& another) const {if (h != another.h) {return h > another.h;}return w < another.w;}};int main() {std::vector<Status> v(3);for (int i = 0; i < 3; i++) {std::cin >> v[i].h >> v[i].w;v[i].name = 'A' + i;}std::sort(v.begin(), v.end());for (int i = 0; i < 3; i++) {std::cout << v[i].name << std::endl;}}