http://codeforces.com/contest/559/problem/A 题目大意:按顺序给出一个各内角均为120°的六边形的六条边长,求该六边形能分解成多少个边长为1的单位三角形. 解: 性质1:边长为n的正三角形能够划分成n*n个边长为1的正三角形. 绘图找规律 性质2:延长各边总能找到一个大的正三角形.而且所求等于大三角形减去三个补出来的三个三角形面积 收获: 以后先找规律,看能不能找出一些特征即使不会证明 其次,总的减去部分化为所求假设想求的难以直接求 #include <…
[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…
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 .…
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 .…
Gerald and Giant Chess Problem's Link: http://codeforces.com/contest/559/problem/C Mean: 一个n*m的网格,让你从左上角走到右下角,有一些点不能经过,问你有多少种方法. analyse: BZOJ上的原题. 首先把坏点和终点以x坐标为第一键值,y坐标为第二键值排序 . 令fi表示从原点不经过任何坏点走到第i个点的个数,那么有DP方程: fi=Cxixi+yi−∑(xj<=xi,yj<=yi)C(xi−xj)…
Gerald's Hexagon Problem's Link: http://codeforces.com/contest/559/problem/A Mean: 按顺时针顺序给出一个六边形的各边长(且保证每个内角都是120度),求能够分解成多少个边长为1的小正三角形. analyse: 由于每个内角都是120度,那么把三条边延长相交,一定能够得到一个正三角形. 求出正三角形的面积S1和补上的小三角形的面积S2,则answer=S1-S2. 这里不是真正意义上求正三角形的面积,而是直接求内部可…
B. Gerald is into Art Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/problemset/problem/560/B Description Gerald bought two very rare paintings at the Sotheby's auction and he now wants to hang them on the wall. For that he bought…
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…
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…
B. Gerald is into Art Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/560/problem/B Description Gerald bought two very rare paintings at the Sotheby's auction and he now wants to hang them on the wall. For that he bought a…