2011年5月20日
摘要: Source CodeProblem: 1118 User: eth1Memory: 272K Time: 297MSLanguage: C++ Result: AcceptedSource Code#include <iostream>#include <algorithm>#include <cmath>using namespace std;struct node{ int a,b;}f[705];double ans[705];int main(){ int t; while(cin>>t && t) { for(int 阅读全文
posted @ 2011-05-20 19:33 eth0 阅读(125) 评论(0) 推荐(0) 编辑
摘要: 就算全世界都否定我,我还相信我自己我知道自己选择的路跪着也要把它走完,不去想是否有人在乎我,我的生活很安静,自己做主挥洒任意地自我。悲伤时,狼狈的哭相也很精彩,泪干后,仰头狂笑的是那样地灿烂,失意时,默默地寻找心灵久违的归宿,高兴时,勃发全身所有的激情。永远地让自己活的很快乐。 阅读全文
posted @ 2011-05-20 16:23 eth0 阅读(138) 评论(0) 推荐(1) 编辑
2011年5月19日
摘要: 这题真没想出来有这么复杂,当然对我们新手来说,没状态压缩的意识,对位运算不理解,害得我看别人代码都想了半天... 首先这题是一道关于状态压缩dp f(i,j) 表示 第i行 状态为j 的个数 <怎么理解状态 j 呢? 二进制思想,假设一行有m个单位需要填充,我们就可以用0 or 1 来表示每一个单位上的属性【0 代表 1x2 单位是横放的不影响下一行,1 代表 1x2 是竖放的影响下一行就是表示下一行对应的 单位已经被填充了】 > 解题中我们可以枚举每一行每一个状态,即由上一行的状态能到达此状态的个数和。 // void dfs(int i, int j, int jj, int 阅读全文
posted @ 2011-05-19 21:16 eth0 阅读(157) 评论(0) 推荐(0) 编辑
摘要: // 一看乱七八糟的代码就知道写得很受挫, 写得断断续续, 首先没记录自然tle,记忆搜索之后,爆空间,试着少一位,多亏数据弱, // 好心让我过了,但是怎么感觉都很错误... 1 Source Code 2 3 Problem: 2378 User: eth1 4 Memory: 40008K Time: 329MS 5 Language: C++ Result: Accepted 6 Source Code 7 #include <iostream> 8 #include <algorithm> 9 #include <vector>10 #includ 阅读全文
posted @ 2011-05-19 16:24 eth0 阅读(150) 评论(0) 推荐(0) 编辑
摘要: // 树形dp , 父子兄弟法构建树形结构 , 状态方程 t[i].vis += t[t[i].child].novis || t[i].novis += t[t[i].child].maxx() 1 Source Code 2 3 Problem: 2342 User: eth1 4 Memory: 456K Time: 94MS 5 Language: C++ Result: Accepted 6 Source Code 7 #include <iostream> 8 #include <algorithm> 9 using namespace std;10 con 阅读全文
posted @ 2011-05-19 12:27 eth0 阅读(146) 评论(0) 推荐(0) 编辑
2011年5月17日
摘要: // 二维 rmq . 1 // author : gssn 2 // date : 5.17 3 #include <iostream> 4 #include <cmath> 5 using namespace std; 6 int maxx[255][255][8],minn[255][255][8],f[255][255]; 7 int n,b,kk; 8 void init() 9 {10 int len = int(log(double(n)) / log(2.0));11 for(int k=1;k<=len;k++)12 {13 for(int i= 阅读全文
posted @ 2011-05-17 14:23 eth0 阅读(194) 评论(0) 推荐(0) 编辑
摘要: // rmq<区间最指查询> , 不过不知道为什么跑起来忒慢... 1 // author : gssn 2 #include <iostream> 3 #include <cmath> 4 using namespace std; 5 int minn[50005][16],maxx[50005][16],f[50010]; 6 int n,m; 7 void init() 8 { 9 int len = int(log((double)n) / log(2.0));10 for(int j=1;j<=len;j++)11 for(int i=1;i 阅读全文
posted @ 2011-05-17 13:28 eth0 阅读(122) 评论(0) 推荐(0) 编辑
2011年5月15日
摘要: // 难道这题是让我们复习string用法...Gssn 1 Source Code 2 3 Problem: 3080 User: eth1 4 Memory: 744K Time: 63MS 5 Language: G++ Result: Accepted 6 7 Source Code 8 #include <iostream> 9 #include <string>10 #include <cmath>11 #include <algorithm>12 #include <cstdio>13 #include <cstr 阅读全文
posted @ 2011-05-15 20:31 eth0 阅读(167) 评论(0) 推荐(0) 编辑
摘要: // 话说这题太水,但是由于把j写成i,调试了半天,其实那不叫调试啦,print而已,不知道debug真让人伤心啊...Gssn 1 Source Code 2 3 Problem: 2339 User: eth1 4 Memory: 820K Time: 250MS 5 Language: G++ Result: Accepted 6 7 Source Code 8 #include <iostream> 9 #include <string>10 #include <cmath>11 #include <algorithm>12 #inclu 阅读全文
posted @ 2011-05-15 15:04 eth0 阅读(178) 评论(0) 推荐(0) 编辑
摘要: // 本来不想写,因为g没想到什么好方法,但是充数还是需要的... = =! 1 Source Code 2 3 Problem: 1035 User: eth1 4 Memory: 760K Time: 485MS 5 Language: C++ Result: Accepted 6 7 Source Code 8 #include <iostream> 9 #include <string> 10 #include <cmath> 11 #include <algorithm> 12 #include <cstdio> 13 us 阅读全文
posted @ 2011-05-15 12:31 eth0 阅读(127) 评论(0) 推荐(0) 编辑