QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#485812#7779. Swiss StageMaMengQiCompile Error//C++17137b2024-07-21 09:45:132024-07-21 09:45:13

Details

answer.code:2:7: error: expected nested-name-specifier before ‘namepscae’
    2 | using namepscae std;
      |       ^~~~~~~~~
answer.code: In function ‘int main()’:
answer.code:6:4: error: ‘cin’ was not declared in this scope; did you mean ‘std::cin’?
    6 |    cin>>x>>y;
      |    ^~~
      |    std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:146,
                 from answer.code:1:
/usr/include/c++/13/iostream:62:18: note: ‘std::cin’ declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
answer.code:7:12: error: ‘cout’ was not declared in this scope; did you mean ‘std::cout’?
    7 |    if(y==2)cout<<(3-x)*2;
      |            ^~~~
      |            std::cout
/usr/include/c++/13/iostream:63:18: note: ‘std::cout’ declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
answer.code:8:8: error: ‘cout’ was not declared in this scope; did you mean ‘std::cout’?
    8 |   else cout<<2-x+2;
      |        ^~~~
      |        std::cout
/usr/include/c++/13/iostream:63:18: note: ‘std::cout’ declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~