Submission #12934

# Submission time Handle Problem Language Result Execution time Memory
12934 2015-01-21T02:00:23 Z gs14004 Computer Network (BOI14_network) C++
0 / 100
116 ms 5220 KB
#include <vector>
#include "network.h"
using namespace std;
  
vector<int> dist[1001];
  
void findRoute(int N, int a, int b){
  int l = ping(a,b) + 1;
  for(int i=1; i<=N; i++){
    if(b == i) continue;
    int l2 = ping(b,i) + 1;
    if(l <= l2) continue;
    dist[l - l2].push_back(i);
  }
  int p = a;
  for(int i=1; i<=l; i++){
    for(int j=0; j<dist[i].size(); j++){
      if(ping(p,dist[i][j]) == 0){
        travelTo(dist[i][j]);
        p = dist[i][j];
        break;
      }
    }
  }
}
# Verdict Execution time Memory Grader output
1 Incorrect 112 ms 5220 KB Output isn't correct - Message has not reached its target
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 116 ms 5220 KB Output isn't correct - Message has not reached its target
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 100 ms 5220 KB Output isn't correct - Message has not reached its target
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 100 ms 5220 KB Output isn't correct - Message has not reached its target
2 Halted 0 ms 0 KB -