摘要: “Waiting for orders we held in the wood,word from the front never cameBy evening the sound of the gunfire was miles awayAh softly we moved through the... 阅读全文
posted @ 2015-11-20 18:42 Peccavi 阅读(101) 评论(0) 推荐(0) 编辑
摘要: 山人前所未有地首次提交便通过 作文以记之此题为优先队列基础题题目乍一看可用排序 然而题目只要求输出前k个events因此可以大致看作是partial sort 实质上来看此题体现了计算机的优先处理算法 即优先队列难点:Q:如何自定义优先级?A:struct Item{ int time, pe... 阅读全文
posted @ 2015-11-20 17:39 Peccavi 阅读(107) 评论(0) 推荐(0) 编辑
摘要: 盲点:1. 多组数据时 每层循环都要清空或恢复初始值!!!初始值尤其注意类似flag,sum,min,max...的变量清空则是针对各种数据结构如array,vector,stack,queue...其中对ADT(Abstract Data Type)应做如下操作:while(!a.empty())... 阅读全文
posted @ 2015-11-20 15:22 Peccavi 阅读(121) 评论(0) 推荐(0) 编辑
摘要: 留下题目 以启发思维:Given an array, your task is to find the k-th occurrence (from left to right) of an integer v. To make the problem more difficult (and inte... 阅读全文
posted @ 2015-11-20 15:15 Peccavi 阅读(223) 评论(0) 推荐(0) 编辑