-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path691A.cpp
More file actions
39 lines (38 loc) · 711 Bytes
/
691A.cpp
File metadata and controls
39 lines (38 loc) · 711 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
#include <bits/stdc++.h>
using namespace std;
int main()
{
int t;
scanf("%d", &t);
while (t--)
{
int n;
scanf("%d", &n);
string s1, s2;
cin >> s1 >> s2;
int one = 0,two = 0;
for (int i = 0; i < n; i++)
{
if(s1[i] > s2[i]){
one++;
}
else if(s1[i] < s2[i]){
two++;
}
else{
one++;
two++;
}
}
if(two > one){
printf("BLUE\n");
}
else if(two < one){
printf("RED\n");
}
else
{
printf("EQUAL\n");
}
}
}