Day 3

The editorial can be found here: http://opencup64.cs.istu.ru/~ejudge/81wzp02/notshown/180130.avi

Source codes: