segments.cpp: In function 'int main()':
segments.cpp:10:17: warning: format '%d' expects argument of type 'int*', but argument 2 has type 'long long int*' [-Wformat=]
10 | scanf("%d", pref + i);
| ~^ ~~~~~~~~
| | |
| int* long long int*
| %lld
segments.cpp:8:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
8 | scanf("%d", &n);
| ~~~~~^~~~~~~~~~
segments.cpp:10:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
10 | scanf("%d", pref + i);
| ~~~~~^~~~~~~~~~~~~~~~