2063. Black and White Time limit: 1.0 secondMemory limit: 64 MB Let’s play a game. You are given a row of n balls, each ball is either black or white.
分类:
其他好文 时间:
2016-03-04 10:28:55
阅读次数:
187
题 There are 2N white balls on a table in two rows, making a nice 2-by-N rectangle. Jon has a big paint bucketfull of black paint. (Don’t ask why.) He
分类:
其他好文 时间:
2016-02-12 06:05:04
阅读次数:
305
UVA - 679Dropping BallsTime Limit: 3000MSMemory Limit: Unknown64bit IO Format: %lld & %lluSubmit StatusDescriptionA number of K balls are dropped one ...
分类:
其他好文 时间:
2016-02-08 17:26:37
阅读次数:
294
题 Description The cows don't use actual bowling balls when they go bowling. They each take a number (in the range 0..99), though, and line up in a sta
分类:
其他好文 时间:
2016-02-05 18:58:48
阅读次数:
132
题目:一条龙有n个头。有m个勇者。勇者的能力值大于龙头的大小就能打败他,每一个勇者须要能力值对等的佣金, 问使用至少多少钱能够杀掉龙。 分析:贪心。首先,将龙和勇者斗都递增排序;然后,每次雇佣当前能力值最小的能够杀龙的勇者就可以。 (假设当前的勇者导致不适最优解,则他之前有比他佣金高的,则他一定更早
分类:
其他好文 时间:
2016-02-04 11:25:54
阅读次数:
112
1 package com.gzcivil.utils; 2 3 /** 4 * 同StringBuffer 5 * 6 * @author Dragon 7 * @time 2013-3-1 8 */ 9 public class StrBuffer { 10 private StringBuff
分类:
其他好文 时间:
2016-02-01 15:04:50
阅读次数:
129
A number of K balls are dropped one by one from the root of a fully binary tree structure FBT. Each time the ball being dropped first visits a non-ter...
分类:
其他好文 时间:
2016-01-18 13:40:25
阅读次数:
131
---恢复内容开始---题目:Once upon a time, in the Kingdom of Loowater, a minor nuisance turned into a major problem.The shores of Rellau Creek in central Loowat...
分类:
编程语言 时间:
2016-01-14 14:15:45
阅读次数:
254
I have some (say, n) marbles (small glass balls) and I am going to buy some boxes to store them. Theboxes are of two types:T ype 1: each box costs c1 ...
分类:
其他好文 时间:
2016-01-06 20:12:31
阅读次数:
293
Labeling BallsTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 10161Accepted: 2810DescriptionWindy has N balls of distinct weights from 1 unit...
分类:
编程语言 时间:
2015-12-14 16:01:08
阅读次数:
268