# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
5403 | Qwaz | Divide and conquer (IZhO14_divide) | C++98 | 96 ms | 7336 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 <cstdio>
#include <algorithm>
using namespace std;
typedef long long ll;
const int MAX = 100020;
const ll INF = 1234567890LL;
struct segment {
int pos;
ll gSum, eSum;
bool left;
bool operator < (const segment &t) const {
if(eSum-pos == t.eSum-t.pos)
return left > t.left;
return eSum-pos < t.eSum-t.pos;
}
};
int n, dFull;
segment data[MAX<<1];
void input(){
scanf("%d", &n);
ll eSum = 0, gSum = 0;
int i;
for(i = 0; i<n; i++){
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |