QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#157437 | #7109. Traveling on the Axis | ucup-team966# | Compile Error | / | / | C++14 | 1.3kb | 2023-09-02 15:20:40 | 2023-09-02 15:20:40 |
Due to the privacy settings of the submitter, you are not allowed to view this code.
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>’?