QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#456966#7276. A Light Inconvenienceyoy68Compile Error//C++14831b2024-06-28 19:06:052024-06-28 19:06:52

Details

implementer.cpp:17:22: error: ‘optional’ does not name a type
   17 | template<typename T> optional<T> read() {
      |                      ^~~~~~~~
implementer.cpp: In function ‘int main()’:
implementer.cpp:36:17: error: ‘optional’ was not declared in this scope
   36 |                 optional<long long> d = read<long long>();
      |                 ^~~~~~~~
implementer.cpp:36:17: note: ‘std::optional’ is only available from C++17 onwards
implementer.cpp:36:26: error: expected primary-expression before ‘long’
   36 |                 optional<long long> d = read<long long>();
      |                          ^~~~
implementer.cpp:37:24: error: ‘d’ was not declared in this scope
   37 |                 if(not d or *d == 0)
      |                        ^