sequence.cpp: In function 'std::pair<long long int, int> query(long long int)':
sequence.cpp:36:21: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
36 | if (pointer >=M.size())
| ~~~~~~~~^~~~~~~~~~
sequence.cpp:38:23: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
38 | while (pointer<M.size()-1&&
| ~~~~~~~^~~~~~~~~~~
sequence.cpp: In function 'int main()':
sequence.cpp:45:43: warning: format '%d' expects argument of type 'int*', but argument 2 has type 'long long int*' [-Wformat=]
45 | for(int i = 1; i <= n; i++) scanf("%d",a + i);
| ~^ ~~~~~
| | |
| int* long long int*
| %lld
sequence.cpp:76:24: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
76 | for(int i = 0; i < res.size(); i++) cout<<res[i]<<' ';
| ~~^~~~~~~~~~~~
sequence.cpp:44:12: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
44 | scanf("%d%d",&n,&k);
| ~~~~~^~~~~~~~~~~~~~
sequence.cpp:45:40: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
45 | for(int i = 1; i <= n; i++) scanf("%d",a + i);
| ~~~~~^~~~~~~~~~~~