码迷,mamicode.com
首页 >  
搜索关键字:namespace    ( 41927个结果
HDU 3555
数位DP 1 #include 2 #include 3 #include 4 #include 5 #include 6 #define LL __int64 7 using namespace std; 8 9 LL dp[30][3];10 LL a[30];11 LL n;12 ...
分类:其他好文   时间:2015-02-06 23:05:25    阅读次数:192
【HDU】2147 kiki's game
http://acm.hdu.edu.cn/showproblem.php?pid=2147题意:n×m的棋盘,每次可以向左走、向下走、向左下走,初始在(1, m),n,musing namespace std;int main() { int n, m; while(scanf("%d%d", &...
分类:其他好文   时间:2015-02-06 23:05:15    阅读次数:155
【HDU】1848 Fibonacci again and again
http://acm.hdu.edu.cn/showproblem.php?pid=1848题意:同nim,3堆,每次取的为fib数,n#include using namespace std;int f[1005], a[100];bool b[20];int main() { a[1]=1; a...
分类:其他好文   时间:2015-02-06 23:04:10    阅读次数:177
【HDU】1846 Brave Game
http://acm.hdu.edu.cn/showproblem.php?pid=1846题意:二人博弈,1堆石子每次取1~m个,没有石子可取的输,输出先手胜利还是后手胜利。#include using namespace std;int main() { int c; scanf("%d", &...
分类:其他好文   时间:2015-02-06 23:00:09    阅读次数:125
uva156反片语
背景:学习stl过程中遇到的简单题,但我不会。 思路:将单词标准化,然后就可以运用映射map了。#include #include #include #include #include #include using namespace std; map cnt; vector words; string repr(const string& s) { string ans=s...
分类:其他好文   时间:2015-02-06 21:59:59    阅读次数:200
leetcode_50_Pow(x, n)
版权所有,欢迎转载,转载请注明出处,谢谢 Pow(x, n)  Implement pow(x, n). //vs2012测试代码 //divide-and-conquer //classic #include using namespace std; class Solution { public: double pow(do...
分类:其他好文   时间:2015-02-06 21:57:41    阅读次数:180
poj 2245 水题
求组合数,dfs即可 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 using namespace std; 8 int N,m,t; 9 int a[15],vis[15];10 void dfs(int s...
分类:其他好文   时间:2015-02-06 21:42:56    阅读次数:177
hdu 5055 Bob and math problem
http://acm.hdu.edu.cn/showproblem.php?pid=5055思路:贪心,先排序,然后找到一个奇数与最后以为交换,然后把前n-1位从大到小排序,看看是否符合。 1 #include 2 #include 3 #include 4 using namespace s...
分类:其他好文   时间:2015-02-06 21:40:34    阅读次数:191
UVa 10963 - The Swallowing Ground
题目:给你两个轮廓,判断两个是否能完美的拼接,图形有小方块组成,轮廓用相邻列的方块高度表示。 分析:简单题。直接判断是不是所有对应位置的方块高度差相同即可。 说明:又是很久没刷题了,(⊙v⊙)。 #include #include #include #include #include #include using namespace std; int main() { in...
分类:Windows程序   时间:2015-02-06 20:35:05    阅读次数:266
计算几何模板 (bzoj 1336,poj 2451 ,poj3968)
poj 3968 (bzoj 2642) 二分+半平面交,每次不用排序,这是几个算几版综合。#include#include#include#include#include#include#includeusing namespace std;#define MAXN 100000namespac....
分类:其他好文   时间:2015-02-06 20:27:43    阅读次数:213
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!