sequence.cpp: In function 'int main()':
sequence.cpp:56:18: error: no match for 'operator[]' (operand types are 'std::pair<long long int, int>' and 'int')
56 | dp[i][j] = {inf, 0};
| ^
sequence.cpp:56:25: error: 'inf' was not declared in this scope; did you mean 'ynf'?
56 | dp[i][j] = {inf, 0};
| ^~~
| ynf
sequence.cpp:60:43: error: no match for 'operator[]' (operand types are 'std::pair<long long int, int>' and 'int')
60 | for (int i = 1; i <= n + 1; i++) dp[i][0] = {0, i};
| ^
sequence.cpp:65:49: error: no match for 'operator[]' (operand types are 'std::pair<long long int, int>' and 'int')
65 | cht.add(pref[j], (long long) dp[j+1][k - 1].first - pref[j] * pref[j], j);
| ^
sequence.cpp:67:18: error: no match for 'operator[]' (operand types are 'std::pair<long long int, int>' and 'int')
67 | dp[j][k] = {(long long) -pref[j-1] * pref[n] + val, idx};
| ^
sequence.cpp:71:18: error: no match for 'operator[]' (operand types are 'std::pair<long long int, int>' and 'int')
71 | cout << dp[1][K].first << "\n";
| ^
sequence.cpp:75:22: error: no match for 'operator[]' (operand types are 'std::pair<long long int, int>' and 'int')
75 | int j = dp[i][K].second;
| ^