nicegift.cpp:17:6: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
main()
^
nicegift.cpp: In function 'int main()':
nicegift.cpp:21:26: warning: format '%lld' expects argument of type 'long long int*', but argument 2 has type 'int*' [-Wformat=]
scanf("%lld%lld", &n, &k);
~~ ^
nicegift.cpp:21:26: warning: format '%lld' expects argument of type 'long long int*', but argument 3 has type 'int*' [-Wformat=]
nicegift.cpp:23:22: warning: format '%lld' expects argument of type 'long long int*', but argument 2 has type 'int*' [-Wformat=]
scanf("%lld", &a[i]);
~~~~~^
nicegift.cpp:21:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%lld%lld", &n, &k);
~~~~~^~~~~~~~~~~~~~~~~~~~
nicegift.cpp:23:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%lld", &a[i]);
~~~~~^~~~~~~~~~~~~~~