symons

___________每一天都是幸福的!!

  博客园  ::  :: 新随笔  ::  :: 订阅 订阅  :: 管理
上一页 1 ··· 11 12 13 14 15 16 17 18 19 ··· 22 下一页

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 阅读(360) 评论(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 阅读(899) 评论(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 阅读(171) 评论(0) 推荐(0)

2013年8月2日

摘要: 1 http://blog.chinaunix.net/u/15200/showart_299136.html 2 3 %ftp 主机名/IP /*登录ftp服务器,会提示输入用户名和密码*/ 4 5 匿名登录:用户名输入:anonymous 密码输入:一个邮箱格式的任意字符串 6 7 FTP>ascii: 设定以ASCII方式传送文件(缺省值) 8 FTP>bell: 每完成一次文件传送,报警提示. 9 FTP>binary: 设定以二进制方式传送文件.10 FTP>bye: 终止主机FTP进程,并退出FTP管理方式.11 FTP>case: 当为ON时,用MG 阅读全文
posted @ 2013-08-02 12:57 symons 阅读(632) 评论(0) 推荐(0)

2013年7月28日

摘要: 国家集训队1999论文集陈宏:《数据结构的选择与算法效率——从IOI98试题PICTURE谈起》来煜坤:《把握本质,灵活运用——动态规划的深入探讨》齐鑫:《搜索方法中的剪枝优化》邵铮:《数学模型的建立、比较和应用》石润婷:《隐蔽化、多维化、开放化——论当今信息学竞赛中数学建模的灵活性》杨帆:《准确性 阅读全文
posted @ 2013-07-28 22:44 symons 阅读(398) 评论(0) 推荐(0)

2013年7月22日

摘要: 智力题,观察上一行,有几个数字。 比如,S[1]=1; S[2]=11; S[3]=21; S[4]=1211; 这样就可以观察出来,序列一是1个1 ---> S[2] = 11 ; 序列二是2个1 ---> S[3] = 21 ; 序列三是1个2,2个1 ----> S[4] = 1221 ; 知道了这个规律就好办了,然后写个函数把30个序列都给写出来就行了,一开始我还准备自己在纸上把30个序列写出来呢,后来我发现不太靠谱,好长啊!!! 1 #include 2 #include 3 #include 4... 阅读全文
posted @ 2013-07-22 23:16 symons 阅读(195) 评论(0) 推荐(0)

摘要: 模拟。下图是我做的小模型。 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 #include 9 #include 10 #include 11 #include 12 using namespace std; 13 /* 14 剩下的就是正常的代码了 15 ------------------------------------------------- 16 */ 17 char D[10],T[10],F[10],B[10],L... 阅读全文
posted @ 2013-07-22 12:18 symons 阅读(236) 评论(0) 推荐(0)

2013年6月13日

摘要: 刚开始用了大数加法求10万个斐波那契数,但是后来发现我写的大数加法太慢了,就从网上找了个模板用了,然后还发现只要40位就行了,处理了一下,限制到45位(不知道为啥,这块写41,42,43,44都不行,写上45就行了),以后再研究。 再把字典树给改一下就行,还涉及到标号问题,这个从10万到1开始插入就可以解决题中要求的较小序号问题。 然后上代码,过程很艰难,不过也好终于过了。 1 #include <iostream> 2 #include <string> 3 #include <stdio.h> 4 #include <malloc.h> 5 阅读全文
posted @ 2013-06-13 12:22 symons 阅读(185) 评论(0) 推荐(0)

2013年6月7日

摘要: <?php $init = $_POST["init"];//game restart $clickvalue = $_POST["clickvalue"];//minesweeping $checkflag = 0;//Victory or defeat $click_count = 0;//clicks count if($init == null && $clickvalue == null){//initialization $_POST = array();//set POST with a array $_POST[&q 阅读全文
posted @ 2013-06-07 16:44 symons 阅读(167) 评论(0) 推荐(0)

2013年5月20日

摘要: 1 /* 2 * digits=lg(n!)+1=lg(1)+lg(2)+...+lg(n)+1 3 * 4 * 利用stirling公式化简 lg(n!)=lg( sqrt(2*pie*n) ) + n*lg(n/e) 5 */ 6 #include <stdio.h> 7 #include <math.h> 8 #define pie acos(-1.0) 9 #define e 2.718281828410 int main()11 {12 int i,j,n,res,t;13 while(~scanf("%d",&t))14 {15 阅读全文
posted @ 2013-05-20 14:18 symons 阅读(166) 评论(0) 推荐(0)

上一页 1 ··· 11 12 13 14 15 16 17 18 19 ··· 22 下一页