时间是一切财富中最宝贵的财富。 —— 德奥弗拉斯多

这只是一篇单纯的记录开博的文章，如果你点进来，可能会因为里面并没有写什么而感到失望

I like rabbits

发表于

**题目描述**

Given a positive integer, N, the sequence of all fractions a/b with (0 < a ≤ b), (1 < b ≤ N) and a and b relatively prime, listed in increasing order, is called the Farey Sequence of order N.

For example, the Farey Sequence of order 6 is:*

0/1, 1/6, 1/5, 1/4, 1/3, 2/5, 1/2, 3/5, 2/3, 3/4, 4/5, 5/6, 1/1 *If the denominators of the Farey Sequence of order N are: b[1], b[2], . . . , b[K]

then the Farey Sum of order N is the sum of b[i]/b[i + 1] from i = 1 to K—1.

For example, the Farey Sum of order 6 is:*

1/6 + 6/5 + 5/4 + 4/3 + 3/5 + 5/2 + 2/5 + 5/3 + 3/4 + 4/5 + 5/6 + 6/1 = 35/2 *Write a program to compute the Farey Sum of order N (input).

发表于

**题目描述**

Mrs. Chambers always has her class line up in height order (shortest at the front of the line). Every September a new class of exactly 20 3rd graders arrive, all of different height. For the first few days it takes a long time to get the kids in height order, since no one knows where they should be in the line.

Needless to say, there is quite a bit of jockeying around. This year Mrs. Chambers decided to try a new method to minimize this ordering chaos. One student would be selected to be the first person in line. Then, another student is selected and would find the rst person in the line that is taller than him,and stand in front of that person, thereby causing all the students behind him to step back to make room. If there is no student that is taller, then he would stand at the end of the line. This process continues, one student at-a-time, until all the students are in line, at which point the students will be lined up in height order.

For this problem, you will write a program that calculates the total number of steps taken back during the ordering process for a given class of students.

发表于

**题目描述**

JOIOJI桑是JOI君的叔叔。“JOIOJI”这个名字是由“J、O、I”三个字母各两个构成的。

最近，JOIOJI桑有了一个孩子。JOIOJI桑想让自己孩子的名字和自己一样由“J、O、I”三个字母构成，并且想让“J、O、I”三个字母的出现次数恰好相同 。

JOIOJI桑家有一份祖传的卷轴，上面写着一首长诗，长度为N，由“J、O、I”三个字母组成。JOIOJIさん想用诗中最长的满足要求的连续子串作为孩子的名字。

现在JOIOJI桑将这首长诗交给了你，请你求出诗中最长的、包含同样数目的“J、O、I”三个字母的连续子串。

发表于

**题目描述**

链接：https://ac.nowcoder.com/acm/contest/883/B

ZYB loves binary strings (strings that only contains `0`

and`1`

’). And he loves equal binary strings more, where the number of `0`

and the number of `1`

in the string are equal.

ZYB wants to choose a substring from an original string `T`

so that it is an equal binary stringwith the longest length possible. He also wants to choose a subsequence of `T`

which meets the same requirements.

A string `v`

is a substring of a string `w`

if `v`

is empty, or there are two integers `l`

and `r`

(1≤l≤r≤∣w∣) such that `v=wl*wl+1 ⋯wr`

A string v is a subsequence of a string `w`

if it can be derived from w by deleting any number (including zero) of characters without changing the order of the remaining characters.

For simplicity, you only need to output the maximum possible length. Note that the empty string is both a substring and a subsequence of any string.

发表于

**题目描述**

链接：https://ac.nowcoder.com/acm/contest/884/K

One day he got a string consisted of numbers. He wants to know how many substrings in the string are multiples of 300 when considered as decimal integers.

**Note that leading and trailing zeros are allowed (both in original string and substrings you chose)** and the same substring appearing in different places can be counted multiple times.