# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
392333 | ritul_kr_singh | Computer Network (BOI14_network) | C++17 | 0 ms | 0 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 <bits/stdc++.h>
using namespace std;
// #define int long long
#define sp << ' ' <<
#define nl << '\n'
#include "network.h"
int ping(int a, int b){ return a; }
void travelTo(int a){}
void findRoute (int N, int a, int b){
int dist = ping(a, b);
vector<int> at[dist];
for(int i=1; i<=N; ++i){
if(i == a or i == b) continue;
int k = ping(a, i);
if(k < dist) at[k].push_back(i);
}
for(int i=0; i<dist; ++i){
for(int j : at[i]){
if(i + 1 + ping(j, b) == dist){
travelTo(j);
break;
}
}
}
travelTo(b);
}
signed main(){
}