0_0_37580000_14652.cpp: In function 'void dfs(int, int, int, int)':
0_0_37580000_14652.cpp:28:5: error: 'i' was not declared in this scope
dp[i] = dp[que[hh]] + power2(a[i] - a[que[hh]]) + m;
^
0_0_37580000_14652.cpp:28:48: error: 'power2' was not declared in this scope
dp[i] = dp[que[hh]] + power2(a[i] - a[que[hh]]) + m;
^
0_0_37580000_14652.cpp: In function 'void solve()':
0_0_37580000_14652.cpp:60:5: error: request for member 'clear' in 'a', which is of non-class type 'll [100010] {aka long long int [100010]}'
a.clear(); a.push_back(0); a.push_back(0);
^
0_0_37580000_14652.cpp:60:16: error: request for member 'push_back' in 'a', which is of non-class type 'll [100010] {aka long long int [100010]}'
a.clear(); a.push_back(0); a.push_back(0);
^
0_0_37580000_14652.cpp:60:32: error: request for member 'push_back' in 'a', which is of non-class type 'll [100010] {aka long long int [100010]}'
a.clear(); a.push_back(0); a.push_back(0);
^
0_0_37580000_14652.cpp:61:12: error: too few arguments to function 'void dfs(int, int, int, int)'
dfs(t, -1);
^
0_0_37580000_14652.cpp:26:6: note: declared here
void dfs(int x, int fa, int hh, int tt) {
^
0_0_37580000_14652.cpp:63:17: error: request for member 'size' in 'a', which is of non-class type 'll [100010] {aka long long int [100010]}'
vector<ll>f(a.size(), 0);
^
0_0_37580000_14652.cpp:64:18: error: request for member 'size' in 'a', which is of non-class type 'll [100010] {aka long long int [100010]}'
vector<ll>dp(a.size(), 0);
^
0_0_37580000_14652.cpp:66:25: error: request for member 'size' in 'a', which is of non-class type 'll [100010] {aka long long int [100010]}'
for (int i = 1; i < a.size(); i++) a[i] += a[i - 1];
^
0_0_37580000_14652.cpp:69:25: error: request for member 'size' in 'a', which is of non-class type 'll [100010] {aka long long int [100010]}'
for (int i = 1; i < a.size(); i++)
^
0_0_37580000_14652.cpp:77:23: error: request for member 'size' in 'a', which is of non-class type 'll [100010] {aka long long int [100010]}'
ans = max(ans, dp[a.size() - 1] - m);
^
|