- 博客(103)
- 资源 (1)
- 收藏
- 关注
原创 POJ 1064 Cable master
POJ 1064 Cable masterInhabitants of the Wonderland have decided to hold a regional programming contest. The Judging Committee has volunteered and has promised to organize the most honest contes
2018-01-27 21:26:06
313
原创 Codeforces Round #457 (Div. 2) C. Jamie and Interesting Graph
Codeforces Round #457 (Div. 2) C. Jamie and Interesting GraphC. Jamie and Interesting Graphtime limit per test2 secondsmemory limit per test256 megabytesinputstandar
2018-01-27 11:00:12
420
原创 51 nod 1135原根
51 nod 1135原根题意: a 模 m 的阶定义: gcd(a,m)=1,使得成立的最小的 r,称为 a 对 模m 的 阶 那么整个题就是要求 a^(p-1) % p==1 成立的 最小 a ;方法: copy by 点击打开链接分解质因子,对任何整数 a ∈[1,p-1], 检验 a 是否为 p 的
2017-11-08 23:54:06
568
原创 337C - Codeforces. Quiz
C. Quiztime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputManao is taking part in a quiz. The quiz consists of n consecuti
2017-10-29 20:25:51
550
原创 Codeforces Round #435 (Div. 2) C. Mahmoud and Ehab and the xor
Codeforces Round #435 (Div. 2) C. :Mahmoud and Ehab and the xor
2017-09-20 15:47:41
366
原创 codeforces 862B B. Mahmoud and Ehab and the bipartiteness
codeforces 862B B. Mahmoud and Ehab and the bipartitenessB. Mahmoud and Ehab and the bipartitenesstime limit per test2 secondsmemory limit per test256 megabytesinputstandard
2017-09-20 14:47:19
912
原创 2017-2018 ACM-ICPCNEERC : Preparing for Merge Sort
Preparing for Merge SortIvan has an array consisting ofn different integers. He decided to reorder all elements in increasing order. Ivan loves merge sort so he decided to represent his array with one or several increasing sequences which he then plans t
2017-09-19 20:24:10
498
原创 HDU - 5015 233 Matrix
233 MatrixIn our daily life we often use 233 to express our feelings. Actually, we may say 2333, 23333, or 233333 ... in the same meaning. And here is the question: Suppose we have a matrix call
2017-09-16 11:45:26
349
原创 HDU - 4549 M斐波那契数列
M斐波那契数列 HDU - 4549M斐波那契数列F[n]是一种整数数列,它的定义如下:F[0] = a F[1] = b F[n] = F[n-1] * F[n-2] ( n > 1 ) 现在给出a, b, n,你能求出F[n]的值吗?输入包含多组测试数据;每组数据占一行,包含3个整数a, b, n( 0 对每组测试数据请输出一个整数F[n],由于F[n]
2017-09-13 09:25:01
253
原创 HDU - 5155 Harry And Magic Box
Harry And Magic BoxOne day, Harry got a magical box. The box is made of n*m grids. There are sparking jewel in some grids. But the top and bottom of the box is locked by amazing magic, so Harry can’
2017-09-08 14:05:20
354
原创 CodeForces - 296B Yaroslav and Two Strings (容斥)
Yaroslav and Two Strings Yaroslav thinks that two stringss and w, consisting of digits and having lengthn are non-comparable if there are two numbers,i and j(1 ≤ i, j ≤
2017-09-08 10:46:15
402
原创 HDU - 4451 Dressing
DressingWangpeng has N clothes, M pants and K shoes so theoretically he can have N×M×K different combinations of dressing.One day he wears his pants Nike, shoes Adiwang to go to school happily.
2017-09-07 16:39:12
302
原创 Lengthening Sticks CodeForces - 571A
Lengthening SticksYou are given three sticks with positive integer lengths ofa, b, and c centimeters. You can increase length of some of them by some positive integer number of centimeters (di
2017-09-07 15:17:54
352
原创 Codeforces Round #433 (2)C:Planning
C: PlanningHelen works in Metropolis airport. She is responsible for creating a departure schedule. There aren flights that must depart today, the i-th of them is planned to depart at the i-
2017-09-07 11:04:28
319
原创 Codeforces Round #433 (2)B :Maxim Buys an Apartment
Maxim Buys an ApartmentMaxim wants to buy an apartment in a new house at Line Avenue of Metropolis. The house hasn apartments that are numbered from 1 to n and are arranged in a row. Two apart
2017-09-07 08:55:13
688
原创 Reading comprehension HDU - 4990
Reading comprehension HDU - 4990Read the program below carefully then answer the question.#pragma comment(linker, "/STACK:1024000000,1024000000") #include #include #include #includ
2017-09-06 16:25:33
300
原创 Educational Codeforces Round 28 B: Math Show
Math ShowPolycarp takes part in a math show. He is given n tasks, each consists of k subtasks, numbered1 through k. It takes himtj minutes to solve thej-th subtask of any task. Thus, time
2017-09-06 11:09:08
778
原创 Educational Codeforces Round 28 A :Curriculum Vitae
A :Curriculum VitaeHideo Kojima has just quit his job at Konami. Now he is going to find a new place to work. Despite being such a well-known person, he still needs a CV to apply for a job.Durin
2017-09-06 09:57:42
305
原创 暑假集训总结
暑假集训总结 今天最后一场组队赛结束了,大概也相当于暑假集训的的结束吧,之后就是网络赛。总体上,整个暑假还是学到了很多东西,也是知道了自己有多蒻吧,这个暑假主要是在数学内容的方面的学习,确实在数学方面的造诣还不够,其实可以说是很挫。八月的多校几乎都是在水,确实感觉很多东西都不会,确实感觉很无力。 一个暑假的时间,其实没有开始想象的那么长,转眼间都开学了,好多东西
2017-09-06 01:08:04
304
原创 Law of Commutation HDU - 6189
Law of Commutation HDU - 6189As we all know, operation ''+'' complies with the commutative law. That is, if we arbitrarily select two integersaa and bb,a+ba+b always equals to b+ab+
2017-09-05 19:31:15
365
原创 Find a multiple POJ - 2356
Find a multiple POJ - 2356 The input contains N natural (i.e. positive integer) numbers ( N <= 10000 ). Each of that numbers is not greater than 15000. This numbers are not necessarily differ
2017-09-04 20:38:11
381
原创 Dead Fraction POJ - 1930
Dead Fraction POJ - 1930 Mike is frantically scrambling to finish his thesis at the last minute. He needs to assemble all his research notes into vaguely coherent form in the next 3 days. Unfortunat
2017-09-04 18:35:27
295
原创 Jumping Joe SGU - 141
Jumping Joe SGU - 141Joe is a frog who likes to jump a lot. In fact, that's all he does: he jumps forwards and backwards on the integer axis (a straight line on which all the integer numbers, both p
2017-09-04 16:05:18
272
原创 RealPhobia HDU - 4180
RealPhobia HDU - 4180 Bert is a programmer with a real fear of floating point arithmetic. Bert has quite successfully used rational numbers to write his programs but he does not like it when the den
2017-09-04 14:12:06
328
原创 Integer Sequences SGU - 140
Integer Sequences SGU - 140A sequence A is called an integer sequence of length N if all its elements A1 A2 .. AN are non-negative integers less than2 000 000 000. Consider two integer sequenc
2017-09-04 10:42:07
338
原创 GCD HDU - 1695
GCD HDU - 1695 Give n 5 integers: a, b, c, d, k, you're to find x in a...b, y in c...d that GCD(x, y) = k. GCD(x, y) means the greatest common divisor of x and y. Since the number of choices
2017-09-03 14:53:16
245
原创 Coprime HDU - 3388
Coprime HDU - 3388 Please write a program to calculate the k-th positive integer that is coprime with m and n simultaneously. A is coprime with B when their greatest common divisor is 1.Input
2017-09-03 10:15:22
351
原创 Coprime HDU - 5072
Coprime HDU - 5072 There are n people standing in a line. Each of them has a unique id number.Now the Ragnarok is coming. We should choose 3 people to defend the evil. As a group, the 3 peo
2017-09-02 20:54:32
298
原创 LightOJ 1306 Solutions to an Equation
LightOJ 1306 Solutions to an EquationYou have to find the number of solutions of the following equation:Ax + By + C = 0Where A, B, C, x, y are integers and x1 ≤ x ≤ x2 andy1 ≤ y ≤ y2.
2017-08-31 09:45:30
595
原创 Snail Alice HDU - 3411
Snail Alice HDU - 3411 A function f(n), n is a positive integer, andGiven q and n, please calculate the value of f(n).Please note that q and n could be huge.InputInput consist
2017-08-30 10:50:31
264
原创 Professor Ben POJ - 3604
Professor Ben POJ - 3604Professor Ben is an old stubborn man teaching mathematics in a university. He likes to puzzle his students with perplexing (sometimes boring) problems. Today his task
2017-08-29 21:07:12
385
原创 Cubic-free numbers II HUST - 1214
Cubic-free numbers II HUST - 1214 A positive integer n is called cubic-free, if it can't be written in this form n = x*x*x*k, while x is a positive integer larger than 1. Now give you two Integers L
2017-08-28 20:25:35
301
原创 Visible Trees HDU - 2841
Visible Trees HDU - 2841 There are many trees forming a m * n grid, the grid starts from (1,1). Farmer Sherlock is standing at (0,0) point. He wonders how many trees he can see. If two trees
2017-08-28 19:06:51
462
原创 Co-prime HDU - 4135
HDU _4135 Co_prime Given a number N, you are asked to count the number of integers between A and B inclusive which are relatively prime to N.Two integers are said to be co-prime or relativel
2017-08-28 17:13:29
358
原创 Array Challenge 2017 多校10 矩阵快速幂
Array Challenge There’s an array that is generated by following rule.h0=2,h1=3,h2=6,hn=4hn−1+17hn−2−12hn−3−16And let us define two arrays bnandan as below. iibn=n+1hn+9hn+1hn−1+9hn2+2
2017-08-27 20:35:02
313
原创 求递推数列通项的特征根法
数学 之 求递推数列通项的特征根法主要是对两种求递推式 来讲解的吧 (主题内容 copy 王新敞 的一篇 文章)1.2.以上就是两种方式求递推式了,主要应用应该就是在求一个已知的式子的值吧。然后 搭配 矩阵快速幂 (- -)
2017-08-23 16:51:09
2965
原创 So Easy! HDU 4565
So Easy!先吐槽一下吧 完全没有想要做这个题,本来我在学 FFT 专题的,然后有个题不会搜题解,好不容易找到了一个,真坑然后看着一脸懵,完全不知道讲的啥,在一个小时之后我选择了放弃,准备敲一个矩阵快速幂,A了就跑,反正有递推公式不用自己推,然而等我敲完发现这TM 完全是两个题好吧,没事能不能不要瞎贴题解。题目还一样......本来在做 :点击
2017-08-23 16:07:51
286
原创 Two strings 2017 多校 9 J
Two strings Giving two strings and you should judge if they are matched.The first string contains lowercase letters and uppercase letters. The second string contains lowercase letters
2017-08-23 10:03:29
204
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人