QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#157437#7109. Traveling on the Axisucup-team966#Compile Error//C++141.3kb2023-09-02 15:20:402023-09-02 15:20:40

Details

answer.code: In function ‘int main()’:
answer.code:15:33: error: ‘strlen’ was not declared in this scope
   15 |                     sum += 2 * (strlen(c) - i);
      |                                 ^~~~~~
answer.code:2:1: note: ‘strlen’ is defined in header ‘<cstring>’; did you forget to ‘#include <cstring>’?
    1 | #include<iostream>
  +++ |+#include <cstring>
    2 | using namespace std;
answer.code:16:34: error: ‘strlen’ was not declared in this scope
   16 |                 else sum += 1 * (strlen(c) - i);
      |                                  ^~~~~~
answer.code:16:34: note: ‘strlen’ is defined in header ‘<cstring>’; did you forget to ‘#include <cstring>’?
answer.code:19:50: error: ‘strlen’ was not declared in this scope
   19 |                 if(c[i] == c[i - 1]) sum += 2 * (strlen(c) - i);
      |                                                  ^~~~~~
answer.code:19:50: note: ‘strlen’ is defined in header ‘<cstring>’; did you forget to ‘#include <cstring>’?
answer.code:20:34: error: ‘strlen’ was not declared in this scope
   20 |                 else sum += 1 * (strlen(c) - i);
      |                                  ^~~~~~
answer.code:20:34: note: ‘strlen’ is defined in header ‘<cstring>’; did you forget to ‘#include <cstring>’?
answer.code:26:40: error: ‘strlen’ was not declared in this scope
   26 |                 ans[i] = ans[i - 1] - (strlen(c) - i + 1) * 2 + (strlen(c) - i) * 1;
      |                                        ^~~~~~
answer.code:26:40: note: ‘strlen’ is defined in header ‘<cstring>’; did you forget to ‘#include <cstring>’?
answer.code:29:40: error: ‘strlen’ was not declared in this scope
   29 |                 ans[i] = ans[i - 1] - (strlen(c) - i + 1) * 2;
      |                                        ^~~~~~
answer.code:29:40: note: ‘strlen’ is defined in header ‘<cstring>’; did you forget to ‘#include <cstring>’?
answer.code:32:40: error: ‘strlen’ was not declared in this scope
   32 |                 ans[i] = ans[i - 1] - (strlen(c) - i + 1) * 1 + (strlen(c) - i) * 1;
      |                                        ^~~~~~
answer.code:32:40: note: ‘strlen’ is defined in header ‘<cstring>’; did you forget to ‘#include <cstring>’?
answer.code:35:40: error: ‘strlen’ was not declared in this scope
   35 |                 ans[i] = ans[i - 1] - (strlen(c) - i + 1) * 1 - (strlen(c) - i) * 1;
      |                                        ^~~~~~
answer.code:35:40: note: ‘strlen’ is defined in header ‘<cstring>’; did you forget to ‘#include <cstring>’?