记录详情

Compile Error

foo.cc: In function 'int main()':
foo.cc:10:9: error: 'lr' was not declared in this scope; did you mean 'r'?
   10 |  vector<lr> t(q);
      |         ^~
      |         r
foo.cc:10:11: error: template argument 1 is invalid
   10 |  vector<lr> t(q);
      |           ^
foo.cc:10:11: error: template argument 2 is invalid
foo.cc:11:36: warning: format '%lld' expects argument of type 'long long int*', but argument 2 has type '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type*' {aka 'int*'} [-Wformat=]
   11 |  for (i = 0; i < n; i++) scanf("%lld", &v[i]);
      |                                 ~~~^
      |                                    |
      |                                    long long int*
      |                                 %d
foo.cc:19:25: error: invalid types 'int[ll {aka long long int}]' for array subscript
   19 |   scanf("%lld%lld", &t[i].l, &t[i].r);
      |                         ^
foo.cc:19:34: error: invalid types 'int[ll {aka long long int}]' for array subscript
   19 |   scanf("%lld%lld", &t[i].l, &t[i].r);
      |                                  ^
foo.cc:6:39: warning: unused variable 'b' [-Wunused-variable]
    6 |  ll n, k, q, i, j = 0, ans = 0, l, r, b = 0;
      |                                       ^
foo.cc:11:31: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   11 |  for (i = 0; i < n; i++) scanf("%lld", &v[i]);
      |                          ~~~~~^~~~~~~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
自测
题目
P1316 Multiple of k
语言
C++
递交时间
2022-02-03 12:18:28
评测时间
2022-02-03 12:18:28
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes