- 博客(13)
- 资源 (1)
- 收藏
- 关注
原创 思维题——Gym(102302J) Weird Sanchola
题目Sanchola is getting an array of integers as gift. He’s weird, so he doesn’t like having distinct integers in the same array and he only likes prime numbers. That’s why he believes that he might nee...
2019-11-23 12:54:56 538
原创 矩阵快速幂——Fibonacci(POJ-3070)
题目In the Fibonacci integer sequence, F0 = 0, F1 = 1, and Fn = Fn − 1 + Fn − 2 for n ≥ 2. For example, the first ten terms of the Fibonacci sequence are:0, 1, 1, 2, 3, 5, 8, 13, 21, 34, …An alternat...
2019-11-03 16:21:23 625
原创 几何——(Gym-102267H)Circle of Polygon
题目A circumscribed circle of a polygon is the circle that passes through all the vertices of that polygon.Let’s assume we have a regular polygon, we want to find the area of the circumscribed circle...
2019-11-03 16:06:34 328
原创 暴力打表素数筛——(Gym 102267B)Primes
题目A prime number is a natural number greater than 1 and has exactly 2 divisors which are 1 and the number itself.You are given a prime number n, find any 2 prime numbers aa and bb such that a+b=n or...
2019-11-03 15:52:57 284 1
原创 期望DP——(HDU6658)The Moon
题目he Moon card shows a large, full moon in the night’s sky, positioned between two large towers. The Moon is a symbol of intuition, dreams, and the unconscious. The light of the moon is dim, compared...
2019-11-02 23:52:33 177
原创 Yet Another Number Sequence(CF-392C)——矩阵快速幂、组合数
题目Everyone knows what the Fibonacci sequence is. This sequence can be defined by the recurrence relation:F1 = 1, F2 = 2, Fi = Fi - 1 + Fi - 2 (i > 2).We’ll define a new number sequence Ai(k) by ...
2019-10-15 17:05:07 206
原创 斐波那契数列、DP——(HDU5459)Jesus Is Here 2015沈阳ICPC网络赛
题目I’ve sent Fang Fang around 201314201314 text messages in almost 55 years. Why can’t she make sense of what I mean? “But Jesus is here!” the priest intoned. “Show me your messages.” Fine, the first ...
2019-09-02 20:40:54 115
原创 8.23CCPC网络赛——(HDU6708)Windows Of CCPC
题目In recent years, CCPC has developed rapidly and gained a large number of competitors .One contestant designed a design called CCPC Windows .The 1-st order CCPC window is shown in the figure:CCPC...
2019-08-25 21:09:33 220
原创 8.23CCPC网络赛——(HDU6702)^&^
题目Bit operation is a common computing method in computer science ,Now we have two positive integers A and B, Please find a positive integer C that minimize the value of the formula (A xor C) &...
2019-08-25 21:01:32 267
原创 8.23CCPC网络赛——(HDU6707)Shuffle Card
题目A deck of card consists of n cards. Each card is different, numbered from 1 to n. At first, the cards were ordered from 1 to n. We complete the shuffle process in the following way, In each operati...
2019-08-25 20:55:18 127
原创 SJT生成排列(清华OJ)
题目给定n和k,输出用SJT算法生成的第k个排列。其中,第一个排列为1,2,3,…,n。输入:一行两个整数n,k。输出:一行用空格隔开的n个数,是SJT算法生成的第k个排列。数据规模与约定:①保证存在第k个排列;②对所有数据,n<=10;③时间限制为1s,空间限制为512MB。Sample Input: 5 23Sample Output: 4 1 5 3 2SJT算法初始状...
2019-08-16 00:12:13 736
原创 TDL-HDU6641(数学+枚举)杭电多校第6场
TDL题目For a positive integer n, let’s denote function f(n,m)as the mm-th smallest integer x that x>n and gcd(x,n)=1. For example, f(5,1)=6 and f(5,5)=11. You are given the value of mm and (f(n,m)−...
2019-08-14 18:57:03 139
原创 站队(queue)周测二
站队(第一类斯特林数&DP)题目有n个高度分别为1到n的人,从前到后站成一列,高的人会挡住矮的人。现在从前往后可以看到m个人,问一共有几种站法?格式输入:一行两个整数n,m∈【1,1000】,如题所述。输出:一行一个整数,为答案mod 1e9+7的值。时间限制:1s。空间限制:512MB。样例样例输入①:3 2输出:3解释:一共有132、231、213,这三种方法可以从...
2019-08-06 22:48:30 136
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人