HDU 1969 Pie(二分法)My birthday is coming up and traditionally I’m serving pie. Not just one pie, no, I have a number N of them, of various tastes and of...
分类:
其他好文 时间:
2015-08-05 17:55:55
阅读次数:
130
My birthday is coming up and traditionally I’m serving pie. Not just one pie, no, I have a number N of them, of various tastes and of various sizes. F...
分类:
其他好文 时间:
2015-08-04 13:20:55
阅读次数:
99
Kick Veges' Ass
Description
有n个菜鸟站成一排,Jason要按顺序虐他们一下。虐第i个菜鸟需要花费掉A[i]点RP,现在Jason打算分k天虐完这些菜鸟。Jason每天的RP总数是固定的,为了使RP最低的时候不会过低导致杯具,他希望这k天中虐菜花费RP最多的一天,花费的RP尽量少。求Jason在花费RP最多那天花费了了多少RP。
Inp...
分类:
其他好文 时间:
2015-08-03 19:05:36
阅读次数:
192
PieTime Limit: 5000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 6442Accepted Submission(s): 2421Problem Descrip...
分类:
其他好文 时间:
2015-08-03 14:17:03
阅读次数:
75
Java学习笔记(2015.7.27~7.31)Java学习笔记(2015.7.27~7.31)Java课堂Java学习笔记(2015.7.27~7.31)小技巧常用方法1、List另一个子类--LinkedList2、数组的常用方法3、排序1、二分法查找2、数组转换为List3、可变参数Type...param(了解)1、容器Collection2、自动拆装箱..
分类:
编程语言 时间:
2015-08-02 18:26:48
阅读次数:
212
Description
已知两个长度为N的数组A和B,下标从0标号至N-1。
现在定义一种D序列 (假设长度为L),这种序列满足下列条件:
1. 0
2. A[D[i]]
3. B[D[i]] > B[D[i+1]] (0
求满足条件的D序列的最大长度。
(其实这种序列叫做D序列的原因是:这道题是D题)
Input
多组数据,每组数据第一行是一个整数N。(1...
分类:
其他好文 时间:
2015-08-02 08:59:44
阅读次数:
111
Description
'Oh no, they've done it again', cries the chief designer at the Waferland chip factory. Once more the routing designers have screwed up completely, making the signals on the chip connec...
分类:
其他好文 时间:
2015-08-02 08:57:33
阅读次数:
181
其实,二分法真的不那么简单,尤其是二分法的各个变种。 最最简单的二分法,就是从一个排好序的数组之查找一个key值。 如下面的程序:int search(int *arr, int n, int key)
{
int left = 0, right = n-1;
while(left<=right) {
int mid = left + ((right - left)...
分类:
其他好文 时间:
2015-07-31 21:55:02
阅读次数:
126
求最长上升子序列的二分法。#include#include#includeusing namespace std;#define MAX(a,b) (a>b)?a:bconst int SIZE=500000+16;const int INF=1000000;struct node{ int ...
分类:
其他好文 时间:
2015-07-31 18:12:15
阅读次数:
164
Can you find it?
Time Limit : 10000/3000ms (Java/Other) Memory Limit : 32768/10000K (Java/Other)
Total Submission(s) : 274 Accepted Submission(s) : 87
Problem Description
Give you three seque...
分类:
其他好文 时间:
2015-07-30 23:32:13
阅读次数:
156