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 1247. Check a Sequence

Incorrect tests
Posted by pperm 3 Mar 2008 23:21
...
int main()
{
        ...
    scanf("%d%d",&s,&n);
    sum=s+n;
    for (i=0;i<s;i++)
    {
        scanf("%d",&t);
        sum-=t;
        ...
    }
    while (sum);
    ...
    return 0;
}

I have TLE4 ... My algo is O(n)...
I have TLE in "while (sum);"... I think in test4 sum of Ai not equal S+N...
sorry for my bad english :)
Re: Incorrect tests
Posted by Ostap Korkuna (Lviv NU) 4 Mar 2008 00:29
Admins! I'm also sure that in test4 sum of all Ai is not equal to S+N !!! I just calculated the sum and if it was not equal to S+N I thrown the exception ("throw 0;"). And I got Crash on test4 !
Please, check test4!
All incorrect tests will be fixed (-)
Posted by Sandro (USU) 4 Mar 2008 00:41