# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
603944 | JeanBombeur | Flight to the Ford (BOI22_communication) | C++17 | 3494 ms | 2032 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 <iostream>
#include <cstdio>
#include <vector>
using namespace std;
// <|°_°|>
// M. Broccoli
struct segments_set {
vector <pair <int, int>> Segments;
void push_back(pair <int, int> a) {
Segments.push_back(a);
return;
}
int sum() {
int ans = 0;
for (pair <int, int> a : Segments)
ans += a.second - a.first;
return ans;
}
pair <segments_set, segments_set> split(int up) {
int cut = (sum() + up) / 2;
int cur = 0;
pair <segments_set, segments_set> ans;
int fill = 0;
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |