garage.cpp: In function 'void read_input()':
garage.cpp:10:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d%d",&N,&M);
~~~~~^~~~~~~~~~~~~~
garage.cpp:12:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d",cost+i);
~~~~~^~~~~~~~~~~~~
garage.cpp:15:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d",weight+i);
~~~~~^~~~~~~~~~~~~~~
garage.cpp: In function 'long long int solve()':
garage.cpp:23:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d",&now);
~~~~~^~~~~~~~~~~