Gas StationThere 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...
分类:
其他好文 时间:
2014-08-05 02:57:18
阅读次数:
254
题目:There are N gas stations along a circular route, where the amount of gas at station i is gas[i].You have a car with an unlimited gas tank and it c....
分类:
编程语言 时间:
2014-08-03 10:13:35
阅读次数:
315
#!r6rs
( import ( rnrs base ( 6 ) ) )
( define ( filter pred items )
( cond [ ( null? items ) '() ]
[ ( pred ( car items ) )
( cons ( car items )...
分类:
其他好文 时间:
2014-08-02 01:53:12
阅读次数:
287
题目连接:http://acm.uestc.edu.cn/#/problem/show/931OJ评判系统有些坑,不支持__int64以及输出的%I64d大家注意。全开long long也会TLE,比较坑。逆序的基础操作题,不错。 1 #include 2 #define MAX 100010 3....
分类:
其他好文 时间:
2014-07-27 21:36:45
阅读次数:
207
本设计模式就是利用不同的类包起不同的命令,达到使用什么命令就实现什么操作。
也可以进一步利用map和自己喜欢的命令词对接起来。
一个执行类实际上已经包含了所有需要的操作了,如:
class SuperMaker
{
public:
string makeCar()
{
return "Car";
}
string makePlane()
{
return "Plane";
...
分类:
其他好文 时间:
2014-07-27 11:19:32
阅读次数:
202
1.在创建窗体的时候需要讲listview的属性view改为detail.(刚开始不知道改属性花了一下午的时间去绑定数据,然后~~~~(>_ list = new List() foreach (Car car in list) { //创建项 ListViewItem lvw = ne...
分类:
其他好文 时间:
2014-07-27 10:30:12
阅读次数:
545
题意:电脑记录了某一时刻每个赛车的前面和后面个有多少辆车(多个车并排时在别的车那只算一辆),问最少有多少个不合理的数据。分析:看到n=n肯定不行,加上自己就超过n了。否则这个车肯定在(a+1,n-b)这段区间内,所以这段区间内的车子数(cnt[][]记录)++,如果车子数大于区间长度,就不再加了。搞...
分类:
其他好文 时间:
2014-07-24 22:53:23
阅读次数:
168
1033. To Fill or Not to Fill (25)时间限制10 ms内存限制32000 kB代码长度限制16000 B判题程序Standard 作者ZHANG, GuochuanWith highways available, driving a car from Hangzhou ...
分类:
其他好文 时间:
2014-07-24 22:52:13
阅读次数:
388
说到复合与存取,我做完这个例子,感觉就是类的集合,也没什么东西。
主Car类:
#import "Engine.h"
#import "Tire.h"
//汽车
@interface Car : NSObject
{
Engine *engine;
Tire *tires[4];
}
-(Engine *)engine;
-(void)setEngine:(Engine *) ...
分类:
其他好文 时间:
2014-07-21 16:42:12
阅读次数:
230