2024-07-08
한어Русский языкEnglishFrançaisIndonesianSanskrit日本語DeutschPortuguêsΕλληνικάespañolItalianoSuomalainenLatina
argomento:97. Xiao Ming va al parco (kamacoder.com)
Idea:
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int n = scanner.nextInt(); // 顶点数
int m = scanner.nextInt(); // 边数
int[][] grid = new int[n 1][n 1];
final int INF = 10005; // 因为边的最大距离是10^4
// 初始化图的邻接矩阵
for (int i = 1; i