# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
869363 | Trisanu_Das | Flight to the Ford (BOI22_communication) | C++17 | 2392 ms | 5008 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>
#define ll long long
#define pii pair<int, int>
#define pll pair<ll, ll>
#define F first
#define S second
using namespace std;
struct state
{
int szA = 0, szB = 0;
vector<pii> A, B;
};
void split(state &s, state &L, state &R)
{
auto &[szA, szB, A, B] = s;
int lA = (szA + 1) / 2, lB = szB / 2;
for (auto [l, r] : A)
{
if (r - l + 1 <= lA)
L.A.emplace_back(pii(l, r));
else if (lA <= 0)
R.A.emplace_back(pii(l, r));
else
{
L.A.emplace_back(pii(l, l + lA - 1));
R.A.emplace_back(pii(l + lA, r));
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |