| # | Time | Username | Problem | Language | Result | Execution time | Memory | 
|---|---|---|---|---|---|---|---|
| 216921 | shashwatchandra | 컴퓨터 네트워크 (BOI14_network) | C++17 | 148 ms | 8132 KiB | 
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include "network.h"
#include <bits/stdc++.h>
using namespace std;
#define pb push_back
const int N = 1001;
vector<int> all[N];
void findRoute (int n, int a, int b)
{
    /*
     *  Obviously, this is not a good solution.
     *  Replace it with your own code.
     */
	int ooh = 0;
	for(int i = 1;i <= n;i++){
		if(i == b)continue;
		int xd = ping(i,b);
		if(i == a)ooh = xd+1;
		all[xd+1].pb(i);
	}
	all[0].pb(b);
	int cur	= a;
	while(cur != b){
		ooh--;
		for(auto v:all[ooh]){
			if(ping(cur,v) == 0){
				cur = v;
				travelTo(v);
				break;
			}
		}
	}
    /*int dist = ping(a, b);
    for (int i = 1; i <= dist; ++i)
        travelTo (i);*/
}
Compilation message (stderr)
| # | Verdict | Execution time | Memory | Grader output | 
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output | 
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output | 
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output | 
|---|---|---|---|---|
| Fetching results... | ||||
