折现分割平面(hdu)
http://acm.hdu.edu.cn/showproblem.php?pid=2050
这道题最主要的就是要找出递推公式。那么由图得到a[1]=2,a[2]=7,那么推出a[3]=16,a[4]=29,那么可以得出一个递推公式:f[n]=f[n-1]+4*(n-1)+1;递推公式得出后一切就都迎刃而解拉。代码:include <iostream>
#include <cstdio>using
原创
2017-05-02 23:18:48 ·
249 阅读 ·
0 评论