Problem candies
User weccs
Submission Time 2026-09-26 13:04:35
Score 0
Max Time N/A
Max Memory N/A

Compile Error

candies.cpp: In function ‘int main()’:
candies.cpp:88:28: error: no match for ‘operator[]’ (operand types are ‘std::unordered_multiset<int, int>’ and ‘int’)
88 | if (candies[x] == 0) root -> upd(x,1);
| ^
candies.cpp:89:24: error: no match for ‘operator[]’ (operand types are ‘std::unordered_multiset<int, int>’ and ‘int’)
89 | candies[x]++;
| ^
candies.cpp:92:28: error: no match for ‘operator[]’ (operand types are ‘std::unordered_multiset<int, int>’ and ‘int’)
92 | if (candies[x] > 0) candies[x]--;
| ^
candies.cpp:92:44: error: no match for ‘operator[]’ (operand types are ‘std::unordered_multiset<int, int>’ and ‘int’)
92 | if (candies[x] > 0) candies[x]--;
| ^
candies.cpp:93:28: error: no match for ‘