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 1527. Bad Roads

Whether tests to a problem after Petrozavodsk have been changed?
Posted by Burmistrov Ivan (USU) 19 Feb 2007 00:23
It is very strange: I've got AC on snarknews.info (Doreshivanie), but on Timus I got Crash or WA # 9 :(
Re: Whether tests to a problem after Petrozavodsk have been changed?
Posted by Vladimir Yakovlev (USU) 19 Feb 2007 01:42
Timus Online Judge and Ejudge compile programs with different compilers with different command lines
Re: Whether tests to a problem after Petrozavodsk have been changed?
Posted by Burmistrov Ivan (USU) 19 Feb 2007 20:02
Oh, it is really super bug!
This code:
struct Pair
{
    int vert;
    int cost;

    bool operator < (const Pair & other) const
    {
        return ((vert < other.vert) || ((vert == other.vert)&&(cost < other.cost)));
    }

    bool operator == (const Pair & other) const
    {
        return ((vert == other.vert) && (cost == other.cost));
    }

    void set(int v, int c)
    {
        vert = v;
        cost = c;
    }
};
got WA # 9.

But this:
struct Pair
{
    int vert;
    int cost;

    bool operator < (const Pair & other) const
    {
        return ((vert < other.vert) || ((vert == other.vert)&&(cost < other.cost)));
    }

    bool operator == (const Pair & other) const
    {
        return ((vert == other.vert) && (cost == other.cost));
    }

    void set(int v, int c)
    {
        vert = v;
        cost = c;
    }

    void operator = (const Pair & other)
    {
        vert = other.vert;
        cost = other.cost;
    }
};

got Accepted!

Intel C++ compiler really differs from the others :)

Edited by author 19.02.2007 20:03
Re: Whether tests to a problem after Petrozavodsk have been changed?
Posted by Alias (Alexander Prudaev) 5 Mar 2007 22:39
yes, you are right. look at my motto :)

Edited by author 05.03.2007 22:40
Re: Whether tests to a problem after Petrozavodsk have been changed?
Posted by KIRILL(ArcSTU) 5 Mar 2007 23:00
No, server is good!:)