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