摘要: Play on Wordsnote: 判断一下连通性。 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 #inclu... 阅读全文
posted @ 2015-04-04 22:46 daydaycode 阅读(153) 评论(0) 推荐(0) 编辑
摘要: And Or给出 a,b, 求 a|(a|a)|(a+2)|……|b ,和 & 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 #inc... 阅读全文
posted @ 2015-04-04 20:15 daydaycode 阅读(217) 评论(0) 推荐(0) 编辑
摘要: Decoding Baby Boos题意,给出一个字符串。给出n个命令, x,y, 把字符串中所有的y变成x. 求n个命令执行完后的字符串。直接用一个数组hash[i]=j,表示 字母i对应j; 1 #include 2 #include 3 #i... 阅读全文
posted @ 2015-04-04 19:38 daydaycode 阅读(259) 评论(0) 推荐(0) 编辑
摘要: 1 int dp[1=0) 8 return dp[s][v]; 9 if(s==(1=0;s--) 9 {10 for(int u=0;u>v&1))13 dp[s... 阅读全文
posted @ 2015-04-04 12:19 daydaycode 阅读(93) 评论(0) 推荐(0) 编辑
摘要: Big String 给一个字符串,长度不超过 106,有两种操作: 1. 在第 i 个字符的前面添加一个字符 ch 2. 查询第 k 个位置是什么字符操作的总数不超过 2000如果直接模拟的话,移动到后面的数据量太大。我们分块的话,... 阅读全文
posted @ 2015-04-04 09:21 daydaycode 阅读(181) 评论(0) 推荐(0) 编辑