foo.cc: In function 'int main()':
foo.cc:25:24: warning: format '%d' expects argument of type 'int*', but argument 2 has type 'long int*' [-Wformat=]
scanf("%d", &arr[i].u);
~~~~~~~~~^
foo.cc:27:24: warning: format '%d' expects argument of type 'int*', but argument 2 has type 'long int*' [-Wformat=]
scanf("%d", &arr[i].v);
~~~~~~~~~^
foo.cc:40: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("%d",&n);
~~~~~^~~~~~~~~
foo.cc:25:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d", &arr[i].u);
~~~~~^~~~~~~~~~~~~~~~~
foo.cc:27:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d", &arr[i].v);
~~~~~^~~~~~~~~~~~~~~~~
自豪的采用 HydroJudge 进行评测(github.com/hydro-dev/HydroJudge)
{"receive":"2020-07-11T06:39:56.457Z","handle":"2020-07-11T06:39:56.457Z","cache_start":"2020-07-11T06:39:56.463Z","read_cases":"2020-07-11T06:39:56.612Z","judge":"2020-07-11T06:39:56.615Z","done":"2020-07-11T06:39:57.207Z"}