码迷,mamicode.com
首页 >  
搜索关键字:water    ( 3290个结果
hdoj 4183 Pahom on Water 【基础最大流】
题目:hdoj 4183 Pahom on Water 题意:题目有点长,读懂了就是个水的最大流,每次从789开始到400,走的话必须是两个圆相交而且频率递增的,每个点只走一次,求有没有满足这样条件的。 分析:题目读懂就比较水了。直接按照题目意思建图,初始点和结束点容量为2,其他点只走一次容量为1,然后求最大流。 AC代码: #include #include ...
分类:其他好文   时间:2014-08-24 11:44:42    阅读次数:195
Lucky
Jason MarzDo you hear me ,I'm talking to you,Across the water across the deep blue ocean,under the open sky,ou my baby I'm trying.Boy I hear you in my...
分类:其他好文   时间:2014-08-23 12:30:50    阅读次数:211
leetcode之Container With Most Water 和Trapping Rain Water
Container With Most Water   Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpoints of line...
分类:移动开发   时间:2014-08-22 16:17:59    阅读次数:208
hdu 4974 A simple water problem(数学题)
hdu 4974 A simple water problem(数学题)...
分类:其他好文   时间:2014-08-21 22:56:45    阅读次数:481
HDU 4974 A simple water problem(贪心)
HDU 4974 A simple water problem 题目链接 签到题,很容易贪心得到答案是(sum + 1) / 2和ai最大值的最大值 代码: #include #include #include using namespace std; const int N = 100005; typedef long long ll; int t, n; ll...
分类:其他好文   时间:2014-08-21 22:53:25    阅读次数:304
HDU - 4974 A simple water problem
Problem Description Dragon is watching competitions on TV. Every competition is held between two competitors, and surely Dragon's favorite. After each competition he will give a score of either 0 or ...
分类:其他好文   时间:2014-08-21 22:53:15    阅读次数:245
HDOJ 4974 A simple water problem
A simple water problem Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 173    Accepted Submission(s): 112 Problem Description Drago...
分类:其他好文   时间:2014-08-21 22:49:25    阅读次数:377
2014多校第十场1004 || HDU 4974 A simple water problem
题目链接题意 : n支队伍,每场两个队伍表演,有可能两个队伍都得一分,也可能其中一个队伍一分,也可能都是0分,每个队伍将参加的场次得到的分数加起来,给你每个队伍最终得分,让你计算至少表演了几场。思路 : ans = max(maxx,(sum+1)/2) ;其实想想就可以,如果所有得分中最大值没有和...
分类:其他好文   时间:2014-08-21 22:37:24    阅读次数:233
HDU 4974 A simple water problem 模拟(水
水题。 #include #include #include #include using namespace std; typedef long long ll; priority_queue q; int main() { int T, cas = 0; scanf("%d", &T); while(T-- > 0) { int n; ...
分类:其他好文   时间:2014-08-21 19:27:14    阅读次数:196
#LeetCode# Container With Most Water (todo)
描述:实现1 -- 求所有可能的值,O(N^2),超时了(因为超时没有跑所有的测试用例,所以不确定还有没有其他问题)代码: 1 def maxArea(self, height): 2 tmp = len(height) 3 if tmp == 0 or tm...
分类:其他好文   时间:2014-08-21 16:30:54    阅读次数:213
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!