-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathFBMT.cpp
More file actions
43 lines (34 loc) · 835 Bytes
/
FBMT.cpp
File metadata and controls
43 lines (34 loc) · 835 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
#include<bits/stdc++.h>
using namespace std;
typedef long long int lli;
typedef long double ld;
#define FOR(a,b) for(auto i=a;i<b;i++)
#define FAIO ios_base::sync_with_stdio(false); cin.tie(NULL);
#define test_cases int T;cin>>T;while(T--)
int main(){
FAIO
int n;
test_cases{
cin>>n;
string array[n];
string temp;
int count=0;
cin.ignore();
for(int i=0;i<n;i++){
cin>>array[i];
}
for(int i=0;i<n;i++){
if(array[i]==array[0])count++;
else{temp=array[i];}
}
if((n-count)==count)cout<<"Draw"<<endl;
else if((n-count)>count)cout<<temp<<endl;
else cout<<array[0]<<endl;
}
return 0;
}
/*
You can always say me thanks
Autthor: SONUKUMARSAW
email: sonukumarsaw66@gmail.com
*/