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

Show all messages Hide all messages

It is very strange: I've got AC on snarknews.info (Doreshivanie), but on Timus I got Crash or WA # 9 :(
Timus Online Judge and Ejudge compile programs with different compilers with different command lines
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
yes, you are right. look at my motto :)

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