Main.cpp: In function 'int main()':
Main.cpp:23:35: warning: format '%ld' expects argument of type 'long int*', but argument 2 has type '__gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type*' {aka 'long long int*'} [-Wformat=]
23 | for(int i=1; i<=N; i++) scanf("%ld",&A[i]);
| ~~^
| |
| long int*
| %lld
Main.cpp:21:16: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
21 | int N,K; scanf("%d %d",&N,&K);
| ~~~~~^~~~~~~~~~~~~~~
Main.cpp:23:31: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
23 | for(int i=1; i<=N; i++) scanf("%ld",&A[i]);
| ~~~~~^~~~~~~~~~~~~
Main.cpp:26:14: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
26 | int Q; scanf("%d",&Q);
| ~~~~~^~~~~~~~~
Main.cpp:29:15: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
29 | int q; scanf("%d",&q);
| ~~~~~^~~~~~~~~
Main.cpp:32:20: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
32 | int l,r,m; scanf("%d %d %d",&l,&r,&m);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~
Main.cpp:40:9: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
40 | scanf("%d",&x);
| ~~~~~^~~~~~~~~