Problem prefixsums
User placeholder
Submission Time 2026-03-30 18:18:27
Score 0
Max Time N/A
Max Memory N/A

Compile Error

prefixsums.cpp: In function ‘int main()’:
prefixsums.cpp:2:2: error: ‘ios’ has not been declared
2 | ios::sync_with_stdio(false);
| ^~~
prefixsums.cpp:3:2: error: ‘cin’ was not declared in this scope
3 | cin.tie(NULL);
| ^~~
prefixsums.cpp:3:10: error: ‘NULL’ was not declared in this scope
3 | cin.tie(NULL);
| ^~~~
prefixsums.cpp:1:1: note: ‘NULL’ is defined in header ‘<cstddef>’; did you forget to ‘#include <cstddef>’?
+++ |+#include <cstddef>
1 | int main(){
prefixsums.cpp:20:9: error: ‘cout’ was not declared in this scope
20 | cout<<ar[r]-ar[l-1]<<endl;
| ^~~~
prefixsums.cpp:20:30: error: ‘endl’ was not declared in this scope
20 | cout<<ar[r]-ar[l-1]<<endl;
| ^~~~