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 1119. Metro

What is 10 test?
Posted by Роман 1 Feb 2007 16:27
Write me 10 test, please !
Re: What is 10 test?
Posted by bobchennan 10 May 2009 15:06
I got WA#10,too!
Re: What is 10 test?
Posted by Tornike Mandzulashvili 28 Apr 2011 20:08
write test 10 pls
Re: What is 10 test?
Posted by Ibragim Atadjanov (Tashkent U of IT) 28 Apr 2011 20:31
I dont know test 10.But I can help you if you give me your algo or code. I have already solved this problem. my email is ibragim.atadjanov@gmail.com
Re: What is 10 test?
Posted by teoy 8 Oct 2011 21:33
First I got WA on test 10.Because my DP solution is wrong:
this is AC solution:
        tt[0].a=tt[0].b=0;
    for(int i=1;i<=k;i++)
    {
        scanf("%d%d",&tt[i].a,&tt[i].b);
    }
    sort(tt,tt+k+1,cmp);
    memset(dp,0,sizeof(dp));
    for(int i=1;i<=k;i++)
    {
        for(int j=0;j<i;j++)
        {
            if(tt[j].a<tt[i].a&&tt[j].b<tt[i].b)
            {
                dp[i]=max(dp[j]+1,dp[i]);
            }
        }
    }

this is WA solution
    for(int i=1;i<=k;i++)
    {
        scanf("%d%d",&tt[i].a,&tt[i].b);
    }
    sort(tt+1,tt+k+1,cmp);
    memset(dp,0,sizeof(dp));
        dp[1]=1;
    for(int i=2;i<=k;i++)
    {
        for(int j=1;j<i;j++)
        {
            if(tt[j].a<tt[i].a&&tt[j].b<tt[i].b)
            {
                dp[i]=max(dp[j]+1,dp[i]);
            }
        }
    }
sorry for my poor English .hope to help~
Re: What is 10 test?
Posted by tuan 19 Apr 2013 11:44
me too!