Submission #744871

#TimeUsernameProblemLanguageResultExecution timeMemory
744871jjcoderRainforest Jumps (APIO21_jumps)C++14
Compilation error
0 ms0 KiB
void solve()
{
    int n,h;
    cin>>n>>h;
    vector<int> a(n);
    for(int i=0; i<n; i++)cin>>a[i];
    while(h--)
    {
       int A,B,C,D,min=200001;
       cin>>A>>B>>C>>D;
       cout << C-B <<endl;
    }
}

int main()
{
    //setIO("input");
    ios::sync_with_stdio(0);
    solve();
    return 0;
}

Compilation message (stderr)

jumps.cpp: In function 'void solve()':
jumps.cpp:4:5: error: 'cin' was not declared in this scope
    4 |     cin>>n>>h;
      |     ^~~
jumps.cpp:5:5: error: 'vector' was not declared in this scope
    5 |     vector<int> a(n);
      |     ^~~~~~
jumps.cpp:5:12: error: expected primary-expression before 'int'
    5 |     vector<int> a(n);
      |            ^~~
jumps.cpp:6:32: error: 'a' was not declared in this scope
    6 |     for(int i=0; i<n; i++)cin>>a[i];
      |                                ^
jumps.cpp:11:8: error: 'cout' was not declared in this scope
   11 |        cout << C-B <<endl;
      |        ^~~~
jumps.cpp:11:22: error: 'endl' was not declared in this scope
   11 |        cout << C-B <<endl;
      |                      ^~~~
jumps.cpp:9:20: warning: unused variable 'min' [-Wunused-variable]
    9 |        int A,B,C,D,min=200001;
      |                    ^~~
jumps.cpp: In function 'int main()':
jumps.cpp:18:5: error: 'ios' has not been declared
   18 |     ios::sync_with_stdio(0);
      |     ^~~