Submission #744872

#TimeUsernameProblemLanguageResultExecution timeMemory
744872jjcoderRainforest Jumps (APIO21_jumps)C++17
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; cin>>A>>B>>C>>D; cout << C-B <<endl; } } int main() { //setIO("input"); 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:7:14: error: 'a' was not declared in this scope
    7 |         cin>>a[i];
      |              ^
jumps.cpp:13:8: error: 'cout' was not declared in this scope
   13 |        cout << C-B <<endl;
      |        ^~~~
jumps.cpp:13:22: error: 'endl' was not declared in this scope
   13 |        cout << C-B <<endl;
      |                      ^~~~