# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
704697 | safaricola | Crossing (JOI21_crossing) | C++17 | 498 ms | 2464 KiB |
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>
using namespace std;
typedef long long int ll;
#define rep(i,n) for(ll i = 0; i < n; i++)
#define f first
#define s second
typedef pair<ll ,ll> ii;
string s[4];
char ch;
int n, a[10][200010],pre[10][4][200010],q,t,x,y;
int f(int x, int y){
return (6-x-y)%3;
}
struct node{
int s,e,m,v,lazy,id;
node *l, *r;
node(int S,int E,int ID){
s=S,e=E,m=(s+e)/2;
id=ID;v=0;lazy=-1;
if(s==e)return;
l= new node(s,m,id);
r= new node(m+1,e,id);
}
void prop(){
if(lazy==-1)return;
v=pre[id][lazy][e]- (s==0 ? 0: pre[id][lazy][s-1]);
if(s!=e){
l->lazy=lazy;
r->lazy=lazy;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |