您当前的位置: 首页 >  Java

wespten

暂无认证

  • 1浏览

    0关注

    899博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

算法之美-java有权图的表示

wespten 发布时间:2019-05-27 05:24:34 ,浏览量:1

算法之美-java有权图的表示

直接表示法

测试用例

8 16
4 5 .35
4 7 .37
5 7 .28
0 7 .16
1 5 .32
0 4 .38
2 3 .17
1 7 .19
0 2 .26
1 2 .36
1 3 .29
2 7 .34
6 2 .40
3 6 .52
6 0 .58
6 4 .93
import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;
import java.util.Scanner;

/**
//int num = (new Double(0.999999)).intValue(); //0
//int num = (int)0.999999;//0
Double db = new Double(1);//1.0
int num = db.intValue();
System.out.println(num);//1
 * @author Administrator
 *18:57:03 18:58:26 18:59:06 19:19:52 
 */
public class ListWeigthGraph {
	static List totallist;
public static void main(String[] args) {
	Scanner scanner = new Scanner(System.in);
	int N = scanner.nextInt();
	int M = scanner.nextInt();
	totallist = new ArrayList();
	for(int i=0;i            
关注
打赏
1665965058
查看更多评论
0.0394s