2011年5月8日
摘要: View Code 1 /* easy */ 2 #include <iostream> 3 #include <cstring> 4 using namespace std; 5 int n,m,ans,flag,vis[40]; 6 char f[40][40]; 7 void solve(int k,int num) 8 { 9 if(num == m)10 {11 ans++;12 return;13 }14 if(k>=n) return;15 for(int i=0;i<n;i++)16 {17 if(f[k][i]=='#')1 阅读全文
posted @ 2011-05-08 19:09 eth0 阅读(116) 评论(0) 推荐(0) 编辑
摘要: "Do not spend all your time on training or studying - this way you will probably become very exhausted and unwilling to compete more. Whatever you do - have fun. Once you find programming is no fun anymore – drop it. Play soccer, find a girlfriend, study something not related to programming, ju 阅读全文
posted @ 2011-05-08 15:39 eth0 阅读(106) 评论(0) 推荐(0) 编辑
2011年5月4日
摘要: string_ 1 /* 2 boring 3 eth0 4 */ 5 #ifndef SSTRING_H 6 #define SSTRING_H 7 8 9 #include <iostream> 10 #include <cstring> 11 #include <algorithm> 12 using std::istream; 13 using std::ostream; 14 15 class sstring 16 { 17 private: 18 friend istream& operator>>(istream&, 阅读全文
posted @ 2011-05-04 17:42 eth0 阅读(144) 评论(0) 推荐(0) 编辑
摘要: View Code 1 // date : 5.4 2 // problem : dp 3 #include <iostream> 4 #include <cstdio> 5 #include <algorithm> 6 using namespace std; 7 struct node 8 { 9 int cost,w,nk;10 }d[405];11 int f[40005];12 bool cmp(node a,node b)13 {14 return a.w<=b.w;15 }16 /// 模板17 void one(int cost, in 阅读全文
posted @ 2011-05-04 10:46 eth0 阅读(200) 评论(0) 推荐(0) 编辑
2011年5月2日
摘要: ps : rp 巨差 , 调试半天 … 写得太受挫了 初始化是不是写得太麻烦了呢? 1: #include <iostream> 2: 3: using namespace std; 4: int f[1005],ans[1005][35][2]; 5: int main() 6: { 7: int n,m; 8: cin>>n>>m; 9: int a=0; 10: for(int i=0;i... 阅读全文
posted @ 2011-05-02 20:26 eth0 阅读(142) 评论(0) 推荐(0) 编辑
2011年4月29日
摘要: View Code 1 #include <iostream> 2 #include <cstring> 3 using namespace std; 4 char a[505],b[505],c[1005]; 5 int len,len1,len2,flag; 6 void solve(int i,int j,int k) 7 { 8 if(i == len && len1 == j && len2 == k) {flag = 1; return;} 9 if(flag || i >= len || j > len1 || 阅读全文
posted @ 2011-04-29 19:08 eth0 阅读(122) 评论(0) 推荐(0) 编辑
2011年4月28日
摘要: 1、安装wine出错了(缺少文件)安装wine 的 RPM包时候出现如下错误。# rpm -ivh wine-xim-20030408-1.i386.rpmerror: Failed dependencies:libsane.so.1 is needed by wine-xim-20030408-1libXv.so.1 is needed by wine-xim-20030408-1解决:上google搜索libsane.so.1和libXv.so.1,然后安装后再安装wine。2、编译安装Wine的时候出现checking build system type… i686-pc-linux-g 阅读全文
posted @ 2011-04-28 16:01 eth0 阅读(3967) 评论(0) 推荐(0) 编辑
2011年4月27日
摘要: View Code 1 /* [(1...n) (1...n)]*/ 2 #include <iostream> 3 #include <cstring> 4 #include <vector> 5 using namespace std; 6 int vis[10005] ,f[100005]; 7 int main() 8 { 9 int n,m;10 cin >> n >> m;11 for(int i=0;i<n;i++) cin >> f[i] ;12 int ans = 0;13 memset(vis,0 阅读全文
posted @ 2011-04-27 17:06 eth0 阅读(133) 评论(0) 推荐(0) 编辑
摘要: View Code 1 /* 2 chun 练笔!!! 3 */ 4 #include <iostream> 5 #include <cstring> 6 using namespace std; 7 int map[105][105] , f[105][105] ; 8 int main() 9 {10 int t,n,m,a,b;11 cin >> t;12 while(t--)13 {14 cin >> n >> m;15 memset(map,0,sizeof(map));16 memset(f,0,sizeof(f));17 阅读全文
posted @ 2011-04-27 16:02 eth0 阅读(138) 评论(0) 推荐(0) 编辑
2011年4月26日
摘要: View Code 1 #include <iostream> 2 #include <cstring> 3 #include <cstdio> 4 using namespace std; 5 char a[100005],b[100005]; 6 int ans[2][100005]; 7 void solve() 8 { 9 int len1 = strlen(a);10 int len2 = strlen(b);11 memset(ans,0,sizeof(ans));12 for(int i=0;i<len1;i++)13 {14 for(i 阅读全文
posted @ 2011-04-26 14:55 eth0 阅读(131) 评论(0) 推荐(0) 编辑