construction.cpp:11:6: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
main()
^
construction.cpp: In function 'int main()':
construction.cpp:18:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d", &a[i]);
~~~~~^~~~~~~~~~~~~
construction.cpp:24:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d%d", &q, &w);
~~~~~^~~~~~~~~~~~~~~~