摘要: View Code 1 //---------------------API------------------------------ 2 3 4 //downloads a block from Internet sequentially in each call 5 //return true, if the entire file is downloaded, otherwise false. 6 bool GetBlockFromNet(Block* out_block); 7 8 //writes a block to hard disk 9 bool W... 阅读全文
posted @ 2012-03-23 15:36 Cavia 阅读(718) 评论(0) 推荐(0) 编辑
摘要: View Code View Code 1 Build a sorted array consisting of start time and finish time of each event2 traverse3 if(element_type==begin)4 add a new room5 else6 delete a room 1 //Get the first finish time of rooms 2 int getFirst(int n,int* RoomFinish) 3 { 4 int first=0; 5 for(int i=1;i<n;++... 阅读全文
posted @ 2012-03-23 11:12 Cavia 阅读(262) 评论(0) 推荐(0) 编辑