Problem snail
User CKCodeBreaker55
Submission Time 2025-01-13 14:33:17
Score 0
Max Time N/A
Max Memory N/A

Compile Error

snail.cpp: In function ‘int main()’:
snail.cpp:7:29: error: expected initializer before ‘-’ token
7 | int H, N, total = 0, index - 0;
| ^
snail.cpp:25:28: error: invalid types ‘long long int [H][<unresolved overloaded function type>]’ for array subscript
25 | number = number - P[index];
| ^
snail.cpp:26:13: error: invalid operands of types ‘<unresolved overloaded function type>’ and ‘long unsigned int’ to binary ‘operator==’
26 | if (index == sizeof(P) - 1)
| ~~~~~~^~~~~~~~~~~~~~~~
snail.cpp:28:12: error: overloaded function with no contextual type information
28 | index = 0;
| ^
snail.cpp:31:7: error: no match for ‘operator<<’ (operand types are ‘std::ostream’ {aka ‘std::basic_ostream<char>’} and ‘<unresolved overloaded function type>’)
31 | cout << index;
| ~~~~~^~~~~~~~
In f