Problem ants
User eulerleonhardfan
Submission Time 2024-02-11 18:03:36
Score 0
Max Time N/A
Max Memory N/A

Compile Error

ants.cpp:24:9: error: ‘x’ was not declared in this scope
24 | int ls( x) {
| ^
ants.cpp: In function ‘void update(int, int, int)’:
ants.cpp:30:25: error: ‘ls’ cannot be used as a function
30 | for(; l <= n; l += ls(l)) ft[l] += v; // Add v to the difference at l
| ^
ants.cpp:31:25: error: ‘ls’ cannot be used as a function
31 | for(; r <= n; r += ls(r)) ft[r] -= v; // Subtract v to the difference at r+1
| ^
ants.cpp: In function ‘int query(int)’:
ants.cpp:36:20: error: ‘ls’ cannot be used as a function
36 | for(; p; p -= ls(p)) sum += ft[p];
| ^