I’d appreciate any help to solve this problem using c++.
We know the distances of all the settlements of CityA from CityB and CityC. I need a program that gives me which settlement is the farthest from Kukutyin.
The frst line of the standard input contains the count of settlements (1≤N≤100).
The next N lines contain the distances from CityB (1≤K≤300) and CityC (1≤P≤300) for each settlement, separated by a space.
The frst line of the standard output should contain the index of the settlement that is the farthest from CityB (if there is more than one solution, give the one with the smallest index).