ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1062. Triathlon

Please say why i have WA#8
Posted by Evolution 2 Dec 2008 22:32
#include<iostream.h>
struct Triathlon{
    int V1;
    int V2;
    int V3;
};
main()
{
    bool t;
    int i,j,n;
    cin>>n;
    Triathlon*a;
    a=new Triathlon [n];
    for(i=0;i<n;i++)
    {cin>>a[i].V1>>a[i].V2>>a[i].V3;}
    for(i=0;i<n;i++)
    {t=true;
        for(j=0;j<n;j++)
    {
            if(i==j)continue;
            if(a[j].V1>=a[i].V1)
                if(a[j].V2>=a[i].V2)
                    if(a[j].V3>=a[i].V3)
                    {cout<<"NO"<<endl;
                    t=false;
                    break;}

        }
    if(t)
    cout<<"YES"<<endl;}
        return 0;
}


//Thanks