Problem wrongreverse
User niicoletong
Submission Time 2025-06-20 16:17:27
Score 0
Max Time N/A
Max Memory N/A

Compile Error

wrongreverse.cpp: In function ‘int main()’:
wrongreverse.cpp:16:21: error: no match for call to ‘(std::vector<int>) (int)’
16 | a[i] = b(n + i - 1);
| ^
wrongreverse.cpp:25:22: error: no match for call to ‘(std::vector<int>) (int)’
25 | db[i] = a(n + i - 1);
| ^
wrongreverse.cpp:31:4: error: expected ‘}’ before ‘else’
31 | } else {
| ^~~~
wrongreverse.cpp:28:15: note: to match this ‘{’
28 | if (db == b) {
| ^
wrongreverse.cpp:32:14: error: no match for ‘operator<’ (operand types are ‘std::basic_ostream<char>’ and ‘const char [2]’)
32 | cout << -1 < " ";
| ~~~~~~~~~~ ^ ~~~
| | |
| | const char [2]
| std::basic_ostream<char>
In file included from /usr/include/c++/9/regex:62,
from /usr/include/x86_64-linux-gnu/c++/9/