# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
674498 | alexdd | Sjeckanje (COCI21_sjeckanje) | C++17 | 0 ms | 340 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#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... |