今天没有新动态
@kidultff

C++algorithm中可提高编程效率的几个算法函数

binary_search:二分查找lower_bound:通过二分查找,返回容器中第一个大于或等于n的位置upper_bound:通过二分查找,返回容器中第一个大于n的位置copy:容器拷贝count:通过等于运算符计算容器中特定元素出现次数。(对于struct等,可以重载等于 ...
  • 0
  • 7
@kidultff

PAT-A 真题 – 1078 Hashing

The task of this problem is simple: insert a sequence of distinct positive integers into a hash table, and output the positions of the input numbers. The hash function is defined to be H(key)=key%TSize where TSize& ...
  • 0
  • 0
@kidultff

PAT-A 真题 – 1055 The World's Richest

Forbes magazine publishes every year its list of billionaires based on the annual ranking of the world's wealthiest people. Now you are supposed to simulate this job, but concentrate only on the people in a certain range of a ...
  • 0
  • 0
@kidultff

PAT-A 真题 – 1054 The Dominant Color

Behind the scenes in the computer's memory, color is always talked about as a series of 24 bits of information for each pixel. In an image, the color with the largest proportional area is called the dominant color. A str ...
  • 0
  • 0