mincost proper template. Floyd don't hardcode INF NEG_INF outside algorithm.