Editorial for COCI '08 Contest 4 #3 Rot
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.
Rotating by degrees is not hard, we just need to figure out the formula to move elements: element in the rotated table was element in the original table.
With this we can rotate the table by degrees until the sum of angles we rotated by is equal to , or so that we need another rotation by degrees.
Rotating by degrees requires careful formatting of output, so that it looks slanted as in the examples.
Comments