Submission #1276035

#TimeUsernameProblemLanguageResultExecution timeMemory
1276035hiepsimauhong벽 (IOI14_wall)C++20
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> #include "wall.h" using namespace std; #define int long long using ll = long long; #define FOR(I, L, R) for(int I(L) ; I <= (int)R ; ++I) #define FOD(I, R, L) for(int I(R) ; I >= (int)L ; --I) #define FOA(I, A) for(auto &I : A) #define print(A,L,R) FOR(OK, L, R){if(A[OK]<=-oo / 10||A[OK]>=oo)cout<<"- ";else cout<<A[OK]<<' ';}cout<<'\n'; #define prints(A) FOA(OK, A){cout<<OK<<' ';}cout << '\n'; #define printz(A,L,R) FOR(OK, 0, L){FOR(KO, 0, R){if(A[OK][KO]>-oo&&A[OK][KO]<oo)cout<<A[OK][KO]<<' ';else cout << "- ";} cout << '\n';}cout << '\n'; #define fs first #define sd second #define ii pair<int,int> #define iii pair<int, ii> #define all(A) A.begin(), A.end() #define quickly ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); const int N = 2e6 + 5; const int M = 5e5 + 5; const int mod = 1e9 + 7; const int oo = 1e9; int n, q; /// Input int a[N]; void buildWall(int _n, int _q, int op[], int left[], int right[], int height[], int finalHeight[]){ n = _n; q = _q; FOR(_, 1, q){ if(op[_] == 1){ FOR(i, lf[_], rg[_]){ a[i] = max(a[i], height[_]); } } else{ FOR(i, lf[_], rg[_]){ a[i] = min(a[i], height[_]); } } } FOR(i, 0, n - 1){ finalHeight[i] = a[i]; } }

Compilation message (stderr)

wall.cpp: In function 'void buildWall(long long int, long long int, long long int*, long long int*, long long int*, long long int*, long long int*)':
wall.cpp:40:32: error: 'lf' was not declared in this scope; did you mean 'll'?
   40 |                         FOR(i, lf[_], rg[_]){
      |                                ^~
wall.cpp:9:32: note: in definition of macro 'FOR'
    9 | #define FOR(I, L, R) for(int I(L) ; I <= (int)R ; ++I)
      |                                ^
wall.cpp:40:39: error: 'rg' was not declared in this scope
   40 |                         FOR(i, lf[_], rg[_]){
      |                                       ^~
wall.cpp:9:47: note: in definition of macro 'FOR'
    9 | #define FOR(I, L, R) for(int I(L) ; I <= (int)R ; ++I)
      |                                               ^
wall.cpp:45:32: error: 'lf' was not declared in this scope; did you mean 'll'?
   45 |                         FOR(i, lf[_], rg[_]){
      |                                ^~
wall.cpp:9:32: note: in definition of macro 'FOR'
    9 | #define FOR(I, L, R) for(int I(L) ; I <= (int)R ; ++I)
      |                                ^
wall.cpp:45:39: error: 'rg' was not declared in this scope
   45 |                         FOR(i, lf[_], rg[_]){
      |                                       ^~
wall.cpp:9:47: note: in definition of macro 'FOR'
    9 | #define FOR(I, L, R) for(int I(L) ; I <= (int)R ; ++I)
      |                                               ^