結果
| 問題 |
No.571 3人兄弟(その2)
|
| コンテスト | |
| ユーザー |
pin
|
| 提出日時 | 2017-10-27 21:20:36 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 672 bytes |
| コンパイル時間 | 707 ms |
| コンパイル使用メモリ | 75,024 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-11-21 21:27:30 |
| 合計ジャッジ時間 | 1,493 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 12 |
ソースコード
#include <iostream>
#include <vector>
#include <algorithm>
#include <queue>
#include <functional>
#include <map>
#include <string>
using namespace std;
typedef long long ll;
struct person{ int hight, weight; char name; };
bool comp(const person& a,const person& b){
if (a.hight != b.hight){
return a.hight > b.hight;
}
return a.weight < b.weight;
}
int main(void){
string s = "ABC";
vector<person> v(3);
for (int i = 0; i < 3; i++){
int h, w;
cin >> h >> w;
v.push_back({ h, w, s[i] });
}
sort(v.begin(), v.end(), comp);
for (int i = 0; i < 3; i++){
cout << v[i].name << endl;
}
}
pin