Skip to content

Commit b0536f6

Browse files
Create THREEQ.cpp
1 parent 8b7219b commit b0536f6

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

Codechef solutions/THREEQ.cpp

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
#include<bits/stdc++.h>
2+
using namespace std;
3+
int main(int argc, char const *argv[])
4+
{
5+
int t;
6+
cin>>t;
7+
8+
while(t--){
9+
int cy = 0, cn = 0;
10+
int by = 0, bn = 0;
11+
for(int i = 1; i <= 3; i++){
12+
int temp;
13+
cin>>temp;
14+
if(temp == 0)
15+
cn += 1;
16+
else
17+
cy += 1;
18+
}
19+
20+
for(int i = 1; i <= 3; i++){
21+
int temp;
22+
cin>>temp;
23+
if(temp == 0)
24+
bn += 1;
25+
else
26+
by += 1;
27+
}
28+
if(cn == bn && cy == by)
29+
cout<<"Pass"<<endl;
30+
else
31+
cout<<"Fail"<<endl;
32+
}
33+
return 0;
34+
}

0 commit comments

Comments
 (0)