vudu.cpp: In function 'int main()':
vudu.cpp:22:10: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
22 | scanf("%d", &n);
| ~~~~~^~~~~~~~~~
vudu.cpp:24:39: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
24 | for (int i = 1; i <= n; i++) scanf("%lld", &a[i]), pref[i] = pref[i - 1] + a[i];
| ~~~~~^~~~~~~~~~~~~~~
vudu.cpp:25:10: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
25 | scanf("%lld", &P);
| ~~~~~^~~~~~~~~~~~