题解报告:poj 2955 Brackets(括号匹配) Description We give the following inductive definition of a “regular brackets” sequence: the empty sequence is a regular brackets sequence, if s is a regular brackets sequence, then (s) and [s] are regular brackets sequen…
题目链接:http://acm.nyist.net/JudgeOnline/problem.php?pid=170 思路:统计每个节点的度,将度为1的节点消去所需要的最少的边即为答案. 代码: #include "stdio.h" //nyoj 170 网络的可靠性 #include "string.h" #define N 10005 int du[N]; int main() { int n; int i; int x,y; while(scanf("…