제출 #1190407

#제출 시각아이디문제언어결과실행 시간메모리
1190407validA + B (IOI24_aplusb)C++20
컴파일 에러
0 ms0 KiB
#include <algorithm>
#include <iostream>
#include <string>
#include <functional>
#include <bits/stdc++.h>
int main() {
    int a,b;
    cin>>a>>b;
    cout<<a+b;
    return 0;
}

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

aplusb.cpp: In function 'int main()':
aplusb.cpp:8:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    8 |     cin>>a>>b;
      |     ^~~
      |     std::cin
In file included from aplusb.cpp:2:
/usr/include/c++/11/iostream:60:18: note: 'std::cin' declared here
   60 |   extern istream cin;           /// Linked to standard input
      |                  ^~~
aplusb.cpp:9:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    9 |     cout<<a+b;
      |     ^~~~
      |     std::cout
In file included from aplusb.cpp:2:
/usr/include/c++/11/iostream:61:18: note: 'std::cout' declared here
   61 |   extern ostream cout;          /// Linked to standard output
      |                  ^~~~