摘要: #include #include #include int n,a[25],e;bool b[25];bool dfs(int curLen,int cure,int curStick){ if(cure==4) return 1; if(curLen==e) return dfs(0,cure... 阅读全文
posted @ 2014-09-23 11:00 Netop 阅读(213) 评论(0) 推荐(0)
摘要: import http.client,urllib.parsehost = 'iflying.sinaapp.com' #主机域名path = '/test.php' #资源名params = urllib.parse.urlencode({ #要传送的数据 'username':'Tom'... 阅读全文
posted @ 2014-09-11 23:20 Netop 阅读(145) 评论(0) 推荐(0)
摘要: 原帖地址:http://blog.csdn.net/windone0109/article/details/4030274TortoiseSVN是windows下其中一个非常优秀的SVN客户端工具。通过使用它,我们可以可视化的管理我们的版本库。不过由于它只是一个客户端,所以它不能对版本库进行权限管理... 阅读全文
posted @ 2014-09-05 08:33 Netop 阅读(95) 评论(0) 推荐(0)
摘要: 原文地址http://blog.csdn.net/snowwindice/article/details/13768721用于Gvim 或 Vim 配置文件的一键编译与运行函数(注:需要机器上安装了GCC才行)。本代码只加入了对C/C++的编译与运行,如果要加入其语言的可以参考此代码加入即可。同时,... 阅读全文
posted @ 2014-09-04 15:14 Netop 阅读(290) 评论(0) 推荐(0)
摘要: 先让你的window是上的vim亮起来吧,下面的配置会有你喜欢的:source $VIMRUNTIME/vimrc_example.vimsource $VIMRUNTIME/mswin.vim"将vim当前工作路径设置为当前文件路径set autochdir" 不要使用vi的键盘模式,而是vim自... 阅读全文
posted @ 2014-09-03 15:20 Netop 阅读(295) 评论(0) 推荐(0)
摘要: 用了快排的思想,区别是这里每次只是选择性地排某一边,而快排是两边都排,由于是快排,所以最坏情况不是O(n)#include #include int k,n,a[1000000];void m_swap(int *a,int *b){ int t=*a;*a=*b;*b=t;}int qsort(i... 阅读全文
posted @ 2014-09-01 21:40 Netop 阅读(280) 评论(0) 推荐(0)
摘要: #include #include long long dp[12][2050];int ms,h,w;bool check(int x){ while(x){ if((x&3)==3) x=x>>2; else if(x&1) return 0; else x=x>>1; } return ... 阅读全文
posted @ 2014-08-31 13:47 Netop 阅读(180) 评论(0) 推荐(0)
摘要: #include #include int main(){ printf("sleeping\n"); Sleep(3*1000); printf("sleep end\n"); return 0;}#include #include inline void delay(float);int mai... 阅读全文
posted @ 2014-08-19 09:52 Netop 阅读(509) 评论(0) 推荐(0)
摘要: 之前介绍到的中国剩余定理只能求解模数两两互质的同余方程组。那么,模数如果不一定两两互质的情况应该怎么求呢?下面介绍通过合并方程的方法来解决问题(要用到扩展欧几里德算法)。顾名思义,合并方程就是把所有的同余方程组合并成一个。举个例子,合并同余方程组x%A=a ①x%B=b②现在给出两种合并的方法: 1... 阅读全文
posted @ 2013-07-31 22:19 Netop 阅读(573) 评论(0) 推荐(0)
摘要: 用来求解模数互质的同余方程组,即求一个数x,使得x除以n个模数分别为a1,a2,a3……an(注意这里的除数必须要两两互质)得到n个余数r1,r2,r3……rk。求这个数x.中国剩余定理求的就是这个数x。求解过程:1)令p=a1*s2*a3*……*an,ki=p/ai(i从1到n)。2)我们要找到这... 阅读全文
posted @ 2013-07-31 22:18 Netop 阅读(153) 评论(0) 推荐(0)