This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
#define fi first
#define se second
#define em emplace
#define eb emplace_back
#define all(V) (V).begin(), (V).end()
#define unq(V) (V).resize(unique(all(V))-(V).begin())
using namespace std;
typedef long long ll;
typedef vector<ll> vlm;
typedef vector<int> vim;
typedef pair<ll, ll> pll;
typedef pair<int, int> pii;
struct node {
int A[2], B[2];
vim V[2][2];
}st[1<<20];
void upd(int n, int s, int e, vim &A, vim &B) {
for (int i=0; i<4; i++) st[n].V[(i/2)&1][i&1].resize(e-s+1);
if (s==e) return ;
int md=(s+e)/2;
upd(n*2, s, md, A, B); upd(n*2+1, md+1, e, A, B);
}
int main() {
cin.tie(0)->sync_with_stdio(0);
int N; vim A(N*2), B(N*2);
cin>>N;
for (auto &i:A) cin>>i;
for (auto &i:B) cin>>i;
upd(1, 0, N*2-1, A, B);
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |