|
|
back to boardsome interersting facts while solving this problem I realized that changing the direction of moving led to the new answer. for(int i = 1; i <= n; i++) for(int j = 1; j <= m; j++) {...some code...} It is WA3 for(int i = 1; i <= m; i++) for(int j = 1; j <= n; j++) {...some code...} It is WA25 for(int i = n; i >= 1; i--) for(int j = m; j >= 1; j--) {...some code...} It is also WA25 for(int i = m; i >= 1; i--) for(int j = n; j >= 1; j--) {...some code...} It is AC. So, if you have wa25 or wa3 you may try to change indexe's direction ) Re: some interersting facts This means weak tests. But I wonder if there is a test which does not give result with all 4 directions. |
|
|