# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
956556 | moonrabbit2 | Election (BOI18_election) | C++17 | 541 ms | 54076 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,sse4.1,sse4.2,popcnt,abm,mmx,avx,avx2,fma")
#include <bits/stdc++.h>
using namespace std;
#ifdef LOCAL
#include "debug.h"
#else
#define debug(...)
#endif
using pii=array<int,2>;
using tii=array<int,3>;
const int N=500005;
int n,a[N],s[N],q,ans[N],pos[2*N];
vector<pii> qry[N];
string S;
struct ST{
tii T[2*N];
tii mrg(tii L,tii R){
return tii{min(L[0]+R[1],R[0]),L[1]+R[1],L[2]+R[2]};
}
void init(int nd,int l,int r){
T[nd]={0,0,r-l+1};
if(l==r) return;
int m=(l+r)>>1,ln=nd+1,rn=nd+2*(m-l+1);
init(ln,l,m); init(rn,m+1,r);
}
void upd(int nd,int l,int r,int x,int v){
if(l==r){
T[nd]={min(0,v),v,v==0};
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |