๋ฌธ์
์ฝ๋
#include <iostream>
#include <vector>
using namespace std;
void check(int x) {
if (x == 1)cout << "PROBRAIN";
if (x == 2)cout << "GROW";
if (x == 3)cout << "ARGOS";
if (x == 4)cout << "ADMIN";
if (x == 5)cout << "ANT";
if (x == 6)cout << "MOTION";
if (x == 7)cout << "SPG";
if (x == 8)cout << "COMON";
if (x == 9)cout << "ALMIGHTY";
}
int main() {
ios_base::sync_with_stdio(false);
cin.tie(0);
int N; cin >> N;
int maxNum=0,result=0,maxIndex;
for (int i = 1; i <= 9; i++) {
for (int k = 0; k < N; k++) {
int num; cin >> num;
if (num > maxNum) maxNum = num;
}
if (maxNum>result) {
result=maxNum;
maxIndex = i;
}
}
check(maxIndex);
}
'Algorithm ๐ง๐ปโ๐ป > ๋ฐฑ์ค(BOJ)' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
[๋ฐฑ์ค,c++] 14916๋ฒ - ๊ฑฐ์ค๋ฆ๋ (0) | 2021.11.14 |
---|---|
[๋ฐฑ์ค,c++] 14889๋ฒ - ์คํํธ์ ๋งํฌ (0) | 2021.11.14 |
[๋ฐฑ์ค,c++] 1476๋ฒ - ๋ ์ง ๊ณ์ฐ (0) | 2021.11.14 |
[๋ฐฑ์ค,c++] 14720๋ฒ - ์ฐ์ ์ถ์ (0) | 2021.11.11 |
[๋ฐฑ์ค,c++] 14716๋ฒ - ํ์๋ง (0) | 2021.11.11 |
[๋ฐฑ์ค,c++] 14698๋ฒ - ์ ์ํ๋๋ ์ฌ๋ผ์ ์ฐ๊ตฌ์์๋ ๊ฑด์ ๋ํ์ฌ(Hard) (0) | 2021.11.11 |
๋๊ธ