# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1169790 | daoquanglinh2007 | Voting Cities (NOI22_votingcity) | C++20 | 70 ms | 8376 KiB |
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define pii pair <int, int>
#define fi first
#define se second
#define mp make_pair
const int NM = 5000, inf = 1e18;
int N, E, K, Q, T[NM+5];
vector <pii> adj[NM+5];
int d[NM+5][1<<5];
priority_queue <pair <int, pii>, vector <pair <int, pii> >, greater <pair <int, pii> > > pq;
void dijkstra(){
for (int i = 0; i < N; i++)
for (int j = 0; j < (1<<5); j++)
d[i][j] = +inf;
for (int i = 0; i < K; i++){
d[T[i]][0] = 0;
pq.push(mp(0, mp(T[i], 0)));
}
while (!pq.empty()){
int u = pq.top().se.fi, msk = pq.top().se.se;
if (d[u][msk] != pq.top().fi){
pq.pop();
continue;
}
# | 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... |
# | 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... |