Problem snacks
User chog
Submission Time 2026-03-04 11:18:38
Score 0
Max Time N/A
Max Memory N/A

Compile Error

snacks.cpp:4:3: error: invalid preprocessing directive #Build
4 | # Build frequency array and existing values
| ^~~~~
snacks.cpp:18:7: error: invalid preprocessing directive #Collect
18 | # Collect values in freq that are in [l, r]
| ^~~~~~~
snacks.cpp:25:24: error: stray ‘#’ in program
25 | del freq[val] # remove old value
| ^
snacks.cpp:1:1: error: ‘n’ does not name a type
1 | n, q = map(int, input().split())
| ^
snacks.cpp:6:1: error: expected unqualified-id before ‘for’
6 | for p in plate:
| ^~~