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