| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1342634 | weedywelon | Computer Network (BOI14_network) | C++20 | 48 ms | 4312 KiB |
#include <cstdio>
#include <cstdlib>
#include <vector>
#include <algorithm>
#include <cmath>
#include <cstring>
#include <iostream>
#include <iomanip>
#include <limits.h>
#include <set>
#include <string>
#include <queue>
#include <stack>
#include <unordered_map>
#include <unordered_set>
#include <deque>
#include <map>
#include <chrono>
#include <random>
#include <bitset>
#include <tuple>
#include "network.h"
#define SZ(x) int(x.size())
#define FR(i,a,b) for(int i=(a);i<(b);++i)
#define FOR(i,n) FR(i,0,n)
#define FAST ios::sync_with_stdio(0); cin.tie(0); cout.tie(0)
#define A first
#define B second
#define mp(a,b) make_pair(a,b)
typedef long long LL;
typedef long double LD;
typedef unsigned long long ULL;
typedef unsigned __int128 U128;
typedef __int128 I128;
typedef std::pair<int,int> PII;
typedef std::pair<LL,LL> PLL;
using namespace std;
void findRoute (int N, int a, int b){
vector<PII> v(N);
int dist=1e5;
FR(i,1,N+1){
if (i==a || i==b){
v[i]=mp(1e5,1e5);
continue;
}
v[i]=mp(ping(a,i)+1,ping(i,b)+1);
dist=min(dist,v[i].A+v[i].B);
}
vector<PII> can;
FR(i,1,N+1){
if (v[i].A+v[i].B==dist){
can.push_back(mp(v[i].A,i));
}
}
sort(can.begin(),can.end());
for (PLL p:can) travelTo(p.B);
travelTo(b);
return;
}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... | ||||
