cars = 100space_in_a_car = 4.0drivers = 30passengers = 90cars_not_driven = cars - driverscars_driven = driverscarpool_capacity = cars_driven * space_i...
分类:
其他好文 时间:
2014-10-21 10:11:15
阅读次数:
138
ZCC loves cards
Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)
Total Submission(s): 2362 Accepted Submission(s): 590
Problem Description
ZCC loves playing car...
分类:
其他好文 时间:
2014-10-18 15:36:01
阅读次数:
218
一、简单工厂模式public interface Car { public void drive();}public class Benz implements Car { public void drive() { System.out.println("Driving ...
分类:
其他好文 时间:
2014-10-17 18:29:47
阅读次数:
200
Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases.For example, "race a car"isnota palindro....
分类:
其他好文 时间:
2014-10-17 06:26:33
阅读次数:
239
题目:There areNgas stations along a circular route, where the amount of gas at stationiisgas[i].You have a car with an unlimited gas tank and it costsco...
分类:
其他好文 时间:
2014-10-15 18:12:11
阅读次数:
218
E -Funny Car RacingTime Limit:1000MSMemory Limit:0KB64bit IO Format:%lld & %lluThere is a funny car racing in a city with n junctions and m directed r...
分类:
其他好文 时间:
2014-10-09 23:04:41
阅读次数:
269
带原型的Constructor模式function Car(model, year, miles){ this.model = model; this.year = year; this.miles = miles;}Car.prototype.toString = function(){ ...
分类:
编程语言 时间:
2014-10-09 00:25:47
阅读次数:
207
执行如下代码:var query = from tr in _carrierRepository select new BaseCarrier { Car...
分类:
其他好文 时间:
2014-10-08 14:27:25
阅读次数:
137
题意:
给一张无向图,中午12:00从0点出发(充满电,支持240分钟的路程),在每个点都能充电,充2分钟的电能跑1分钟,每条路按分钟分为若干个时间段,每个时间段内通过这条路的时间为ti,问到达n-1号点最少要多少时间。
分析:
BFS+优先队列。按时间优先出队,要注意将电量的存储*2(当然有其他方法),因为如果充电时间为奇数,用int存会丢失0.5。其次是要跑两个周期(两天)。判重的话有很多方法,较普遍的是开两维,位置和剩余电量,我的方法是开一维松弛,将电量化为0(x.time-x.power)。要小心的...
分类:
其他好文 时间:
2014-10-07 18:43:34
阅读次数:
239
题目:点击打开链接
思路:对于当前位置的每一个时间段都要走一遍(除了那些需要的时间比最大允许的时间还大的),用 整形 vis[当前位置][剩余油量] 标记。
#include
#include
#include
#define INF 999999999
using namespace std;
struct S{
int pos,time,remain;
bool ...
分类:
其他好文 时间:
2014-10-06 12:14:40
阅读次数:
229