|
|
back to boardWhy is greedy algo get's WA on test 9? Because better use integer- Gauss solution without heuristics. My algorithm uses Gauss algo as a part, but also gets WA on test 9. I think this problem is similar to minimal spanning tree problem, which is solved by Kruskal's algo, but here we should use Gauss to check linear independence. So, greedy (in fact) algo could get AC. May be you know counter-example? I'm using Gauss method with precision about 50 digits (BigDecimal) and still get WA? Can you give me some test, where it doesn't works You should make Gauss under ring of integers when we make matrix diagonal but don,t make ones on it I did exactly what you mean but i think, that there should be an overflow when you several times will use Gauss algo. Now i have WA9, can you give me any tricky test? Silly mistake, AC now. Edited by author 22.01.2007 18:54 |
|
|