/ Vijos /

记录详情

Runtime Error

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"}
# 状态 耗时 内存占用
#1 Accepted 1ms 324.0 KiB
#2 Accepted 1ms 316.0 KiB
#3 Accepted 1ms 320.0 KiB
#4 Accepted 1ms 320.0 KiB
#5 Accepted 1ms 324.0 KiB
#6 Accepted 1ms 328.0 KiB
#7 Runtime Error 19ms 3.391 MiB
#8 Runtime Error 21ms 3.875 MiB
#9 Runtime Error 24ms 4.316 MiB
#10 Runtime Error 27ms 4.828 MiB

信息

递交者
类型
递交
题目
P1977 推销员
语言
C++
递交时间
2020-07-11 14:39:56
评测时间
2020-07-11 14:39:56
评测机
分数
60
总耗时
100ms
峰值内存
4.828 MiB