-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path11292.cpp
More file actions
48 lines (43 loc) · 860 Bytes
/
11292.cpp
File metadata and controls
48 lines (43 loc) · 860 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
// 11292. 키 큰 사람
// 2021.09.05
// 정렬
#include<iostream>
#include<string>
#include<vector>
using namespace std;
int main()
{
while (1)
{
int n;
cin >> n;
if (n == 0)
{
break;
}
string s;
float h;
float maxValue = -1.0f;
vector<string> ansVector;
for (int i = 0; i < n; i++)
{
cin >> s >> h;
if (maxValue < h)
{
ansVector.clear();
ansVector.push_back(s);
maxValue = h;
}
else if (maxValue <= h)
{
ansVector.push_back(s);
}
}
for (int i = 0; i < ansVector.size(); i++)
{
cout << ansVector[i] << " ";
}
cout << endl;
}
return 0;
}