Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
SEJM BLURWA
#include <iostream> using namespace std; int lrzedow,s,testy,x,y,tab[1020]; int main() { cin>>lrzedow; for(int i=1;i<=lrzedow;i++) { cin>>tab[i]; } cin>>testy; for(int i=1;i<=testy;i++) { cin>>x>>y; for(int i=x;i<=y;i++) { s=s+tab[i]; } cout<<s<<endl; s=0; } }
run
|
edit
|
history
|
help
0
find duplicate in O(n)
3 and 7 in a row
LRUCache
Scemo
SVGAnimated Value
MergeSort
Clementina
decode
Dij. Algo
Sort 0's 1's 2's