记录详情

Compile Error

foo.cc:5:1: error: 'll' does not name a type
    5 | ll E[MAXN + 10], qz[MAXN + 10], f[MAXN + 10];
      | ^~
foo.cc:7:1: error: 'll' does not name a type
    7 | ll val[MAXN + 10], ind[MAXN + 10];
      | ^~
foo.cc: In function 'void pop_back(long long int, long long int)':
foo.cc:11:24: error: 'val' was not declared in this scope
   11 |  while(head <= tail && val[tail] < V) tail--;
      |                        ^~~
foo.cc: In function 'void add_back(long long int, long long int)':
foo.cc:14:2: error: 'val' was not declared in this scope
   14 |  val[++tail] = V;
      |  ^~~
foo.cc:15:2: error: 'ind' was not declared in this scope; did you mean 'int'?
   15 |  ind[tail] = I;
      |  ^~~
      |  int
foo.cc: In function 'void init()':
foo.cc:22:10: error: 'E' was not declared in this scope
   22 |   cin >> E[p], qz[p] = qz[p - 1] + E[p];
      |          ^
foo.cc:22:16: error: 'qz' was not declared in this scope
   22 |   cin >> E[p], qz[p] = qz[p - 1] + E[p];
      |                ^~
foo.cc:25:3: error: 'f' was not declared in this scope
   25 |   f[p] = qz[p];
      |   ^
foo.cc:25:10: error: 'qz' was not declared in this scope
   25 |   f[p] = qz[p];
      |          ^~
foo.cc:26:42: error: 'f' was not declared in this scope
   26 |  for(int j = 2; j <= k; j++) add_back(j, f[j - 2] - qz[j - 1]);
      |                                          ^
foo.cc:26:53: error: 'qz' was not declared in this scope
   26 |  for(int j = 2; j <= k; j++) add_back(j, f[j - 2] - qz[j - 1]);
      |                                                     ^~
foo.cc:28:25: error: 'ind' was not declared in this scope; did you mean 'int'?
   28 |   while(head <= tail && ind[head] < i - k + 1) pop_front();
      |                         ^~~
      |                         int
foo.cc:29:15: error: 'f' was not declared in this scope
   29 |   pop_back(i, f[i - 2] - qz[i - 1]);
      |               ^
foo.cc:29:26: error: 'qz' was not declared in this scope
   29 |   pop_back(i, f[i - 2] - qz[i - 1]);
      |                          ^~
foo.cc:32:11: error: 'val' was not declared in this scope
   32 |   int V = val[head];
      |           ^~~
foo.cc:36:10: error: 'f' was not declared in this scope
   36 |  cout << f[n] << endl;
      |          ^
Found 10 testcases.
您没有权限查看该代码,完成本题后再来查看

信息

递交者
类型
递交模式
题目
P5646 「一本通 5.5 例 3」修剪草坪
语言
C++14
递交时间
2023-08-09 09:30:46
评测时间
2023-08-09 09:30:47
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes