[暑假集训--数论]hdu2136 Largest prime factor
摘要:Everybody knows any number can be combined by the prime number. Now, your task is telling me what position of the largest prime factor. The position o
阅读全文
posted @
2017-08-04 15:48
zhber
阅读(221)
推荐(0)
[暑假集训--数论]hdu1019 Least Common Multiple
摘要:The least common multiple (LCM) of a set of positive integers is the smallest positive integer which is divisible by all the numbers in the set. For e
阅读全文
posted @
2017-08-04 15:45
zhber
阅读(251)
推荐(0)
[暑假集训--数论]poj2115 C Looooops
摘要:A Compiler Mystery: We are given a C-language style for loop of type for (variable = A; variable != B; variable += C) statement; I.e., a loop which st
阅读全文
posted @
2017-08-04 15:42
zhber
阅读(224)
推荐(0)
[暑假集训--数论]poj1365 Prime Land
摘要:Everybody in the Prime Land is using a prime base number system. In this system, each positive integer x is represented as follows: Let {pi}i=0,1,2,..
阅读全文
posted @
2017-08-04 15:37
zhber
阅读(154)
推荐(0)
[暑假集训--数论]poj2034 Anti-prime Sequences
摘要:Given a sequence of consecutive integers n,n+1,n+2,...,m, an anti-prime sequence is a rearrangement of these integers so that each adjacent pair of in
阅读全文
posted @
2017-08-04 15:35
zhber
阅读(249)
推荐(0)
[暑假集训--数论]poj1595 Prime Cuts
摘要:A prime number is a counting number (1, 2, 3, ...) that is evenly divisible only by 1 and itself. In this problem you are to write a program that will
阅读全文
posted @
2017-08-04 15:32
zhber
阅读(169)
推荐(0)
[暑假集训--数论]poj2262 Goldbach's Conjecture
摘要:In 1742, Christian Goldbach, a German amateur mathematician, sent a letter to Leonhard Euler in which he made the following conjecture: Every even num
阅读全文
posted @
2017-08-04 15:29
zhber
阅读(160)
推荐(0)
[暑假集训--数论]poj2909 Goldbach's Conjecture
摘要:For any even number n greater than or equal to 4, there exists at least one pair of prime numbers p1 and p2 such that n = p1 + p2 This conjecture has
阅读全文
posted @
2017-08-04 15:27
zhber
阅读(140)
推荐(0)
[暑假集训--数论]poj3518 Prime Gap
摘要:The sequence of n − 1 consecutive composite numbers (positive integers that are not prime and not equal to 1) lying between two successive prime numbe
阅读全文
posted @
2017-08-04 15:24
zhber
阅读(164)
推荐(0)
[暑假集训--数论]poj1730 Perfect Pth Powers
摘要:We say that x is a perfect square if, for some integer b, x = b 2. Similarly, x is a perfect cube if, for some integer b, x = b 3. More generally, x i
阅读全文
posted @
2017-08-04 15:22
zhber
阅读(161)
推荐(0)
[暑假集训--数论]poj2142 The Balance
摘要:Ms. Iyo Kiffa-Australis has a balance and only two kinds of weights to measure a dose of medicine. For example, to measure 200mg of aspirin using 300m
阅读全文
posted @
2017-08-04 15:15
zhber
阅读(172)
推荐(0)
[暑假集训--数论]poj2773 Happy 2006
摘要:Two positive integers are said to be relatively prime to each other if the Great Common Divisor (GCD) is 1. For instance, 1, 3, 5, 7, 9...are all rela
阅读全文
posted @
2017-08-04 15:10
zhber
阅读(182)
推荐(0)
[暑假集训--数论]poj1061 青蛙的约会
摘要:Description 两只青蛙在网上相识了,它们聊得很开心,于是觉得很有必要见一面。它们很高兴地发现它们住在同一条纬度线上,于是它们约定各自朝西跳,直到碰面为止。可是它们出发之前忘记了一件很重要的事情,既没有问清楚对方的特征,也没有约定见面的具体位置。不过青蛙们都是很乐观的,它们觉得只要一直朝着某
阅读全文
posted @
2017-08-04 14:54
zhber
阅读(163)
推荐(1)
[暑假集训--数论]poj2657 Comfort
摘要:Description A game-board consists of N fields placed around a circle. Fields are successively numbered from1 to N clockwise. In some fields there may
阅读全文
posted @
2017-08-04 14:09
zhber
阅读(148)
推荐(0)
cf85D Sum of Medians
摘要:In one well-known algorithm of finding the k-th order statistics we should divide all elements into groups of five consecutive elements and find the m
阅读全文
posted @
2017-08-04 14:01
zhber
阅读(283)
推荐(0)
cf496D Tennis Game
摘要:Petya and Gena love playing table tennis. A single match is played according to the following rules: a match consists of multiple sets, each set consi
阅读全文
posted @
2017-08-04 13:34
zhber
阅读(244)
推荐(0)
cf524C The Art of Dealing with ATM
摘要:ATMs of a well-known bank of a small country are arranged so that they can not give any amount of money requested by the user. Due to the limited size
阅读全文
posted @
2017-08-04 13:21
zhber
阅读(307)
推荐(0)
cf359D Pair of Numbers
摘要:Simon has an array a1, a2, ..., an, consisting of n positive integers. Today Simon asked you to find a pair of integers l, r (1 ≤ l ≤ r ≤ n), such tha
阅读全文
posted @
2017-08-04 13:09
zhber
阅读(242)
推荐(0)
cf671B Robin Hood
摘要:We all know the impressive story of Robin Hood. Robin Hood uses his archery skills and his wits to steal the money from rich, and return it to the poo
阅读全文
posted @
2017-08-04 13:02
zhber
阅读(833)
推荐(0)
[暑假集训--数位dp]hdu5787 K-wolf Number
摘要:Alice thinks an integer x is a K-wolf number, if every K adjacent digits in decimal representation of x is pairwised different. Given (L,R,K), please
阅读全文
posted @
2017-08-04 12:57
zhber
阅读(244)
推荐(0)
[暑假集训--数位dp]UESTC250 windy数
摘要:windy定义了一种windy数。 不含前导零且相邻两个数字之差至少为22 的正整数被称为windy数。 windy想知道,在AA 和BB 之间,包括AA 和BB ,总共有多少个windy数? Input 包含两个整数,AA BB 。 满足 1≤A≤B≤20000000001≤A≤B≤2000000
阅读全文
posted @
2017-08-04 12:54
zhber
阅读(196)
推荐(0)
[暑假集训--数位dp]LightOj1205 Palindromic Numbers
摘要:A palindromic number or numeral palindrome is a 'symmetrical' number like 16461 that remains the same when its digits are reversed. In this problem yo
阅读全文
posted @
2017-08-04 12:51
zhber
阅读(267)
推荐(0)
[暑假集训--数位dp]LightOJ1140 How Many Zeroes?
摘要:Jimmy writes down the decimal representations of all natural numbers between and including m and n, (m ≤ n). How many zeroes will he write down? Input
阅读全文
posted @
2017-08-04 12:47
zhber
阅读(216)
推荐(1)
[暑假集训--数位dp]LightOj1032 Fast Bit Calculations
摘要:A bit is a binary digit, taking a logical value of either 1 or 0 (also referred to as "true" or "false" respectively). And every decimal number has a
阅读全文
posted @
2017-08-04 12:41
zhber
阅读(173)
推荐(0)
[暑假集训--数位dp]hdu5898 odd-even number
摘要:For a number,if the length of continuous odd digits is even and the length of continuous even digits is odd,we call it odd-even number.Now we want to
阅读全文
posted @
2017-08-04 12:35
zhber
阅读(190)
推荐(0)
[暑假集训--数位dp]cf55D Beautiful numbers
摘要:Volodya is an odd boy and his taste is strange as well. It seems to him that a positive integer number is beautiful if and only if it is divisible by
阅读全文
posted @
2017-08-04 12:20
zhber
阅读(185)
推荐(0)
[暑假集训--数位dp]hdu3709 Balanced Number
摘要:A balanced number is a non-negative integer that can be balanced if a pivot is placed at some digit. More specifically, imagine each digit as a box wi
阅读全文
posted @
2017-08-04 11:29
zhber
阅读(258)
推荐(0)
[暑假集训--数位dp]hdu3555 Bomb
摘要:The counter-terrorists found a time bomb in the dust. But this time the terrorists improve on the time bomb. The number sequence of the time bomb coun
阅读全文
posted @
2017-08-04 11:21
zhber
阅读(149)
推荐(0)
[暑假集训--数位dp]hdu3652 B-number
摘要:A wqb-number, or B-number for short, is a non-negative integer whose decimal form contains the sub- string "13" and can be divided by 13. For example,
阅读全文
posted @
2017-08-04 11:18
zhber
阅读(409)
推荐(0)
[暑假集训--数位dp]hdu2089 不要62
摘要:杭州人称那些傻乎乎粘嗒嗒的人为62(音:laoer)。杭州交通管理局经常会扩充一些的士车牌照,新近出来一个好消息,以后上牌照,不再含有不吉利的数字了,这样一来,就可以消除个别的士司机和乘客的心理障碍,更安全地服务大众。不吉利的数字为所有含有4或62的号码。例如:62315 73418 88914都属
阅读全文
posted @
2017-08-04 11:14
zhber
阅读(151)
推荐(0)
cf711E ZS and The Birthday Paradox
摘要:ZS the Coder has recently found an interesting concept called the Birthday Paradox. It states that given a random set of 23 people, there is around 50
阅读全文
posted @
2017-08-04 11:10
zhber
阅读(274)
推荐(0)
Spoj-NETADMIN Smart Network Administrator
摘要:The citizens of a small village are tired of being the only inhabitants around without a connection to the Internet. After nominating the future netwo
阅读全文
posted @
2017-08-04 10:57
zhber
阅读(165)
推荐(0)
cf449C Jzzhu and Apples
摘要:Jzzhu has picked n apples from his big apple tree. All the apples are numbered from 1 to n. Now he wants to sell them to an apple store. Jzzhu will pa
阅读全文
posted @
2017-08-04 10:47
zhber
阅读(244)
推荐(0)
cf287E Main Sequence
摘要:As you know, Vova has recently become a new shaman in the city of Ultima Thule. So, he has received the shaman knowledge about the correct bracket seq
阅读全文
posted @
2017-08-04 10:41
zhber
阅读(218)
推荐(0)
cf725F Family Photos
摘要:Alice and Bonnie are sisters, but they don't like each other very much. So when some old family photos were found in the attic, they started to argue
阅读全文
posted @
2017-08-04 10:30
zhber
阅读(319)
推荐(0)
cf493E Vasya and Polynomial
摘要:Vasya is studying in the last class of school and soon he will take exams. He decided to study polynomials. Polynomial is a function P(x) = a0 + a1x1
阅读全文
posted @
2017-08-04 10:06
zhber
阅读(296)
推荐(0)
cf396B On Sum of Fractions
摘要:Let's assume that v(n) is the largest prime number, that does not exceed n; u(n) is the smallest prime number strictly greater than n. Find . Let's as
阅读全文
posted @
2017-08-04 09:52
zhber
阅读(349)
推荐(0)
cf287D Shifting
摘要:John Doe has found the beautiful permutation formula. Let's take permutation p = p1, p2, ..., pn. Let's define transformation f of this permutation: w
阅读全文
posted @
2017-08-04 09:43
zhber
阅读(274)
推荐(0)