반응형
#include <iostream>
#include <string>
using namespace std;
int t, n, big,ib;
struct YJJ {
string school;
int c;
};
int main() {
cin >> t;
while (t--)
{
cin >> n;
YJJ *y = new YJJ[n];
for (int i = 0; i < n; i++)
{
cin >> y[i].school >> y[i].c;
if (big < y[i].c)
{
big = y[i].c;
ib = i;
}
}
cout << y[ib].school << '\n';
}
}
'Algorithm' 카테고리의 다른 글
C++(씨쁠쁠)(cplusplus)-백준(baekjoon)(BaekJoon)코딩 2164번:카드 2 답 (0) | 2017.04.01 |
---|---|
C++(씨쁠쁠)(cplusplus)-백준(baekjoon)(BaekJoon)코딩 10815번:숫자 카드 답 (0) | 2017.03.31 |
C++(씨쁠쁠)(cplusplus)-백준(baekjoon)(BaekJoon)코딩 10102번:개표 답 (0) | 2017.03.30 |
C++(씨쁠쁠)(cplusplus)-백준(baekjoon)(BaekJoon)코딩 10819번:차이를 최대로 답 (0) | 2017.03.27 |
C++(씨쁠쁠)(cplusplus)-백준(baekjoon)(BaekJoon)코딩 10999번:구간 합 구하기 2 답 (0) | 2017.03.27 |