-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathORDTEAMS.cpp
More file actions
30 lines (24 loc) · 892 Bytes
/
ORDTEAMS.cpp
File metadata and controls
30 lines (24 loc) · 892 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
#include<bits/stdc++.h>
using namespace std;
int main()
{
int t;
cin>>t;
while(t--)
{
int a[9];
for(int i=0;i<9;i++)
cin>>a[i];
int r=-1;
if(((a[0]>=a[3]&&a[1]>=a[4]&&a[2]>=a[5])&&!(a[0]==a[3]&&a[1]==a[4]&&a[2]==a[5]))&&((a[0]>=a[6]&&a[1]>=a[7]&&a[2]>=a[8])&&!(a[0]==a[6]&&a[1]==a[7]&&a[2]==a[8])))
r=1;
if(((a[3]>=a[0]&&a[4]>=a[1]&&a[5]>=a[2])&&!(a[3]==a[0]&&a[4]==a[1]&&a[5]==a[2]))&&((a[3]>=a[6]&&a[4]>=a[7]&&a[5]>=a[8])&&!(a[3]==a[6]&&a[4]==a[7]&&a[5]==a[8])))
r=2;
if(((a[6]>=a[3]&&a[7]>=a[4]&&a[8]>=a[5])&&!(a[6]==a[3]&&a[7]==a[4]&&a[8]==a[5]))&&((a[6]>=a[0]&&a[7]>=a[1]&&a[8]>=a[2])&&!(a[6]==a[0]&&a[7]==a[1]&&a[8]==a[2])))
r=3;
if(r!=-1)
cout<<"yes\n";
else
cout<<"no\n";
}
}