-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHIGHSCORE.cpp
More file actions
44 lines (39 loc) · 1.01 KB
/
HIGHSCORE.cpp
File metadata and controls
44 lines (39 loc) · 1.01 KB
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
/*Chef is taking a tough examination. The question paper consists of NN objective problems and each problem has 44 options A, B, C,A,B,C, and DD, out of which, exactly one option is correct.
Since Chef did not study for the exam, he does not know the answer to any of the problems. Chef was looking nearby for help when his friend somehow communicated the following information:
Exactly N_AN
A
problems have option AA as the answer.
Exactly N_BN
B
problems have option BB as the answer.
Exactly N_CN
C
problems have option CC as the answer.
Exactly N_DN
D
problems have option DD as the answer.*/
#include<iostream>
using namespace std;
int main(){
int t;
cin>>t;
while(t--){
int n;
cin>>n;
int na,nb,nc,nd;
cin>>na>>nb>>nc>>nd;
if(na>nb and na>nc and na>nd)
cout<<na<<endl;
else if (nb>nc and nb>nd )
cout<<nb<<endl;
else if (nc>nd)
cout<<nc<<endl;
else
cout<<nd<<endl;
}
return 0;
}