# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
395777 | Osama_Alkhodairy | Two Transportations (JOI19_transportations) | C++17 | 2020 ms | 67012 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>
#include "Azer.h"
using namespace std;
const int NA = 2001;
const int INFA = (int)1e9;
int nA;
vector <int> distA;
vector <pair <int, int> > vA[NA];
set <pair <int, int> > readyA;
int mx_distA = 0, cntA = 0, completeA = 0, waiting_forA;
vector <int> curA;
void addA(int node, int d){
completeA++;
mx_distA += d;
distA[node] = mx_distA;
for(auto &i : vA[node]){
if(distA[node] + i.second < distA[i.first]){
readyA.insert(make_pair(distA[node] + i.second, i.first));
}
}
}
pair <int, int> get_nextA(){
while(readyA.size() && distA[readyA.begin()->second] != INFA){
readyA.erase(readyA.begin());
}
if(readyA.size()){
return make_pair(readyA.begin()->first - mx_distA, readyA.begin()->second);
# | 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... |