QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#733723#5422. Perfect PalindromeHuangHanShengCompile Error//C++11329b2024-11-10 20:40:102024-11-10 20:40:13

Details

answer.code: In function ‘int main()’:
answer.code:5:5: error: ‘cin’ was not declared in this scope
    5 |     cin>>a;
      |     ^~~
answer.code:1:1: note: ‘std::cin’ is defined in header ‘<iostream>’; did you forget to ‘#include <iostream>’?
  +++ |+#include <iostream>
    1 | using namespace std;
answer.code:8:9: error: ‘string’ was not declared in this scope
    8 |         string s;
      |         ^~~~~~
answer.code:1:1: note: ‘std::string’ is defined in header ‘<string>’; did you forget to ‘#include <string>’?
  +++ |+#include <string>
    1 | using namespace std;
answer.code:9:14: error: ‘s’ was not declared in this scope
    9 |         cin>>s;int k=0,j=0;
      |              ^
answer.code:14:18: error: ‘cout’ was not declared in this scope
   14 |             {k++;cout<<s[i]<<endl;
      |                  ^~~~
answer.code:14:18: note: ‘std::cout’ is defined in header ‘<iostream>’; did you forget to ‘#include <iostream>’?
answer.code:14:30: error: ‘endl’ was not declared in this scope
   14 |             {k++;cout<<s[i]<<endl;
      |                              ^~~~
answer.code:1:1: note: ‘std::endl’ is defined in header ‘<ostream>’; did you forget to ‘#include <ostream>’?
  +++ |+#include <ostream>
    1 | using namespace std;
answer.code:19:9: error: ‘cout’ was not declared in this scope
   19 |         cout<<k/2<<endl;;
      |         ^~~~
answer.code:19:9: note: ‘std::cout’ is defined in header ‘<iostream>’; did you forget to ‘#include <iostream>’?
answer.code:19:20: error: ‘endl’ was not declared in this scope
   19 |         cout<<k/2<<endl;;
      |                    ^~~~
answer.code:19:20: note: ‘std::endl’ is defined in header ‘<ostream>’; did you forget to ‘#include <ostream>’?