garage.cpp: In function 'int main(int, const char**)':
garage.cpp:19:7: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
19 | scanf(" %d %d", &N, &M);
| ~~~~~^~~~~~~~~~~~~~~~~~
garage.cpp:21:8: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
21 | scanf(" %d", &rate[i]);
| ~~~~~^~~~~~~~~~~~~~~~~
garage.cpp:23:8: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
23 | scanf(" %d", &weight[i]);
| ~~~~~^~~~~~~~~~~~~~~~~~~
garage.cpp:29:8: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
29 | scanf(" %d", &x);
| ~~~~~^~~~~~~~~~~