# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
681353 | finn__ | Election (BOI18_election) | C++17 | 250 ms | 28068 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
struct node
{
int l, r, s, a;
};
inline node transition(node const &u, node const &v)
{
return (node){
.l = max(u.l, u.s + v.l),
.r = max(v.r, v.s + u.r),
.s = u.s + v.s,
.a = max(u.l + v.r, max(u.a + v.s, v.a + u.s))};
}
int main()
{
ios_base::sync_with_stdio(0);
cin.tie(0);
size_t n;
string s;
cin >> n >> s;
vector<node> tree(2 * (1 << (32 - __builtin_clz(n))), {0, 0, 0, 0});
for (size_t 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... |