제출 #744872

#제출 시각아이디문제언어결과실행 시간메모리
744872jjcoder밀림 점프 (APIO21_jumps)C++17
컴파일 에러
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; }

컴파일 시 표준 에러 (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;
      |                      ^~~~