QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#455561#7276. A Light Inconvenienceyoy68Compile Error//C++14930b2024-06-26 16:22:292024-06-26 16:22:30

详细

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)
      |                        ^
answer.code: In function ‘std::vector<int> Rev()’:
answer.code:21:16: error: conversion from ‘vector<long long int>’ to non-scalar type ‘vector<int>’ requested
   21 |         vi a = f;
      |                ^
answer.code: At global scope:
answer.code:27:14: error: ambiguating new declaration of ‘std::pair<long long int, std::vector<int> > join(LL)’
   27 | pair<LL, vi> join(LL p)
      |              ^~~~
In file included from answer.code:2:
light.h:5:46: note: old declaration ‘std::pair<long long int, std::vector<long long int> > join(long long int)’
    5 | std::pair<long long, std::vector<long long>> join(long long);
      |                                              ^~~~
answer.code:40:14: error: ambiguating new declaration of ‘std::pair<long long int, std::vector<int> > leave(LL)’
   40 | pair<LL, vi> leave(LL p)
      |              ^~~~~
light.h:6:46: note: old declaration ‘std::pair<long long int, std::vector<long long int> > leave(long long int)’
    6 | std::pair<long long, std::vector<long long>> leave(long long);
      |                                              ^~~~~