CCC '05 J4 - Cross Spiral
Submit solution
C++, Python
Points:
1
Time limit:
1.0s
Memory limit:
256M
Problem type
Allowed languages
8
7
2
2
40Sample Output 3
7
4Explanation for Sample Output 3
Same square as Sample Input 2, but after \(40\) steps, we are at column \(7\) , row \(4\) .
Sample Input 4
6
6
1
2
1Sample Output 4
3
1Explanation for Sample Output 4
A \(6\) by \(6\) square, with the corners being pieces \(1\) column wide and \(2\) rows high. After one step, we end at column \(3\) , row \(1\) .
Comments