Untitled
user_0483151
plain_text
18 days ago
1.1 kB
1
Indexable
Never
#include <bits/stdc++.h> #define endl '\n' #define maxn 1005 #define TASK bai1 #define For(i,a,b) for ( int i = a; i <= b; i++ ) #define Ford(i,a,b) for ( int i = a; i >= b; i-- ) #define MOD 10000000 using namespace std; struct wood { double dai ; double rong ; } ; wood go[10] ; void inp() { For(i,1,6) { cin >> go[i].dai >> go[i].rong ; if ( go[i].dai < go[i].rong ) swap(go[i].dai, go[i].rong) ; } } bool ss(wood x, wood y) { if ( x.dai != y.dai ) return x.dai < y.dai; if ( x.rong != y.rong ) return x.rong < y.rong ; return 0 ; } bool check(int i,int j) { return ( go[i].dai == go[j].dai && go[i].rong == go[j].rong ) ; } void solve() { sort(go+1,go+6+1,ss) ; int dem = 0; if ( check(1,2) + check(3,4) + check(5,6) == 3 ) cout << "YES" ; else cout << "NO" ; } int main() { ios_base:: sync_with_stdio(0); cin.tie(0); if(fopen("bai1.inp","r")){ freopen("bai1.inp","r",stdin); } inp(); solve(); }
Leave a Comment