Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- long long maxx(long long x1,long long x2,long long x3,long long x4)
- {
- long long a,b;
- a=max(x1,x2);
- b=max(x3,x4);
- if(a>b)
- {
- return a;
- }
- else return b;
- }
- long long minn(long long x1,long long x2,long long x3,long long x4)
- {
- long long a,b;
- a=min(x1,x2);
- b=min(x3,x4);
- if(a>b)
- {
- return b;
- }
- else return a;
- }
- int main()
- {
- long long x1,x2,x3,x4,y1,y2,y3,y4,a,b,c,d,e=0,f=0,g,h;
- cin>>x1>>y1>>x2>>y2>>x3>>y3>>x4>>y4;
- a=maxx(x1,x2,x3,x4);
- b=minn(x1,x2,x3,x4);
- c=maxx(y1,y2,y3,y4);
- d=minn(y1,y2,y3,y4);
- if(x1==a||x1==b)
- {
- if(x2==a||x2==b)
- {
- if(x3==a||x3==b)
- {
- if(x1==a||x1==b)
- {
- e=1;
- }
- }
- }
- }
- if(y1==c||y1==d)
- {
- if(y2==c||y2==d)
- {
- if(y3==c||y3==d)
- {
- if(y1==c||y1==d)
- {
- f=1;
- }
- }
- }
- }
- g=a-b;
- h=c-d;
- if(e==1&&f==1)
- {
- if(g==h&&g*h!=0) cout<<"TAK";
- else cout<<"NIE";
- }
- else cout<<"NIE";
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement