BZOJ1401 : Hexagon】的更多相关文章

这题显然是一个最小斯坦纳树的模型,直接上模板即可,就是正六边形比较恶心. #include<cstdio> #include<cstring> #include<algorithm> #include<queue> #define rep(i,n) for(int i=0;i<n;i++) #define INF 0x3f3f3f3f using namespace std; const int N=1610,M=9610; typedef pair&…
Gerald's Hexagon Gerald got a very curious hexagon for his birthday. The boy found out that all the angles of the hexagon are equal to . Then he measured the length of its sides, and found that each of them is equal to an integer number of centimeter…
Gerald's Hexagon Problem's Link: http://codeforces.com/contest/559/problem/A Mean: 按顺时针顺序给出一个六边形的各边长(且保证每个内角都是120度),求能够分解成多少个边长为1的小正三角形. analyse: 由于每个内角都是120度,那么把三条边延长相交,一定能够得到一个正三角形. 求出正三角形的面积S1和补上的小三角形的面积S2,则answer=S1-S2. 这里不是真正意义上求正三角形的面积,而是直接求内部可…
http://vjudge.net/problem/viewProblem.action?id=37480 East Central Regional Contest Problem C: Hexagon Perplexagon A well known puzzle consists of hexagonal pieces, each with the numbers through printed on the sides. Each piece has a different arrang…
C. Gerald's Hexagon Time Limit: 2 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/559/problem/A Description Gerald got a very curious hexagon for his birthday. The boy found out that all the angles of the hexagon are equal to . Then he me…
C. Gerald's Hexagon time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Gerald got a very curious hexagon for his birthday. The boy found out that all the angles of the hexagon are equal to .…
A. Gerald's Hexagon Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/559/problem/A Description Gerald got a very curious hexagon for his birthday. The boy found out that all the angles of the hexagon are equal to . Then he m…
题目连接:317 - Hexagon 题目大意:在一个19个六边形组成的图形上玩一个游戏,给出9个数字, 分成3组, 分别可以填在左上角, 上, 有上角,因为对于小六边形来说, 对边的数是相同的, 然后这样9个数可以组成27个不同的小六边形, 现在要将在这27个小的六边形中选取19个填入图形中, 尽量使得的分最高,并且不可以重复使用小六边形. 得分的计算是对应图形的某一方向上, 如果这个方向的所有小六边形的边的数值相同, 得分就等于  边的数值 * 该方向的个数. 解题思路:因为总共有27个六边…
Time Limit:2000MS     Memory Limit:262144KB     64bit IO Format:%I64d & %I64u   Description Gerald got a very curious hexagon for his birthday. The boy found out that all the angles of the hexagon are equal to . Then he measured the length of its sid…
[CF简单介绍] 提交链接:http://codeforces.com/contest/560/problem/C 题面: C. Gerald's Hexagon time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Gerald got a very curious hexagon for his birthday. The bo…