Submission #5974

# Submission time Handle Problem Language Result Execution time Memory
5974 2014-06-08T10:40:05 Z baneling100 Computer Network (BOI14_network) C++
25 / 100
116 ms 5076 KB
#include "network.h"

int Ans[1001];

void findRoute (int N, int a, int b)
{
    int i, Dist=ping(a,b), x, y;

    for(i=1 ; i<=N ; i++)
        if(i!=a && i!=b)
        {
            x=ping(a,i);
            y=ping(i,b);
            if(Dist==x+y+1)
                Ans[x]=i;
        }
    Ans[Dist]=b;
    for(i=0 ; i<=Dist ; i++)
        travelTo(Ans[i]);
}
# Verdict Execution time Memory Grader output
1 Correct 116 ms 5076 KB Output is correct
2 Correct 116 ms 5076 KB Output is correct
3 Correct 108 ms 5076 KB Output is correct
4 Correct 112 ms 5076 KB Output is correct
5 Correct 108 ms 5076 KB Output is correct
6 Correct 108 ms 5076 KB Output is correct
7 Correct 0 ms 5076 KB Output is correct
8 Correct 0 ms 5076 KB Output is correct
9 Correct 0 ms 5076 KB Output is correct
10 Correct 0 ms 5076 KB Output is correct
# Verdict Execution time Memory Grader output
1 Incorrect 108 ms 5076 KB Output isn't correct - Travelling to nonadjacent computer
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 116 ms 5076 KB Output isn't correct - Travelling to nonadjacent computer
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 104 ms 5076 KB Output isn't correct - Travelling to nonadjacent computer
2 Halted 0 ms 0 KB -