|
|
back to boardWhy N*N TL??? Help me... I really don't know, why 25000000 TL? I think 25000000 not many time...and must get AC in 1 sec. Edited by author 17.04.2008 08:16 Re: Why N*N TL??? Try to change the order of FOR cycles. For example, for (i=0;i<n;i++) for (j=0;j<n;j++) p[i][j]=1; works faster than for (j=0;j<n;j++) for (i=0;i<n;i++) p[i][j]=1; Re: Why N*N TL??? Why??? But I use first variant and get TL... Re: Why N*N TL??? 25000000 operation : compare of char and value assignment of integer. And 12500000 operation works 0.953! Why this work too many time???? Edited by author 18.04.2008 09:58 Re: Why N*N TL??? My O(N^2) solution works 0.171. Re: Why N*N TL??? My O(N^2) solution works 0.171. Can you write your code as pseudo or explain your algo in details, please? Re: Why N*N TL??? Not in forum ... Mail to me. (I send to u my code only) naxart@yandex.ru Re: Why N*N TL??? May be because of "mod operation"? |
|
|