由买买提看人间百态

topics

全部话题 - 话题: totalleft
(共0页)
z***2
发帖数: 66
1
来自主题: JobHunting版 - 问个题,火车运煤的DP解法
佩服!
import java.util.*;
class train {
public static void main(String[] args) {
double table[]=new double [10001];

table[0]=3000.0;

for(int i =1; i double localMax=-1.0;
double curDistance= i/10+ (double)(i%10)*1/10;
//System.out.println(curDistance);
for(int j=0; j
double totalLeft = table[j];
double prevDistance= j/10+ (double)(... 阅读全帖
(共0页)