Time limit
1000 ms
Memory limit
262144 kB
Source
Codeforces Round #226 (Div. 2)
Tags
math matrices *2700
Editorial
Announcement #1 (ru) Announcement #2 (en) Tutorial #1 (en) Tutorial #2 (ru)
Descriptions:

Bear in the Field

CodeForces - 385E