|Submit||All submissions||Best solutions||Back to list|
SPIRAL - Spiral
|Wersja polska||English version|
There is unknown number of tests. Each of them consists of one line in which appear two integers: n (0<n<=106; n always odd) - size of the square matrix and m (0<m<=n2) - the number of the choosen cell.
For each test print index of the row and index of the column of the choosen cell which is determined by m.
|Added by:||Piotr Kąkol|
|Cluster:||Cube (Intel G860)|
|Languages:||All except: NODEJS OBJC SCM qobi VB.NET|
|Resource:||Author of the problem: David Déharbe;|
Author of the illustration: Wanderley Guimarães
2010-05-17 07:40:18 Zoltán Zámbori
Piotr, can you copy the largest numbers (n,m,row,column) from the tests?
2010-05-15 18:00:39 Piotr KÄ…kol
Perl shouldn't be so slow if Your program in C has 0.14. It might be caused by: 0
2010-05-14 22:40:23 Zoltán Zámbori
I rewrote my C code into Perl (#3627710). C needs 0.09 sec to finish, but the Perl code run >10 sec (TLE). It is my fault, or Perl is really so slow?
Last edit: 2010-05-14 22:51:48