Problem hungrycats2
User xiaocai918
Submission Time 2026-09-27 09:18:17
Score 0
Max Time N/A
Max Memory N/A

Compile Error

hungrycats2.cpp: In function ‘int main()’:
hungrycats2.cpp:9:10: error: expected ‘;’ before ‘vector’
9 | cin >> n
| ^
| ;
10 | vector<long long> h(n);
| ~~~~~~
hungrycats2.cpp:12:10: error: ‘h’ was not declared in this scope
12 | cin >> h[i];
| ^
hungrycats2.cpp:15:7: error: ‘h’ was not declared in this scope
15 | sort(h.begin(), h.end());
| ^
hungrycats2.cpp:18:27: error: ‘c’ was not declared in this scope
18 | for (int i = 0; i < (int)c.size() - 1;) {
| ^