# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1147380 | Pacybwoah | Voting Cities (NOI22_votingcity) | C++20 | 60 ms | 6492 KiB |
#include<iostream>
#include<vector>
#include<queue>
#include<algorithm>
using namespace std;
typedef long long ll;
ll inf = 1e18;
int main(){
ios::sync_with_stdio(false);
cin.tie(0);
int n, m, k;
cin >> n >> m >> k;
vector<vector<pair<int, ll>>> graph(n);
vector<int> imp;
for(int i = 0; i < k; i++){
int tmp;
cin >> tmp;
imp.push_back(tmp);
}
for(int i = 0; i < m; i++){
int a, b, w;
cin >> a >> b >> w;
graph[b].emplace_back(a, w);
}
vector<vector<ll>> dist(n, vector<ll>(32, inf));
priority_queue<pair<ll, pair<int, int>>, vector<pair<ll, pair<int, int>>>, greater<pair<ll, pair<int, int>>>> pq;
for(auto &x: imp){
dist[x][0] = 0;
pq.push(make_pair(0, make_pair(x, 0)));
}
# | 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... |