Problem malcolm
User cwu
Submission Time 2026-06-14 19:49:37
Score 0
Max Time N/A
Max Memory N/A

Compile Error

malcolm.cpp: In function ‘int main()’:
malcolm.cpp:24:23: error: invalid types ‘int[int]’ for array subscript
24 | name_lengths[i] = name.length();
| ^
malcolm.cpp:33:57: error: invalid types ‘int[int]’ for array subscript
33 | int outdated_length = name_lengths[i - k - 1];
| ^
malcolm.cpp:34:38: error: invalid types ‘int[int]’ for array subscript
34 | len_count[outdated_length]--;
| ^
malcolm.cpp:38:44: error: invalid types ‘int[int]’ for array subscript
38 | int current_length = name_lengths[i];
| ^
malcolm.cpp:39:55: error: invalid types ‘int[int]’ for array subscript
39 | good_friends_count += len_count[current_length];
| ^
malcolm.cpp