time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output A country called Berland consists of n cities, numbered with integer numbers from 1 to n. Some of them are connected by bidirectional roads.…
一个完全图 1和n肯定有一条路 不是公路就是铁路 另= 另一个跑遍最短路即可 #include <bits/stdc++.h> #define mem(a, b) memset(a, b, sizeof(a)) using namespace std; , INF = 0x7fffffff; int head[maxn], cnt, n, m; int vis[maxn], d[maxn]; ][]; struct node { int u, v, next; }Node[maxn<…
题目链接:http://codeforces.com/problemset/problem/95/C C. Volleyball time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Petya loves volleyball very much. One day he was running late for a volleyb…