symons

___________每一天都是幸福的!!

  博客园  ::  :: 新随笔  ::  :: 订阅 订阅  :: 管理

2013年8月4日

摘要: 这个题我用long long ,printf("%lld");输出就错误了 我用__int64,printf("%I64d");输出就正确了 这点需要注意。 1 #include 2 #include 3 using namespace std; 4 __int64 f[60]; 5 void init(){ 6 f[0]=0; 7 f[1]=1; 8 for(int i=2;i<=50;++i){ 9 f[i]=f[i-1]+f[i-2];10 }11 return ;12 }13 int main(){14 init()... 阅读全文
posted @ 2013-08-04 11:18 symons 阅读(362) 评论(0) 推荐(0)

摘要: 直线,椭圆,三角形,折线分割平面问题;直线分割平面:S(n)=S(n-1)+n;S(n)=1+n*(n-1)/2;椭圆分割平面:S(n)=S(n-1)+2*(n-1);S(n)=2+n*(n-1);三角形分割平面:S(n)=S(n-1)+6*(n-1);S(n)=3*n*(n-1)+2;折线分割平面:S(n)=2*n*n-n+1; 阅读全文
posted @ 2013-08-04 11:01 symons 阅读(903) 评论(0) 推荐(0)

摘要: 枚举#include #include #include using namespace std;int main(){ int n,m; int i,j; int a,b; bool success; while(~scanf("%d%d",&n,&m)){ if(n==0&&m==0) break; success=0; for(i=-10000;i<=10000;++i){ if( (n-i)*i == m ){ success=1; break; ... 阅读全文
posted @ 2013-08-04 10:49 symons 阅读(172) 评论(0) 推荐(0)