# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
500593 | GenericAccount | Cheap flights (LMIO18_pigus_skrydziai) | C++17 | 492 ms | 48124 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;
int N, M;
// N-miestu skaicius, M-poru skaicius
struct Best {
int to;
int pelnas;
Best() {
this->to = -1;
this->pelnas = -1;
}
};
map<pair<int, int>, int>pelnas;
void checkForBest(int a, int b, int pelnas, vector<pair<Best, Best>> & pelningiausi) {
if (pelnas > pelningiausi[a].first.pelnas) {
pelningiausi[a].second = pelningiausi[a].first;
pelningiausi[a].first.to = b;
pelningiausi[a].first.pelnas = pelnas;
}
else if(pelnas>pelningiausi[a].second.pelnas){
pelningiausi[a].second.to = b;
pelningiausi[a].second.pelnas = pelnas;
}
}
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... |