# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
707534 | ToroTN | Election (BOI18_election) | C++14 | 462 ms | 27332 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include<bits/stdc++.h>
using namespace std;
int n,t,x,y;
char s[500005];
struct node
{
int l,r,sum,ans;
} seg[2000005];
node merge(node lft,node rht)
{
node res;
res.sum=lft.sum+rht.sum;
res.l=max(lft.l,lft.sum+rht.l);
res.r=max(rht.r,rht.sum+lft.r);
res.ans=max({lft.l+rht.r,lft.ans+rht.sum,rht.ans+lft.sum});
return res;
}
void build(int tree,int st,int ed)
{
int md=(st+ed)/2;
if(st==ed)
{
if(s[st]=='T')
{
seg[tree].l=seg[tree].r=seg[tree].sum=seg[tree].ans=1;
}else
{
seg[tree].l=seg[tree].r=seg[tree].ans=0;
seg[tree].sum=-1;
}
컴파일 시 표준 에러 (stderr) 메시지
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |