Submission #1266644

#TimeUsernameProblemLanguageResultExecution timeMemory
1266644avohadoWall (IOI14_wall)C++20
Compilation error
0 ms0 KiB
#include <bits/stdc++.h>
#include "wall.h"
using namespace std;
const long maxn=2e6+5;
int tree[maxn*2], mint[maxn*2], maxt[maxn*2], push[maxn*2], a[maxn];
void get(int v, int l, int r, int tl, int tr, int h, int op){
    if(push[v]!=-1){
        mint[v]=maxt[v]=push[v];
        if(tl!=tr){
            push[v*2]=push[v*2+1]=push[v];
        }
        push[v]=-1;
    }
    if(tl>r||l>tr){
        return;
    }
    if(tl>=l&&tr<=r){
        if(op==1&&maxt[v]<h||op==2&&mint[v]>h){
            mint[v]=maxt[v]=h;
            if(tl!=tr){
                push[v*2]=push[v*2+1]=h;
            }
            return;
        }else if(op==1&&mint[v]>=h||op==2&&maxt[v]=<h){
            return;
        }
    }
    int tm=(tl+tr)/2;
    get(v*2, l, r, tl, tm, h, op);
    get(v*2+1, l, r, tm+1, tr, h, op);
    mint[v]=min(mint[v*2], mint[v*2+1]);
    maxt[v]=max(maxt[v*2], maxt[v*2+1]);
}
void bt(int v, int tl, in tr){
    if(tl==tr){
        a[tl]=mint[v];
        return;
    }
    int tm=(tl+tr)/2;
    bt(v*2, tl, tm);
    bt(v*2+1, tm+1, tr);
}
void buildWall(int n, int k, int op[], int left[], int right[], int height[], int finalHeight[]){
    for(int i=0; i<k; i++){
        get(1, left[i], right[i], 0, n-1, height[i], op[i]);
    }
    bt(1, 0, n-1);
    for(int i=0; i<n; i++){
        finalHeight[i]=a[i];
    }
    return;
}

Compilation message (stderr)

wall.cpp: In function 'void get(int, int, int, int, int, int, int)':
wall.cpp:24:52: error: expected primary-expression before '<' token
   24 |         }else if(op==1&&mint[v]>=h||op==2&&maxt[v]=<h){
      |                                                    ^
wall.cpp: At global scope:
wall.cpp:34:24: error: 'in' has not been declared
   34 | void bt(int v, int tl, in tr){
      |                        ^~