随笔分类 - 紫书-第五章
摘要:Urban Elevations UVA - 221 An elevation of a collection of buildings is an orthogonal projection of the buildings onto a vertical plane. An external e
阅读全文
摘要:Team Queue UVA - 540 Queues and Priority Queues are data structures which are known to most computer scientists. The Team Queue, however, is not so we
阅读全文
摘要:https://vjudge.net/problem/UVA-10815 题目大意: 输入一个文本,找出所有不同的单词,按字典序从大到小输出,单词不区分大小写。 set-集合 1)每个元素最多出现一次,不能有重复; 2)set中元素是从小到大排列的,若自定义set则必要定义小于运算符。 思路: 把每
阅读全文
摘要:https://vjudge.net/problem/UVA-10474 思路: 对输入的数排序,在已排好序的数中,利用lower_bound()函数查找。 基本用法:lower_bound(a,a+n,x);其中a为数组或容器名,n为数组容量,x为要查找值。(通过二分查找实现) x的位置是:int
阅读全文

浙公网安备 33010602011771号