# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
665930 | MilosMilutinovic | Flight to the Ford (BOI22_communication) | C++17 | 3857 ms | 2112 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 "communication.h"
#include <bits/stdc++.h>
using namespace std;
vector<pair<int, int>> merge_vec(vector<pair<int, int>> x, vector<pair<int, int>> y) {
int sz_x = x.size();
int sz_y = y.size();
int i = 0, j = 0;
vector<pair<int, int>> res;
while (i < sz_x || j < sz_y) {
if (j == sz_y || (i < sz_x && x[i].first < y[j].first)) {
if (res.empty() || res.back().second != x[i].first - 1) {
res.push_back(x[i]);
} else {
res.back().second = x[i].second;
}
i++;
} else {
if (res.empty() || res.back().second != y[j].first - 1) {
res.push_back(y[j]);
} else {
res.back().second = y[j].second;
}
j++;
}
}
return res;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |