Input errors ?

The forum to report every bug you find or tell us what you'd like to find in UVa OJ's new system

Moderator: Board moderators

Input errors ?

Postby koentje » Tue May 19, 2009 1:04 pm

I'm busy solving the problem 100, but every time I run into runtime errors, as a result I tried to do some troubleshooting since it must be a fundamental problem, and I narrowed it down to some invalid:

When I upload the following code I always get a runtime error, meaning the assertions got triggered (and I already put them extra wide from the problem definition it should only be >0 and <10000. When I remove the assertions I get the regular 'wrong answer'.

Code: Select all
#include <cassert>
#include <iostream>

int main()
{
    int lower,upper;
// while(std::cin >> lower >> upper)
    while(scanf("%d %d",&upper, &lower) != EOF)
    {
        assert(lower>=0 && lower <=10000);
        assert(upper>=0 && upper <=10000);
        std::cout << lower << " " << upper << " 0" << std::endl;

    }
    return 0;
}


Can it be that something is going on with the testvectors ?
koentje
New poster
 
Posts: 1
Joined: Tue May 19, 2009 12:58 pm

Re: Input errors ?

Postby mf » Tue May 19, 2009 1:19 pm

Inputs are in range 1..999999.

.pdf versions of some problems are out of date, always check with .html versions.
mf
Guru
 
Posts: 1244
Joined: Mon Feb 28, 2005 4:51 am
Location: Zürich, Switzerland


Return to Bugs and suggestions

Who is online

Users browsing this forum: No registered users and 1 guest