/ Vijos /

记录详情

Wrong Answer

foo.cc: In function 'uint64_t calc(uint64_t)':
foo.cc:8:8: warning: comparison of integer expressions of different signedness: 'uint64_t' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
    8 |  if (n <= k) {
      |      ~~^~~~
foo.cc: In function 'int main()':
foo.cc:33:16: warning: format '%llu' expects argument of type 'long long unsigned int*', but argument 3 has type 'uint64_t*' {aka 'long unsigned int*'} [-Wformat=]
   33 |   scanf("%d %llu", &k, &n);
      |             ~~~^       ~~
      |                |       |
      |                |       uint64_t* {aka long unsigned int*}
      |                long long unsigned int*
      |             %lu
foo.cc:34:13: warning: format '%llu' expects argument of type 'long long unsigned int', but argument 2 has type 'uint64_t' {aka 'long unsigned int'} [-Wformat=]
   34 |  printf("%llu\n", calc(n));
      |          ~~~^     ~~~~~~~
      |             |         |
      |             |         uint64_t {aka long unsigned int}
      |             long long unsigned int
      |          %lu
foo.cc:33:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   33 |   scanf("%d %llu", &k, &n);
      |   ~~~~~^~~~~~~~~~~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务
# 状态 耗时 内存占用
#1 Accepted 3ms 384.0 KiB
#2 Accepted 3ms 384.0 KiB
#3 Accepted 3ms 384.0 KiB
#4 Accepted 2ms 384.0 KiB
#5 Wrong Answer Read 4601984, expect 6014085. 2ms 384.0 KiB
#6 Wrong Answer Read 589013, expect 6360579. 3ms 384.0 KiB
#7 Wrong Answer Read 7377045, expect 7137930. 2ms 384.0 KiB
#8 Wrong Answer Read 2515760, expect 5614887. 3ms 384.0 KiB
#9 Wrong Answer Read 6257412, expect 4437159. 3ms 384.0 KiB
#10 Wrong Answer Read 3590156, expect 5379634. 2ms 384.0 KiB

信息

递交者
类型
递交
题目
P1067 Warcraft III 守望者的烦恼
语言
C++
递交时间
2022-03-18 16:34:32
评测时间
2022-03-18 16:34:32
评测机
分数
40
总耗时
29ms
峰值内存
384.0 KiB