# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
975896 | Nipphitch | Cities (BOI16_cities) | C++11 | 1944 ms | 54216 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 ll long long
#define pii pair <ll,int>
#define f first
#define s second
const int N=1e5+5;
const int K=40;
const ll INF=LLONG_MAX/2;
int n,k,m;
ll dp[K][N];
vector <pii> adj[N];
priority_queue <pii,vector<pii>,greater<pii>> pq;
int main()
{
ios::sync_with_stdio(0);
cin.tie(0);
fill_n(dp[0],K*N,INF);
cin >> n >> k >> m;
for(int i=0;i<k;i++){
int x;
cin >> x;
dp[(1<<i)][x]=0;
}
for(int i=0;i<m;i++){
int u,v,w;
cin >> u >> v >> w;
adj[u].push_back({v,w});
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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |