Treasure Map
Time Limit: 2 Seconds Memory Limit: 32768 KB
Your boss once had got many copies of a treasure map. Unfortunately, all the copies are now broken to many rectangular pieces, an...
分类:
其他好文 时间:
2014-10-04 13:42:37
阅读次数:
173
We can change the state of an object by making an assignment to one of its attributes. For example, to change the size of a rectangle without changing...
分类:
其他好文 时间:
2014-09-30 02:18:01
阅读次数:
190
今天看《C++ Primer》的13.1节——Copy, Assign, and Destroy
被这几个玩意儿弄得晕得不行:
◆ Copy Constructor
◆ The Copy-Assignment Operator
◆ Destructor
主要问题集中在:
◆ 我们在什么时候需要自己重写?...
分类:
其他好文 时间:
2014-09-29 00:05:26
阅读次数:
319
DescriptionDr lee cuts a string S into N pieces,s[1],…,s[N]. Now, Dr lee gives you these N sub-strings: s[1],…s[N]. There might be several possibiliti...
分类:
其他好文 时间:
2014-09-28 21:56:35
阅读次数:
243
问题描述:
Programming Assignment 3: Pattern Recognition
Write a program to recognize line patterns in a given set of points.
Computer vision involves analyzing patterns in visual images and recon...
分类:
其他好文 时间:
2014-09-28 17:10:03
阅读次数:
293
cs106s是斯坦福一门叫做编程方法学的课的编号。这门课面向初学编程者,使用的语言是java。课程资源网上都有,我决定把附带的作业自己动手做一下贴在这里。有错漏不足之处欢迎读者指正。 Assignment 1 problem #1 这是个简单的移动Karel的问题。问题很简单,就是移动Karel到....
分类:
其他好文 时间:
2014-09-27 22:50:30
阅读次数:
267
1198. SubstringConstraintsTime Limit: 1 secs, Memory Limit: 32 MBDescriptionDr lee cuts a string S into N pieces,s[1],…,s[N].Now, Dr lee gives you the...
分类:
其他好文 时间:
2014-09-26 03:29:48
阅读次数:
253
有n头牛,m个牛棚,每头牛对牛棚的满意程度有一个排序,每个牛棚有牛数限制。
问如何分配各个牛,使得所有牛的满意程度的差值最小。
这题首先可以想到二分答案,对于每一种差值来求是否可行。
不想再搞网络流,学习了下二分图匈牙利解法。。
匹配时,对于每一种选择(牛棚),若满足范围,且有多余的容量,则匹配;
否则,对于该牛棚已经匹配过的牛进行增广。
#include ...
分类:
其他好文 时间:
2014-09-25 15:20:49
阅读次数:
178
问题描述:
Programming Assignment 2: Randomized Queues and Deques
Write a generic data type for a deque and a randomized queue. The goal of this assignment is to implement elementary data structures ...
分类:
其他好文 时间:
2014-09-22 23:40:03
阅读次数:
406
c++的编译器是非常智能的!当你声明一个空类empty class,如果你的代码有用到这个empty class时,编译器会默默的为你编写一些基本的函数。那么究竟编译器自己添加的函数都有哪些呢?构造函数,析构函数,一个copy构造函数和一个copy assignment操作符。举个例子来说明一下,如果你写下:
class empty{};
就好像你写下这样的代码:
class Empty
{...
分类:
编程语言 时间:
2014-09-22 13:56:02
阅读次数:
145