biochips.cpp:51:6: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
main()
^
biochips.cpp: In function 'int main()':
biochips.cpp:53:9: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)', declared with attribute warn_unused_result [-Wunused-result]
freopen("d.in" , "r" , stdin);
~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
biochips.cpp:54:9: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)', declared with attribute warn_unused_result [-Wunused-result]
freopen("d.out" , "w" , stdout);
~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
biochips.cpp:63:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d%d" , &p , &cost);
~~~~~^~~~~~~~~~~~~~~~~~~~~