记录详情

Wrong Answer

foo.cc: In function 'int main()':
foo.cc:48:11: warning: format '%d' expects argument of type 'int', but argument 2 has type 'std::__iterator_traits<__gnu_cxx::__normal_iterator<int*, std::vector<int> >, void>::difference_type' {aka 'long int'} [-Wformat=]
   48 |  printf("%d", count(v.begin(), v.end(), v[n - 1]));
      |          ~^   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |           |        |
      |           int      std::__iterator_traits<__gnu_cxx::__normal_iterator<int*, std::vector<int> >, void>::difference_type {aka long int}
      |          %ld
foo.cc: In instantiation of 'void Sort(T, T) [with T = int]':
foo.cc:47:11:   required from here
foo.cc:34:16: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
   34 |  int mid = v[l + r >> 1], i = l - 1, j = r + 1;
      |              ~~^~~
foo.cc: In function 'void GetIn()':
foo.cc:25:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   25 |  scanf("%d", &n);
      |  ~~~~~^~~~~~~~~~
foo.cc:27:15: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   27 |   int x; scanf("%d", &x);
      |          ~~~~~^~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务
# 状态 耗时 内存占用
#1 Wrong Answer Read 9, expect 10. 7ms 384.0 KiB
#2 Wrong Answer Read 7, expect 8. 8ms 384.0 KiB

信息

递交者
类型
递交
题目
1-4 最大值的个数
比赛
2022暑期青少年社团(入门赛)
语言
C++
递交时间
2022-07-28 18:54:31
评测时间
2022-07-28 18:54:35
评测机
分数
0
总耗时
15ms
峰值内存
384.0 KiB