QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#362672#8515. KMOPucup-team311#Compile Error//C++142.7kb2024-03-23 16:38:382024-03-23 16:38:39

Details

answer.code:74:6: error: ‘optional’ in namespace ‘std’ does not name a template type
   74 | std::optional<int> extend(int state, char c) {
      |      ^~~~~~~~
answer.code:74:1: note: ‘std::optional’ is only available from C++17 onwards
   74 | std::optional<int> extend(int state, char c) {
      | ^~~
answer.code:82:6: error: ‘optional’ in namespace ‘std’ does not name a template type
   82 | std::optional<int> extend(int state, std::string_view s) {
      |      ^~~~~~~~
answer.code:82:1: note: ‘std::optional’ is only available from C++17 onwards
   82 | std::optional<int> extend(int state, std::string_view s) {
      | ^~~
answer.code: In function ‘int main()’:
answer.code:110:34: error: ‘extend’ was not declared in this scope; did you mean ‘extern’?
  110 |                 auto new_state = extend(prev_state, s.substr(0, prefix));
      |                                  ^~~~~~
      |                                  extern