算法之美-java删除图中的指定的结点
删除6结点
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashSet;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import java.util.Scanner;
/*
* 5:30:33 5:32:42 5:35:21 5:40:09 5:42:23 5:43:46 5:45:50 5:46:41 5:48:43
* 5:50:42 5:51:12 5:51:58 5:53:17 5:55:01 5:57:42 5:59:20 6:00:48 6:02:27
* 6:04:08 6:05:38 6:06:25 6:08:08 6:17:41 6:19:15 6:22:12 6:23:08 6:25:12
* 6:29:21 9:23:03 9:26:40 9:31:08 9:43:38 9:44:38 9:51:28 10:13:37 11:18:44
*/
/**
*
10 8
1 5
3 9
9 7
7 4
6 7
10 5
10 2
8 5
* @author XAGDC
*
*/
public class DeleteNode{
/* static List templist; */
static List totallist;
static List Normallist;
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
int M = sc.nextInt();
totallist = new ArrayList();
Normallist = new ArrayList();
for(int i=0;i
关注
打赏