摘要:
functor仿函数 重载函数调用(),可当作函数使用。 跟函数指针相比,能保存状态(即struct的private变量) https://stackoverflow.com/questions/356950/what are c functors and their uses ` template 阅读全文
摘要:
Round A https://codejam.withgoogle.com/codejam/contest/9234486/dashboard A 题意 给一个数,每次可以加一或减一,求最少操作次数,使得最后这个数的十进制表示中每个位都是偶数。 数据范围 Limits 1 ≤ T ≤ 100. S 阅读全文
摘要:
C K th Substring Problem Statement You are given a string s. Among the different substrings of s, print the K th lexicographically smallest one. A sub 阅读全文
摘要:
A Zero Sum Ranges Problem Statement We have an integer sequence A, whose length is N. Find the number of the non empty contiguous subsequences of A wh 阅读全文
摘要:
C Many Medians "source" Time limit : 2sec / Memory limit : 256MB Problem Statement When l is an odd number, the median of l numbers a1,a2,…,al is the 阅读全文
摘要:
最近准备考一下PAT,感觉PAT甲级的题目比较适合练习快速ac能力,基本上看完每题都能有思路,但总不能一次过,需要好好练练。 1001 A+B Format (20) Calculate a + b and output the sum in standard format that is, the 阅读全文