// 2019 IUSB Programming Competition // Round 2 Problem 3 // Find the optimal score for the blocks game // Solution by Liguo Yu #include using namespace std; int calculate(int * b, int p); int main() { int size; cin >> size; int * arr = new int[size]; for (int i = 0; i < size; i++) cin >> arr[i]; int score = calculate(arr, size); cout << score; delete[] arr; return 0; } int calculate(int * arr, int size) { int highest = 0; int i = 0; while(i highest) highest = result; delete[] arr2; } return highest; }