forked from Mohammed-Shoaib/Coding-Problems
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathB0085.cpp
More file actions
40 lines (36 loc) · 630 Bytes
/
B0085.cpp
File metadata and controls
40 lines (36 loc) · 630 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
// Problem Code: CCOOK
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
string chefAndCookOff(vector<int> A) {
int solved = count(A.begin(), A.end(), 1);
switch(solved) {
case 0:
return "Beginner";
case 1:
return "Junior Developer";
case 2:
return "Middle Developer";
case 3:
return "Senior Developer";
case 4:
return "Hacker";
default:
return "Jeff Dean";
}
}
int main() {
int N, num;
vector<int> A;
cin >> N;
while(N--) {
for(int i=0 ; i<5 ; i++) {
cin >> num;
A.push_back(num);
}
cout << chefAndCookOff(A) << endl;
A.clear();
}
return 0;
}