fountain.cpp: In function 'int main()':
fountain.cpp:18:10: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
18 | scanf( "%d%d", &height, &queries_number);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fountain.cpp:22:14: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
22 | scanf( "%lld%lld", &reservoirs[i].diameters, &reservoirs[i].capacity);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fountain.cpp:24:14: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
24 | scanf( "%lld%lld", &queries[i].level, &queries[i].volume);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fountain.cpp:38:18: warning: array subscript -1 is below array bounds of 'int [100001]' [-Warray-bounds]
38 | stiva[top] = i;
| ~~~~~~~~~^
fountain.cpp:11:5: note: while referencing 'stiva'
11 | int stiva[MAX_N + 1], next[MAX_M + 1], liste[MAX_N + 1];
| ^~~~~
fountain.cpp:39:20: warning: array subscript -1 is below array bounds of 'long long int [100001]' [-Warray-bounds]
39 | sumaNec[top] = sumaV;
| ~~~~~~~~~~~^
fountain.cpp:12:11: note: while referencing 'sumaNec'
12 | long long sumaNec[MAX_N + 1];
| ^~~~~~~