# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1158114 | akzytr | Bitaro’s Party (JOI18_bitaro) | C++20 | 2095 ms | 495164 KiB |
#include <bits/stdc++.h>
#define ve vector
#define ar array
#define pb push_back
#define ins insert
#define endl '\n'
#define ll long long
using namespace std;
const int MXN = 1e5+1;
ve<int> adj[MXN];
set<int> restr[MXN];
ll ansgy(ll x, ll i){
priority_queue<pair<int, int>> g;
ll dst[MXN];
fill(dst, dst+MXN, -1);
g.push({0, x});
while(!g.empty()){
auto top = g.top();
g.pop();
if(top.first > dst[top.second]){
dst[top.second] = top.first;
for(int i : adj[top.second]){
g.push({1+top.first, i});
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |