A Count Task Problem Description Count is one of WNJXYK's favorite tasks. Recently, he had a very long string and he wondered that how many substrings which contains exactly one kind of lowercase in this long string. But this string is so long that h…
素数判断2 比较简单的算法,没有技术含量 A prime number is a natural number which has exactly two distinct natural number divisors: 1 and itself. For example, the first four prime numbers are: 2, 3, 5 and 7. Write a program which reads a list of N integers and prints th…
练习题目二 素数判断 A prime number is a natural number which has exactly two distinct natural number divisors: 1 and itself. For example, the first four prime numbers are: 2, 3, 5 and 7. Write a program which reads a list of N integers and prints the number o…
A - Serval and Bus It is raining heavily. But this is the first day for Serval, who just became 3 years old, to go to the kindergarten. Unfortunately, he lives far from kindergarten, and his father is too busy to drive him there. The only choice for…
浅入动态规划 dynamic programming is a method for solving a complex problem by breaking it down into a collection of simpler subproblems. 最近进行动态规划的学习,看到了一个很好的例子,现在把它记录下来仅供自我知识梳理 1. 从一个生活问题谈起 作者:阮行止 先来看看生活中经常遇到的事吧--假设您是个土豪,身上带了足够的1.5.10.20.50.100元面值的钞票.现在您的目…
STL初步 提交ACM会TLE /仅以学习STL与迭代器使用 C. Cards Sorting time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output Vasily has a deck of cards consisting of n cards. There is an integer on each of the cards, this…