ACM准备
XerxesSimon
折柳为笔..月光为笺..画下你月华般的容颜.. 烟染三月..提诗两行..刻下我如梦般的臆想..
展开
-
JAVA
日期计算: public class Main { public static void main(String[] args){ String s1="1970 1 1"; String s2="1970 1 3"; //计算日期时间差值,调用函数参数类型不一样*/ System.out.println("第一种方法转换为:"+Between_day(s1,s2)); /* SimpleD原创 2016-05-11 22:32:30 · 370 阅读 · 0 评论 -
百度搜索小技巧
intitle: ;标题,关键字 intext:; 正文 inanchor: tompeters; site:edu.cn site:gov.cn site:edu site:nc.us "index of/" ppt google黑客技巧 inurl 查询网站子目录 inurl:help link:www.google.com 查询特定的url cache:www原创 2016-05-04 14:58:15 · 389 阅读 · 0 评论 -
常用函数
快速幂 typedef long long ll; const int mod=1000000+30; ll pow(int n,int p) { ll ans=1; while(p>0) { if(p&1) ans=(ans*n)%mod; p>>=2; n=(n*n)%mod; } return ans原创 2016-04-16 15:13:10 · 714 阅读 · 0 评论 -
ACM必学知识点清单
训练过ACM等程序设计竞赛的人在算法上有较大的优势,这就说明当你编程能力提高之后,主要时间是花在思考算法上,不是花在写程序与debug上。 下面给个计划你练练: 第一阶段:练经典常用算法,下面的每个算法给我打上十到二十遍,同时自己精简代码,因为太常用,所以要练到写时不用想,10-15分钟内打完,甚至关掉显示器都可以把程序打出来。 1.最短路(Floyd、Dij转载 2016-08-24 09:05:54 · 1025 阅读 · 0 评论 -
新闻网址
中国新闻网:http://www.chinanews.com/tp/hd2011/2016/05-22/638937.shtml 凤凰网:http://www.ifeng.com/ 环球网:http://www.huanqiu.com/ 新闻周刊:http://tv.cctv.com/lm/xwzk/原创 2016-05-28 08:23:36 · 413 阅读 · 0 评论 -
用1×2骨牌覆盖n×m棋盘,有多少种方法
传送门1:UVA 11270 Tiling Dominoes #include using namespace std; const int maxn=1<<12; long long dp[2][maxn]; int cur,n,m; void add(int a,int b){ if(b&(1<<m)) dp[cur][b^(1<<m)]+=dp[cur^1][原创 2017-04-25 19:04:14 · 3281 阅读 · 0 评论