We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 618e2a4 commit 8c5661aCopy full SHA for 8c5661a
1722B - Colourblindness.cpp
@@ -0,0 +1,31 @@
1
+// ॐ नमः शिवाय
2
+#include<bits/stdc++.h>
3
+using namespace std;
4
+#define ll long long
5
+
6
+// Code Written By: Vikash Patel
7
+// Codeforces Profile: https://codeforces.com/profile/vikashpatel
8
9
+bool check(string r1, string r2, int n)
10
+{
11
+ for(int i=0; i<n;i++)
12
+ {
13
+ if((r1[i]=='R' && r2[i]!='R') || (r2[i]=='R' && r1[i]!='R'))
14
+ return 0;
15
+ }
16
+ return 1;
17
+}
18
+int main()
19
20
+ int t;
21
+ cin>>t;
22
+ while(t--)
23
24
+ int n;
25
+ cin>>n;
26
+ string r1,r2;
27
+ cin>>r1>>r2;
28
+ cout<<((check(r1, r2, n))?"YES":"NO")<<endl;
29
30
31
0 commit comments