Time Limit: 1000MS Memory Limit: 30000K Total Submissions: 9163 Accepted: 5617 Description Gigel has a strange "balance" and he wants to poise it. Actually, the device is different from any other ordinary balance. It orders two arms of negli
K - Balance Time Limit:1000MS Memory Limit:30000KB 64bit IO Format:%I64d & %I64u Submit Status Description Gigel has a strange "balance" and he wants to poise it. Actually, the device is different from any other ordinary balance. It
https://www.luogu.org/problem/show?pid=1396 弱化版的货车运输,用并查集维护连通块,将边按权值升序排序后依次插入直到两点连通,最后插入的边的权值就是最小的拥挤度最大值. #include <iostream> #include <vector> #include <algorithm> #define maxn 100005 using namespace std; int n, m, s, t; struct edge { i
Ilya is very fond of graphs, especially trees. During his last trip to the forest Ilya found a very interesting tree rooted at vertex 1. There is an integer number written on each vertex of the tree; the number written on vertex i is equal to ai. Ily