Editorial for Қосынды
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.
Матрицаны жол бойынша қарап шығыңыз: әр санды оқығанда оны сақталған қосындыға қосып отырыңыз.