ho_t5.cpp: In function 'int main()':
ho_t5.cpp:40:16: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<int, std::pair<int, int> > >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
40 | while(j<query.size() && query[j].fi==i)
| ~^~~~~~~~~~~~~
ho_t5.cpp:42:13: error: 'update' was not declared in this scope; did you mean 'Update1'?
42 | update 0,1,...,i-L[i]-1
| ^~~~~~
| Update1
ho_t5.cpp:14:18: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
14 | int n,q;scanf("%i%i",&n,&q);
| ~~~~~^~~~~~~~~~~~~~
ho_t5.cpp:15:43: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
15 | int a[n+1];for(int i=1;i<=n;i++) scanf("%i",&a[i]);
| ~~~~~^~~~~~~~~~~~
ho_t5.cpp:33:24: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
33 | int t,l,r;scanf("%i%i%i",&t,&l,&r);
| ~~~~~^~~~~~~~~~~~~~~~~~~