Submission #517324

# Submission time Handle Problem Language Result Execution time Memory
517324 2022-01-23T03:54:00 Z blue Arcade (NOI20_arcade) C++17
Compilation error
0 ms 0 KB
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;

using pii = pair<int, int>;

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

    int N, M;
    cin >> N >> M;

    pii O[N];
    for(int i = 0; i < N; i++) cin >> O[i].first;
    for(int i = 0; i < N; i++) cin >> O[i].second;

    sort(O, O+N);

    bool works = 1;
    for(int i = 0; i+1 < N; i++)
        if(abs(A[i+1] - A[i]) > abs(T[i+1] - T[i]))
            works = 0;

    if(works) cout << 1 << '\n';
    else cout << 2 << '\n';
}

Compilation message

Arcade.cpp: In function 'int main()':
Arcade.cpp:24:16: error: 'A' was not declared in this scope
   24 |         if(abs(A[i+1] - A[i]) > abs(T[i+1] - T[i]))
      |                ^
Arcade.cpp:24:37: error: 'T' was not declared in this scope
   24 |         if(abs(A[i+1] - A[i]) > abs(T[i+1] - T[i]))
      |                                     ^