Problem ballgame
User PlayVoltz
Submission Time 2023-12-12 23:25:03
Score 0
Max Time N/A
Max Memory N/A

Compile Error

ballgame.cpp: In function ‘long long int ftsum(long long int)’:
ballgame.cpp:15:8: error: ‘ft’ was not declared in this scope
15 | sum=(ft[index]+sum)%MOD;
| ^~
ballgame.cpp: In function ‘void up(long long int, long long int)’:
ballgame.cpp:22:16: error: ‘n’ was not declared in this scope; did you mean ‘yn’?
22 | while (index<=n){
| ^
| yn
ballgame.cpp:23:3: error: ‘ft’ was not declared in this scope
23 | ft[index]=(ft[index]+val)%MOD;
| ^~
ballgame.cpp: In function ‘void query(long long int, long long int)’:
ballgame.cpp:29:42: error: return-statement with a value, in function returning ‘void’ [-fpermissive]
29 | return (ftsum(right)-ftsum(left-1)+MOD)%MOD;
| ^~~
ballgame.cpp: In function ‘int ballgame(int, int, int, int*, int*)’:
ballgame.cpp:35:2: error: ‘ft’ was not declared in this scope
35 | ft