foo.cc: In function 'int main()':
foo.cc:23:17: warning: format '%ld' expects argument of type 'long int*', but argument 2 has type 'int*' [-Wformat=]
scanf("%ld", &n);
~~^
foo.cc:41:54: warning: format '%d' expects argument of type 'int', but argument 2 has type 'long int' [-Wformat=]
printf("%d\n", max(ans[i-1]+sum[i],ans[i]+tot[i]*2));
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
foo.cc:23:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%ld", &n);
~~~~~^~~~~~~~~~~
foo.cc:25:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%ld", &arr[i].u);
~~~~~^~~~~~~~~~~~~~~~~~
foo.cc:28:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%ld", &arr[i].v);
~~~~~^~~~~~~~~~~~~~~~~~
自豪的采用 HydroJudge 进行评测(github.com/hydro-dev/HydroJudge)
{"receive":"2020-07-11T10:09:20.048Z","handle":"2020-07-11T10:09:20.048Z","cache_start":"2020-07-11T10:09:20.116Z","read_cases":"2020-07-11T10:09:20.334Z","judge":"2020-07-11T10:09:20.342Z","done":"2020-07-11T10:09:22.253Z"}