Problem candies
User bz
Submission Time 2024-04-20 16:18:17
Score 0
Max Time N/A
Max Memory N/A

Compile Error

candies.cpp: In function ‘int main()’:
candies.cpp:36:16: error: no match for ‘operator[]’ (operand types are ‘std::unordered_set<long long int, int>’ and ‘long long int’)
36 | cnt[x]++;
| ^
candies.cpp:40:20: error: no match for ‘operator[]’ (operand types are ‘std::unordered_set<long long int, int>’ and ‘long long int’)
40 | if (cnt[x] > 0) cnt[x]--;
| ^
candies.cpp:40:32: error: no match for ‘operator[]’ (operand types are ‘std::unordered_set<long long int, int>’ and ‘long long int’)
40 | if (cnt[x] > 0) cnt[x]--;
| ^
candies.cpp:41:20: error: no match for ‘operator[]’ (operand types are ‘std::unordered_set<long long int, int>’ and ‘long long int’)
41 | if (cnt[x] == 0) req.insert(x);
| ^