fountain.cpp: In function 'int main()':
fountain.cpp:22:18: warning: format '%d' expects argument of type 'int*', but argument 2 has type 'long long int*' [-Wformat=]
22 | scanf( "%d%d", &reservoirs[i].diameters, &reservoirs[i].capacity);
| ~^ ~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| int* long long int*
| %lld
fountain.cpp:22:20: warning: format '%d' expects argument of type 'int*', but argument 3 has type 'long long int*' [-Wformat=]
22 | scanf( "%d%d", &reservoirs[i].diameters, &reservoirs[i].capacity);
| ~^ ~~~~~~~~~~~~~~~~~~~~~~~
| | |
| int* long long int*
| %lld
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( "%d%d", &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( "%d%d", &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];
| ^~~~~~~