我要举报本次校赛出题人的消极出题!!! A. 树链剖分数据结构板题 B. The background of water problem 题目大意(大写加粗的水题):给定$N$个学生和他们$K$个科目的成绩$S_i$,再给出各科目$K_i$的权重顺序$Q_i$,求排名之后,拥有id为$X$的是哪个学 ...
分类:
其他好文 时间:
2016-04-12 19:13:19
阅读次数:
351
Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it is able to trap after raining. ...
分类:
移动开发 时间:
2016-04-11 00:07:12
阅读次数:
214
Water pipe
Time Limit: 3000MS Memory Limit: 65536K
Total Submissions: 2265 Accepted: 602
Description
The Eastowner city is perpetually haunted with water supply shortages, so in order to...
分类:
其他好文 时间:
2016-04-07 16:00:36
阅读次数:
434
Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it is able to trap after raining. ...
分类:
移动开发 时间:
2016-04-07 13:27:55
阅读次数:
118
Description 移动信息工程学院即将要离开中珠了, KY在珠海认识了很多女孩,自然很舍不得中珠。于是,他想为这些女孩留下一些礼物,最近中珠阴雨绵绵,五行缺水的他于是想到留下最珍贵的中珠雨水作为纪念。现在他想尽可能地收集到多一点的中珠雨水,假设中珠的地形抽象为一张二维的海拔图,区域的个数为n, ...
分类:
其他好文 时间:
2016-04-06 23:16:38
阅读次数:
158
首先说说最初的但是不正确的思路,stk存值,初始化为输入数组的第一位。从左往右读入数组每一位,如果height[i]>stk.top(),说明stk.top()无法蓄水,pop掉,替换为height[i];如果height[i]<=stk.top(),那么从i开始遍历,直到找到大于等于stk.top ...
分类:
移动开发 时间:
2016-04-05 00:26:15
阅读次数:
206
文章目录如下 (1)自己的思路 (2)自己的代码 (3)别人的思路 (4)别人的代码 (5)对比自己的不足之处 题目 Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate ...
分类:
其他好文 时间:
2016-04-02 00:47:37
阅读次数:
164
传送门 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 e
分类:
其他好文 时间:
2016-03-23 19:44:33
阅读次数:
171
合理性解释:当左端线段L小于右端线段R时,我们把L右移,这时舍弃的是L与右端其他线段(R-1, R-2, ...)组成的木桶,这些木桶是没必要判断的,因为这些木桶的容积肯定都没有L和R组成的木桶容积大。
分类:
其他好文 时间:
2016-03-23 06:11:24
阅读次数:
191
这道题的思路非常难想。 问你须要的最少实验次数,这是非常难求解的。并且我们知道的条件仅仅有三个。k、n、实验次数 。 所以我们最好还是改变思路,转而求最高所能确定的楼层数 。 那么用d[i][j]表示用i个球,实验j次所能确定的最高楼层数 。 那么我们如果第j次实验是在k楼,有两种可能: 1、球破
分类:
其他好文 时间:
2016-03-12 22:35:21
阅读次数:
199