-
Notifications
You must be signed in to change notification settings - Fork 2
encodedmessage
bradendubois edited this page Jun 9, 2021
·
6 revisions
ID: encodedmessage
Difficulty: 1.4
CPU Time: 1 second
Memory: 1024 MB
Invasion of privacy (and eccentricity of squared-length messages) aside, one can essentially see the pattern visualized in the Kattis example: we read the right-most column (top to bottom), then the next one to the left, and repeat for the entire message. A loop to start at the top of each column can go from i = 0 root (the square root of the size of the message - it is a square) to 0, and an inner loop going from j = 0 to root, where the position to output is (j * root) + i.