제출 #471388

#제출 시각아이디문제언어결과실행 시간메모리
471388MohamedFaresNebiliWall (IOI14_wall)C++14
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h> #include "wall.h" using namespace std; using ll = long long; using ld = long double; using vl = vector<long long>; #define mp make_pair #define pb push_back #define pp pop_back #define ff first #define ss second #define lb lower_bound #define ub upper_bound #define all(x) (x).begin() , (x).end() const int N = 2*100005; const long long MOD = 1e9+7; const long double EPS = 0.000000001; const double PI = 3.14159265358979323846; const int nx[4]={1, -1, 0, 0}, ny[4]={0, 0, 1, -1}; long long gcd(int a, int b) { return (b==0?a:gcd(b, a%b)); } long long lcm(int a, int b) { return a*(b/gcd(a, b)); } long long fact(int a) { return (a==1?1:a*fact(a-1)); } int st[4*200005], lazy[4*200005], p[4*200005]; void prop(int v, int l, int r) { if(l==r||p[v]==-1) return; if(p[v]==1) { st[v*2]=max(st[v*2], lazy[v]); st[v*2+1]=max(st[v*2+1], lazy[v]); lazy[v*2]=max(lazy[v*2], lazy[v]); lazy[v*2]=max(lazy[v*2+1], lazy[v]); } else if(p[v]==2) { st[v*2]=min(st[v*2], lazy[v]); st[v*2+1]=min(st[v*2+1], lazy[v]); lazy[v*2]=min(lazy[v*2], lazy[v]); lazy[v*2]=min(lazy[v*2+1], lazy[v]); } p[v*2]=p[v*2+1]=p[v]; p[v]=-1; } void update0(int v, int l, int r, int lo, int hi, int val) { prop(v, l, r); if(l>hi||r<lo) return; if(l>=lo&&r<=hi) { lazy[v]=max(lazy[v], val); p[v]=1; st[v]=max(st[v], val); prop(v, l, r); return; } update0(v*2, l, (l+r)/2, lo, hi, val); update0(v*2+1, (l+r)/2+1, r, lo, hi, val); } void update(int v, int l, int r, int lo, int hi, int val) { prop(v, l, r); if(l>hi||r<lo) return; if(l>=lo&&r<=hi) { lazy[v]=min(lazy[v], val); p[v]=2; st[v]=min(st[v], val); prop(v, l, r); return; } update(v*2, l, (l+r)/2, lo, hi, val); update(v*2+1, (l+r)/2+1, r, lo, hi, val); } ll query(int v, int l, int r, int ind) { prop(v, l, r); if(l==r) return st[v]; int mid=(l+r)/2; if(ind<=mid) return query(v*2, l, mid, ind); else return query(v*2+1, mid+1, r, ind); }

컴파일 시 표준 에러 (stderr) 메시지

/usr/bin/ld: /tmp/ccAjdPO1.o: in function `main':
grader.cpp:(.text.startup+0x133): undefined reference to `buildWall(int, int, int*, int*, int*, int*, int*)'
collect2: error: ld returned 1 exit status