上一页 1 ··· 26 27 28 29 30

2014年7月16日

hdu2527 Huffman Coding

摘要: #include#include#includeusing namespace std;char s[100005];int t;struct dian{ friend bool operator n2.x); } int node,l,r,x;};dian n[105],n1... 阅读全文

posted @ 2014-07-16 14:37 xiao_xin 阅读(96) 评论(0) 推荐(0) 编辑

hdu2531 bfs

摘要: 1 #include 2 #include 3 #include 4 using namespace std; 5 int xx[4]={0,0,1,-1}; 6 int yy[4]={1,-1,0,0}; 7 int used[125][125],hash[125][125],sum,n,m; ... 阅读全文

posted @ 2014-07-16 14:33 xiao_xin 阅读(109) 评论(0) 推荐(0) 编辑

hdu1299

摘要: 1 #include 2 #include 3 int vis[100005],prime[100005]; 4 int main() 5 { 6 int cnt,dd,i,j,t,T,n,ans,temp; 7 cnt=0; dd=int(1.0*sqrt(1000000000.... 阅读全文

posted @ 2014-07-16 14:29 xiao_xin 阅读(233) 评论(0) 推荐(0) 编辑

hdu2534

摘要: 1 #include 2 long long gcd(long long a,long long b) 3 { 4 if (b==0) return a; 5 return(gcd(b,a%b)); 6 } 7 int main() 8 { 9 long long m,n;... 阅读全文

posted @ 2014-07-16 14:28 xiao_xin 阅读(71) 评论(0) 推荐(0) 编辑

hdu2412树形dp

摘要: #include#include#include#includeusing namespace std;int son1[205],f[205][205],dp[205][2],dup[205][2],hash[205];char s[205][105],s1[105],s2[105];void d... 阅读全文

posted @ 2014-07-16 14:25 xiao_xin 阅读(120) 评论(0) 推荐(0) 编辑

hdu1011 树形dp(背包)

摘要: 1 #include 2 #include 3 int max(int a,int b) 4 { 5 if (a>b) return a; 6 return b; 7 } 8 int m; 9 int dp[150][150],son[150],bug[150],pos[150],... 阅读全文

posted @ 2014-07-16 14:16 xiao_xin 阅读(101) 评论(0) 推荐(0) 编辑

上一页 1 ··· 26 27 28 29 30

导航