zoj 2966 Build The Electric System】的更多相关文章

Build The Electric System Time Limit: 2 Seconds      Memory Limit: 65536 KB In last winter, there was a big snow storm in South China. The electric system was damaged seriously. Lots of power lines were broken and lots of villages lost contact with t…
Escape Time II Time Limit: 20 Sec  Memory Limit: 256 MB 题目连接 http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=2966 Description In last winter, there was a big snow storm in South China. The electric system was damaged seriously. Lots of p…
就是套了个prim算法就ac了 #include <stdio.h> #include <string.h> #define MaxInt 0x3f3f3f3f #define N 510 /*创建map二维数组储存图表,low数组记录每2个点间最小权值,visited数组标记某点是否已访问*/ int map[N][N],low[N],visited[N]; int n; int prim() { ; memset(visited,,sizeof(visited)); /*从某点…
有n个城市,有m条线路,每条线路a,b,len表示a到b的线路需要花费len的费用维修,要求能将所有城市联通的最小维修花费 按照排序排一下然后利用并查集解决 #include <iostream> #include <set> #include <string.h> #include <algorithm> using namespace std; struct node { int a; int b; int len; }road[500*500+100]…
Sublime Text 3 Build 3065 All System CracKed By Hmily[LCG] <ignore_js_op> 程序员文本编辑器 Sublime Text 3 Build 3065 全平台破解版,windows 32 bit or 64 bit.Ubuntu 32 bit or 64 bit.OS X全部支持. Sublime Text 是一个轻量.简洁.高效.跨平台的编辑器.Sublime Text 的特色功能:良好的扩展功能,官方称之为安装包(Packa…
ZOJ Problem Set - 2965 Accurately Say "CocaCola"!  http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=2965 打表.求含有7或者是7的倍数的数.题目输入p,输出第一个连续出现p个满足条件的头. #include<cstdio> #include<cstring> #include<algorithm> #define mt(a,…
杭电ACM分类: 1001 整数求和 水题1002 C语言实验题——两个数比较 水题1003 1.2.3.4.5... 简单题1004 渊子赛马 排序+贪心的方法归并1005 Hero In Maze 广度搜索1006 Redraiment猜想 数论:容斥定理1007 童年生活二三事 递推题1008 University 简单hash1009 目标柏林 简单模拟题1010 Rails 模拟题(堆栈)1011 Box of Bricks 简单题1012 IMMEDIATE DECODABILITY…
转载:from http://blog.csdn.net/qq_28236309/article/details/47818349 基础题:1000.1001.1004.1005.1008.1012.1013.1014.1017.1019.1021.1028.1029. 1032.1037.1040.1048.1056.1058.1061.1070.1076.1089.1090.1091.1092.1093. 1094.1095.1096.1097.1098.1106.1108.1157.116…
A - Accurately Say "CocaCola"! In a party held by CocaCola company, several students stand in a circle and play a game. One of them is selected as the first, and should say the number 1. Then they continue to count number from 1 one by one (cloc…
4986 Team Formation http://www.tzcoder.cn/acmhome/problemdetail.do?&method=showdetail&id=4986 问有几个使得a⊕b>max(a,b)成立的a.b. #include <bits/stdc++.h> using namespace std; typedef long long ll; ]; ]; int get_id(int x) { int i; ;<<i<=x;…