제출 #382009

#제출 시각아이디문제언어결과실행 시간메모리
382009VEGAnnHop (COCI21_hop)C++14
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h>
#define sz(x) ((int)x.size())
#define PB push_back
#define i2 array<int,2>
using namespace std;
typedef long long ll;
const int MX = int(1e7) + 10;
const int oo = 2e9;
const int N = 1010;
ll x[N];
int n;

int main(){
    ios_base::sync_with_stdio(0); cin.tie(0);

#ifdef _LOCAL
    freopen("in.txt","r",stdin);
#endif // _LOCAL

    cin >> n;

    /// хотя бы один должен быть доступен, иначе ban

    for (int i = 1; i <= n; i++)
        cin >> x[i];

    dp[1][0] = dp[1][1] = dp[1][2] = 0;

    int now = 0;

    for (int i = 1; i <= n; i++){
        for (int j = 1; j < i; j++)
            cout << ((++now) % 3) + 1 << " ";
        cout << '\n';
    }

    return 0;
}

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

Main.cpp: In function 'int main()':
Main.cpp:27:5: error: 'dp' was not declared in this scope
   27 |     dp[1][0] = dp[1][1] = dp[1][2] = 0;
      |     ^~