// 2023 IUSB Programming Competition // Round 1 Problem 3 // Gold Price // Solution by Liguo Yu #include #include using namespace std; int main() { int bYear, n; cin >> bYear >> n; vector price(n); for(int i=0; i> price[i]; } double max = (price[1] - price[0]) / price[0]; int index = 0; for(int i=1; i max) { max = (price[i] - price[i-1]) / price[i-1]; index = i-1; } } int year = bYear + index; int next_year = year + 1; cout << year << " - " << next_year << endl; }