foo.cc:23:1: error: '::main' must return 'int'
23 | void main()
| ^~~~
foo.cc:43:1: error: '::main' must return 'int'
43 | void main()
| ^~~~
foo.cc:43:6: error: redefinition of 'int main()'
43 | void main()
| ^~~~
foo.cc:23:6: note: 'int main()' previously defined here
23 | void main()
| ^~~~
foo.cc: In function 'int main()':
foo.cc:55:28: warning: format '%d' expects argument of type 'int', but argument 3 has type 'long int' [-Wformat=]
55 | printf("sum=%ld,Total=%d,Max=%d",sps,spn,spm);
| ~^ ~~~
| | |
| int long int
| %ld
foo.cc:55:35: warning: format '%d' expects argument of type 'int', but argument 4 has type 'long int' [-Wformat=]
55 | printf("sum=%ld,Total=%d,Max=%d",sps,spn,spm);
| ~^ ~~~
| | |
| int long int
| %ld
foo.cc: In function 'int main()':
foo.cc:27:6: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
27 | scanf("%d",&start);
| ~~~~~^~~~~~~~~~~~~
foo.cc:29:6: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
29 | scanf("%d",&end);
| ~~~~~^~~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务