# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
258839 | monus1042 | 악어의 지하 도시 (IOI11_crocodile) | C++17 | 801 ms | 93736 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 "crocodile.h"
#include <bits/stdc++.h>
using namespace std;
typedef vector<int> vi;
typedef long long ll;
typedef pair<int,int> ii;
typedef vector<ii> vii;
typedef vector<ll> vll;
#define pb push_back
#define mkp make_pair
#define all(X) X.begin(), X.end()
const int MAXS = 100002;
const ll inf = 1e15;
vector< pair<int, ll> > g[MAXS];
priority_queue < pair<ll, int>, vector< pair<ll, int> >, greater< pair<ll,int> > > pq;
vll d(MAXS, inf), d2(MAXS, inf);
int state[MAXS]; // 0 unvisited, 1 minimal obtained
void dj(){
while(!pq.empty()){
int auxu = pq.top().second;
ll w = pq.top().first;
pq.pop();
if (state[auxu] == 0 && w == d2[auxu]){ // ok
state[auxu] = 1;
for (int i=0; i<(int)g[auxu].size(); i++){
int v = g[auxu][i].first;
ll wuv = g[auxu][i].second + w;
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |