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

Burmistrov Ivan (USU) Whether tests to a problem after Petrozavodsk have been changed? [4] // Problem 1527. Bad Roads 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 :(
Vladimir Yakovlev (USU) Re: Whether tests to a problem after Petrozavodsk have been changed? [3] // Problem 1527. Bad Roads 19 Feb 2007 01:42
Timus Online Judge and Ejudge compile programs with different compilers with different command lines
Burmistrov Ivan (USU) Re: Whether tests to a problem after Petrozavodsk have been changed? [2] // Problem 1527. Bad Roads 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
Alias (Alexander Prudaev) Re: Whether tests to a problem after Petrozavodsk have been changed? [1] // Problem 1527. Bad Roads 5 Mar 2007 22:39
yes, you are right. look at my motto :)

Edited by author 05.03.2007 22:40
No, server is good!:)