sequence.cpp: In function 'int main()':
sequence.cpp:14:11: warning: format '%d' expects argument of type 'int*', but argument 2 has type 'long long int*' [-Wformat=]
14 | scanf("%d", &a[i]);
| ~^ ~~~~~
| | |
| | long long int*
| int*
| %lld
sequence.cpp:11:7: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
11 | scanf("%lld %lld", &n, &k);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~
sequence.cpp:14:8: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
14 | scanf("%d", &a[i]);
| ~~~~~^~~~~~~~~~~~~
sequence.cpp:44:16: warning: 'idx' may be used uninitialized in this function [-Wmaybe-uninitialized]
44 | res.push_back(idx);
| ~~~~~~~~~~~~~^~~~~