- 博客(9)
- 资源 (3)
- 收藏
- 关注
原创 ACM-BestCoder Round #20
A-who is the best? 题意: 给出n个数,求出现频率最高的数,如果最高出现次数一样,则输出最先出现的数。 分析: 由于数据范围不大,可以直接将数据哈希为数组下标,数组值存放出现次数,最后遍历出答案即可。 源代码: #include #include #include #include using namespace std; int data[105]
2014-11-29 21:10:57 494
原创 ACM-Codeforces Round #279 (Div. 2)
A. Team Olympiad 题意: 给你一行数据,它们的值是1、2、3中的一个,然后问可以构成同时包含1、2、3的组数有多少,并且输出每一组的信息,当然,是原数据的下标。 分析: 首先构造结构体,保存原数据值及其下标,然后使用三维动态数组,代表三种不同的值,将不同类型的结构体,放入对应的数组,最后循环扫描数组,输出信息,并弹出结构体,任何一项为空则停止操作。 源代码:
2014-11-27 22:30:28 536
原创 ACM-数据结构-线段树I
线段树是一种特殊的数据结构,总的来说它支持两种操作,一是更新,二是查询。当然,不使用线段树也能完成这两种操作,此时一般为线性复杂度O(n),所以使用它的目的其实也就是优化时间复杂度,更新和查询操作的复杂度都下降到了o(logn)。 其次,说说线段树的实现思想。总体上看,线段树将整个区间不断二分,直到区间上下界重合,最终形成一棵树,然后给每一个子区间从上到下、从左到右标上号,从这一步看来,线段树和
2014-11-15 12:15:58 1039
原创 ACM-题集总揽
ACM竞赛,感觉刷题也是很重要的一部分,所以这里将做过的比赛题记录下来,以供查阅: ACM-HDOJ-2006 Asia Regional Shanghai(点击打开链接)
2014-11-10 11:05:27 575
Introduction to 3D Game Programming with DirectX 11
2017-08-29
windows下7种winsocket的I/O编程模型
2015-07-19
WinSocket编程
2015-07-11
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人