上一页 1 2 3 4 5 6 7 ··· 11 下一页
摘要: 根据题意,既然瓶子没有刻度,那么它们直观的刻度就是他们各自本身的容量。 一开始的想法漏洞太大,想着填满其中一个容器就行,咳咳。。。 没有仔细想它的模拟过程。 答题思路: 分别看看当前容器能否往外倒,即 >0 如果能的话,看看能倒在哪个容器里。既然只有3个容器,直接暴力就好啦。写的有点麻木。。。 #i 阅读全文
posted @ 2016-03-03 16:21 咸咸的告别 阅读(157) 评论(0) 推荐(0) 编辑
摘要: 这道题纠结了很久,一开始想一层一层地算,但是各种空间超出,然后百度了人家的解法,还是不错的想法,就是说第n 步走到这里,第n+2步也会走到这里。 值得注意的是它不会走当前所在的可能的位置。 看一个简单的图片,或许会一目了然. #include<iostream> #include<string> # 阅读全文
posted @ 2016-03-03 09:47 咸咸的告别 阅读(172) 评论(0) 推荐(0) 编辑
摘要: #include<iostream> #include<string> #include<string.h> #include<stdio.h> #include<math.h> #include<queue> #include<algorithm> using namespace std; int 阅读全文
posted @ 2016-03-01 16:56 咸咸的告别 阅读(156) 评论(0) 推荐(0) 编辑
摘要: #include<iostream> #include<string> #include<string.h> #include<stdio.h> #include<math.h> #include<queue> #include<algorithm> using namespace std; int 阅读全文
posted @ 2016-03-01 16:28 咸咸的告别 阅读(137) 评论(0) 推荐(0) 编辑
摘要: #include<iostream> #include<string> #include<string.h> #include<stdio.h> #include<math.h> #include<queue> #include<algorithm> using namespace std; int 阅读全文
posted @ 2016-02-29 19:41 咸咸的告别 阅读(250) 评论(0) 推荐(0) 编辑
摘要: #include<stdio.h> #include<string.h> #define maxn 33 int n,k,a,mini,RK; int mapp[maxn][maxn],w[maxn]; void dfs(int station,int coun,int dis){ if(coun= 阅读全文
posted @ 2016-02-28 17:42 咸咸的告别 阅读(173) 评论(0) 推荐(0) 编辑
摘要: #include<iostream> #include<cstdio> #include<string> #include<string.h> #include<math.h> #include<queue> #include<map> #include<algorithm> using names 阅读全文
posted @ 2016-02-26 18:44 咸咸的告别 阅读(171) 评论(0) 推荐(0) 编辑
摘要: 如果数组a当前的排序为{1,2,3,5,4}对这5个元素进行排序,找它的下一个排序 next_permutation(a,a+n);找它的前一个就是 prev_permutation(a,a+n); 有了这个函数,对于数组的字典序排列就方便很多啦; 现在看一道例题 HDU 1027 注意头文件名为: 阅读全文
posted @ 2016-02-24 15:46 咸咸的告别 阅读(162) 评论(0) 推荐(0) 编辑
摘要: #include<iostream> #include<string> #include<string.h> #include<math.h> #include<cstdio> #include<stack> #include<queue> #include<set> using namespace 阅读全文
posted @ 2016-02-13 16:01 咸咸的告别 阅读(231) 评论(0) 推荐(0) 编辑
摘要: #include<iostream> #include<string> #include<string.h> #include<math.h> #include<cstdio> #include<stack> #include<queue> #define maxn 101 using namesp 阅读全文
posted @ 2016-02-12 21:40 咸咸的告别 阅读(322) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 ··· 11 下一页