# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
592856 | rainboy | Flight to the Ford (BOI22_communication) | C++17 | 2945 ms | 1956 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.
#if 1
#include "communication.h"
#include <string.h>
using namespace std;
typedef pair<int, int> pi;
const int N = 400;
void split(int *ll, int *rr, int n, int ll_[][N], int rr_[][N], int *nn_, int s) {
int i;
if (s == 0) {
nn_[0] = 0;
nn_[1] = n;
memcpy(ll_[1], ll, nn_[1] * sizeof *ll);
memcpy(rr_[1], rr, nn_[1] * sizeof *rr);
return;
}
for (i = 0; i < n; i++) {
s -= rr[i] - ll[i] + 1;
if (s == 0) {
nn_[0] = i + 1;
memcpy(ll_[0], ll, nn_[0] * sizeof *ll);
memcpy(rr_[0], rr, nn_[0] * sizeof *rr);
if ((nn_[1] = n - 1 - i) > 0) {
memcpy(ll_[1], ll + i + 1, nn_[1] * sizeof *ll);
memcpy(rr_[1], rr + i + 1, nn_[1] * sizeof *rr);
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |