# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
674498 | alexdd | Sjeckanje (COCI21_sjeckanje) | C++17 | 0 ms | 340 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.
#pragma GCC optimize("O3,unroll-loops")
#include<bits/stdc++.h>
#define int long long
using namespace std;
struct node
{
int score;
int maxst,minst,capst;
int maxdr,mindr,capdr;
};
node combine(node x, node y)
{
node rez;
if(x.score + y.score < x.score - (x.maxdr - x.mindr) + y.score - (y.maxst - y.minst) + max(y.maxst, x.maxdr) - min(y.minst, x.minst))
{
rez.score = x.score - (x.maxdr - x.mindr) + y.score - (y.maxst - y.minst) + max(y.maxst, x.maxdr) - min(y.minst, x.minst);
if(x.capdr <= x.capst)///secventa stanga = secventa dreapta
{
rez.maxst = max(x.maxst, y.maxst);
rez.minst = min(x.minst, y.minst);
rez.capst = y.capst;
}
else
{
rez.maxst = x.maxst;
rez.minst = x.minst;
rez.capst = x.capst;
}
if(y.capdr <= y.capst)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |