码迷,mamicode.com
首页 >  
搜索关键字:bits    ( 3873个结果
LeetCode#191 Number of 1 Bits
Problem Definition:Write a function that takes an unsigned integer and returns the number of ’1' bits it has (also known as the Hamming weight).For ex...
分类:其他好文   时间:2015-07-18 15:29:39    阅读次数:108
hdu 5282 序列计数
// 统计 s1 的子序列中是 s1 和 s2 的最长公共子序列的个数 1 #include "bits/stdc++.h" 2 using namespace std; 3 int T; 4 char s1[1010], s2[1010]; 5 int dp[1010][1010]; 6 long...
分类:其他好文   时间:2015-07-17 22:29:03    阅读次数:100
zoj 2432 模板LCIS
输出一条 LCIS 1 #include "bits/stdc++.h" 2 using namespace std; 3 int T; 4 int len1, len2; 5 int s1[510], s2[510]; 6 int dp[510][510]; 7 int choice[510][5...
分类:其他好文   时间:2015-07-17 22:14:21    阅读次数:90
hdu 1052 贪心
// 判断出(田忌)的必胜局面和必败局面,则可以容易的得到决策方案// 若没有明显的必胜局面和必败局面,则使用田忌赛马的策略 1 #include "bits/stdc++.h" 2 using namespace std; 3 int N; 4 int v1[1010], v2[1010]; 5 ...
分类:其他好文   时间:2015-07-17 17:56:51    阅读次数:83
hdu 4568 bfs + 状压dp
//这题的数据是不是有问题... 不考虑宝藏一个也拿不到也能AC... 1 #include "bits/stdc++.h" 2 using namespace std; 3 const int INF = 0x3f3f3f3f; 4 int T; 5 int N, M; 6 int m...
分类:其他好文   时间:2015-07-17 15:29:09    阅读次数:174
数据结构之位图
1. 概述位图(bitmap)是一种非常常用的结构,在索引,数据压缩等方面有广泛应用。本文介绍了位图的实现方法及其应用场景。2. 位图实现(1)自己实现在位图中,每个元素为“0”或“1”,表示其对应的元素不存在或者存在。 1 #define INT_BITS sizeof(int) 2 #defin...
分类:其他好文   时间:2015-07-16 21:42:10    阅读次数:114
hdu 3182 状压dp
1 #include "bits/stdc++.h" 2 using namespace std; 3 int T; 4 5 int dp[40000]; 6 int totene[40000]; 7 8 int N, E; 9 int val[20], ene[20], cond[20];1...
分类:其他好文   时间:2015-07-16 19:33:01    阅读次数:96
hdu 1074 状压dp
//2015.7.16 首A 1 #include "bits/stdc++.h" 2 using namespace std; 3 int T; 4 int N; 5 char subject[20][110]; 6 int deadline[20], spend[20]; 7 int dp[40...
分类:其他好文   时间:2015-07-16 16:21:09    阅读次数:97
Leetcode 190 Reverse Bits
Reverse bits of a given 32 bits unsigned integer.For example, given input 43261596 (represented in binary as00000010100101000001111010011100), return ...
分类:其他好文   时间:2015-07-14 17:21:41    阅读次数:109
POJ 3652 & ZOJ 2934 & HDU 2721 Persistent Bits(数学 元)
主题链接:PKU:http://poj.org/problem?id=3652ZJU:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=1933HDU:http://acm.hdu.edu.cn/showproblem.php?pi...
分类:其他好文   时间:2015-07-13 20:28:26    阅读次数:95
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!