# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
750344 | MrM7md | Awesome Arrowland Adventure (eJOI19_adventure) | C++17 | 17 ms | 24020 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 int long long
#define endl '\n'
#define F first
#define S second
#define pb push_back
#define all(a) a.begin(),a.end()
const int N=1e6+500;
const int off=(1<<18);
const int MOD = 1e9+7;
vector<vector<int>>gr(N);
char ch[502][502];
int val[N],vis[N];
int n,m;
map<pair<int,int>,int>mp;
void dij(int a){
if(vis[a])return ;
vis[a]=1;
val[a]=0;
priority_queue<pair<int,int>>pq;
pq.push({0,a});
while(!pq.empty()){
int vl=pq.top().F,x=pq.top().S;
pq.pop();
// cout<<vl<<' '<<x<<endl;
for(auto it:gr[x]){
if(val[it]>val[x]+mp[{x,it}])val[it]=val[x]+mp[{x,it}];
if(!vis[it]){
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... |