Problem sana
User bachnguyen123
Submission Time 2025-11-23 21:03:04
Score 0
Max Time N/A
Max Memory N/A

Compile Error

sana.cpp: In function ‘void compress()’:
sana.cpp:11:39: error: expected ‘;’ before ‘:’ token
11 | sort(a_copy.begin(), a_copy.end()):
| ^
| ;
sana.cpp:12:20: error: ‘i’ was not declared in this scope
12 | for(int i = 0; i < n; i++)
| ^
sana.cpp: In function ‘int main()’:
sana.cpp:47:15: error: could not convert ‘vals[i]’ from ‘std::vector<int>’ to ‘bool’
47 | if(vals[i])
| ~~~~~~^
| |
| std::vector<int>
sana.cpp:48:2: error: expected primary-expression before ‘}’ token
48 | }
| ^