Editorial for Жарыстар-2
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.
Submitting an official solution before solving the problem yourself is a bannable offence.
Hint 1.
Бұл есепте жеңімпазды табу үшін бүкіл матрицадағы ең үлкен мәнді іздеу керек.
Hint 2.
Матрицаны жол бойынша қарап, осы уақытқа дейін кездескен ең жақсы нәтижені есте сақтап отыруға болады.
Hint 3.
Жаңа ең үлкен мән табылған кезде, тек мәнді ғана емес, оның тұрған жолы мен бағанын да сақтауды ұмытпаңыз.