Editorial for Жарыстар-1


Remember to use this editorial only when stuck, and not to copy-paste code from it. Please be respectful to the problem author and editorialist.
Submitting an official solution before solving the problem yourself is a bannable offence.

Hint 1.

Әр спортшыға матрицаның бір жолы сәйкес келеді.

Hint 2.

Жеңімпазды анықтау үшін әр жолдың жалпы нәтижесін жеке есептеу керек.

Hint 3.

Жолдардың қосындыларын салыстырып, ең үлкен қосындыны және ол алғаш кездескен жол нөмірін сақтап отырыңыз.