Problem firstabc
User christal
Submission Time 2023-12-06 09:44:15
Score 0
Max Time N/A
Max Memory N/A

Compile Error

firstabc.cpp: In function ‘int main()’:
firstabc.cpp:17:5: error: expected initializer before ‘int’
17 | int a_index = 0;
| ^~~
firstabc.cpp:26:13: error: ‘a_index’ was not declared in this scope; did you mean ‘c_index’?
26 | a_index = i + 1;
| ^~~~~~~
| c_index
firstabc.cpp:34:24: error: ‘a_index’ was not declared in this scope; did you mean ‘c_index’?
34 | ans += min(a_index, c_index);
| ^~~~~~~
| c_index
firstabc.cpp:41:24: error: ‘a_index’ was not declared in this scope; did you mean ‘c_index’?
41 | ans += min(a_index, b_index);
| ^~~~~~~
| c_index
firstabc.cpp:47:12: error: redeclaration of ‘std::string str’
47 | string str = "babac";
| ^~~
firstabc.cpp:5:9: note: ‘std::string str’ previousl