stove.cpp:3:6: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
main()
^
stove.cpp: In function 'int main()':
stove.cpp:5:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d%d",&n,&k);
~~~~~^~~~~~~~~~~~~~
stove.cpp:6:27: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
for(i=1;i<=n;i++)scanf("%d", &t[i]);
~~~~~^~~~~~~~~~~~~