很水拉 爲了記規律- -
php
題目連接:http://acm.hdu.edu.cn/showproblem.php?pid=1249spa
分隔平面公式blog
下面是我本身查找的公式,沒有推到過程,但能夠給一些連接ci
http://hi.baidu.com/matrixwhisper/item/6bfe48522351e0d19e266717
http://qianmacao.blog.163.com/blog/static/203397180201212193457357
直線:f(n)=f(n-1)+n=1+n(n-1)/2;static
折線:f(n)=f(n-1)+(4n-3)=2*n*n-n+1;word
三角形:f(n)=f(n-1)+6(n-1)=3n(n-1)+2;di
橢圓:f(n)=f(n-1)+2(n-1)=2+n(n-1);while
#include
#include
#include
usingnamespace std;
intmain(){
}