
----枚举
文章平均质量分 76
_Occult_
物語が始まった
展开
-
CSU 1803 2016
Description 给出正整数 n 和 m,统计满足以下条件的正整数对 (a,b) 的数量:1. 1≤a≤n,1≤b≤m;2. a×b 是 2016 的倍数。Input输入包含不超过 30 组数据。每组数据包含两个整数 n,m原创 2016-09-03 21:48:25 · 511 阅读 · 0 评论 -
UESTC 1272 Final Pan's prime numbers
DescriptionFinal Pan likes prime numbers very much.One day, he want to find the super prime numbers.A prime numbers n(n>4) is a super prime number only if n-4 and n+4 are both prime number原创 2016-02-02 17:44:06 · 955 阅读 · 0 评论 -
HDU 5563 Clarke and five-pointed star
Problem DescriptionClarke is a patient with multiple personality disorder. One day, Clarke turned into a learner of geometric.When he did a research with polygons, he found he has to judge if th原创 2015-11-29 22:59:44 · 462 阅读 · 0 评论 -
HDU 5590 ZYB's Biology
Problem DescriptionAfter getting 600600 scores in NOIPNOIP ZYB(ZJ-267)ZYB(ZJ−267) begins to work with biological questions.Now he give you a simple biological questions: he gives you a DNADNAs原创 2015-12-11 17:40:09 · 617 阅读 · 0 评论 -
HDU 5402 Travelling Salesman Problem
Problem DescriptionTeacher Mai is in a maze with n rows and m columns. There is a non-negative number in each cell. Teacher Mai wants to walk from the top left corner (1,1) to the bottom rig原创 2015-08-18 17:13:20 · 894 阅读 · 0 评论 -
POJ 2231 Moo Volume
DescriptionFarmer John has received a noise complaint from his neighbor, Farmer Bob, stating that his cows are making too much noise. FJ's N cows (1 <= N <= 10,000) all graze at various loca原创 2015-08-01 23:12:24 · 619 阅读 · 0 评论 -
HDU 2715 Herd Sums
DescriptionThe cows in farmer John's herd are numbered and branded with consecutive integers from 1 to N (1 Farmer John, who majored in mathematics in college and loves numbers, often looks原创 2015-08-01 23:09:19 · 546 阅读 · 0 评论 -
POJ 2977 Box walking
DescriptionYou are given a three-dimensional box of integral dimensions lx × ly × lz The edges of the box are axis-aligned, and one corner of the box is located at position (0, 0, 0). Given th原创 2015-07-18 21:51:42 · 773 阅读 · 0 评论 -
CSU 1650 影魔大战
Description Bob讨厌复杂的数学运算.看到练习册上的算术题,Bob很是头痛.为了完成作业,Bob想要你帮忙写一个文本版的四则运算计算器.这个计算器的功能需求十分简单,只要可以处理加减乘除和括号就可以了.你能够帮助Bob吗?Input每个样例一行,输入一个长度小于1500的包含有'(',')','+','-','*','/',和原创 2015-07-18 21:18:19 · 561 阅读 · 0 评论 -
HDU 5280 Senior's Array
Problem DescriptionOne day, Xuejiejie gets an array A. Among all non-empty intervals of A, she wants to find the most beautiful one. She defines the beauty as the sum of the interval. The beau原创 2015-07-18 23:39:40 · 412 阅读 · 0 评论 -
HDU 5365 Run
Problem DescriptionAFA is a girl who like runing.Today,he download an app about runing .The app can record the trace of her runing.AFA will start runing in the park.There are many chairs in the pa原创 2015-08-09 15:40:33 · 340 阅读 · 0 评论 -
FZU 1003 Counterfeit Dollar
DescriptionSally Jones has a dozen Voyageur silver dollars. However, only eleven of the coins are true silver dollars; one coin is counterfeit even though its color and size make it indistinguisha原创 2015-08-09 15:16:49 · 1554 阅读 · 0 评论 -
HDU 5358 First One
Problem Descriptionsoda has an integer array a1,a2,…,an. Let S(i,j) be the sum of ai,ai+1,…,aj. Now soda wants to know the value below:∑i=1n∑j=in(⌊log2S(i,j)⌋+1)×(i+j)Note: In this p原创 2015-08-07 15:35:40 · 451 阅读 · 0 评论 -
HDU 1010 Tempter of the Bone
Problem DescriptionThe doggie found a bone in an ancient maze, which fascinated him a lot. However, when he picked it up, the maze began to shake, and the doggie could feel the ground sinking. He原创 2015-02-19 16:47:58 · 550 阅读 · 0 评论 -
UESTC 1273 God Qing's circuital law
DescriptionAs we all know,God Qing is a very powerful ACMer. She very like junior sister apprentice,but in UESTC-ACM team,there is no junior sister apprentice,we can use a mathematical formula to原创 2016-02-02 17:51:23 · 488 阅读 · 0 评论 -
HDU 1017 A Mathematical Curiosity
DescriptionGiven two integers n and m, count the number of pairs of integers (a,b) such that 0 This problem contains multiple test cases! The first line of a multiple input is an integer N原创 2016-02-02 17:54:35 · 421 阅读 · 0 评论 -
HUST 1544 R(N)
DescriptionWe know that some positive integer x can be expressed as x=A^2+B^2(A,B are integers). Take x=10 for example, 10=(-3)^2+1^2.We define R(N) (N is positive) to be the total number of var原创 2016-02-02 17:58:49 · 537 阅读 · 0 评论 -
HDU 2504 又见GCD
Description有三个正整数a,b,c(0Input第一行输入一个n,表示有n组测试数据,接下来的n行,每行输入两个正整数a,b。 Output输出对应的c,每组测试数据占一行。 Sample Input26 212 4Sample Output48没什么好说原创 2016-09-02 13:46:58 · 371 阅读 · 0 评论 -
POJ 1118 Lining Up
Description"How am I ever going to solve this problem?" said the pilot. Indeed, the pilot was not facing an easy task. She had to drop packages at specific points scattered in a dangerous area原创 2016-09-01 18:47:59 · 366 阅读 · 0 评论 -
POJ 3139 Balancing the Scale
DescriptionYou are given a strange scale (see the figure below), and you are wondering how to balance this scale. After several attempts, you have discovered the way to balance it — you need to原创 2016-09-01 18:32:12 · 478 阅读 · 0 评论 -
POJ 1035 Spell checker
DescriptionYou, as a member of a development team for a new spell checking program, are to write a module that will check the correctness of given words using a known dictionary of all correct wor原创 2016-08-30 17:35:57 · 542 阅读 · 0 评论 -
HDU 4403 A very hard Aoshu problem
DescriptionAoshu is very popular among primary school students. It is mathematics, but much harder than ordinary mathematics for primary school students. Teacher Liu is an Aoshu teacher. He just c原创 2016-04-03 15:08:49 · 590 阅读 · 0 评论 -
PAT (Top Level) Practise 1011 Cut Rectangles (35)
1011. Cut Rectangles (35)时间限制150 ms内存限制65536 kB代码长度限制8000 B判题程序Standard作者LIU, RujiaWhen a rectangle is cut by a straight line,原创 2016-03-15 17:17:24 · 1152 阅读 · 0 评论 -
HUST 1376 Random intersection
DescriptionThere are N segments on the plane. You are to find out how many pairs of segments intersect with each other. A pair of segments intersect with each other if and only if they have at lea原创 2016-02-23 17:20:47 · 612 阅读 · 0 评论 -
PAT (Advanced Level) Practise 1059 Prime Factors (25)
1059. Prime Factors (25)时间限制50 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者HE, QinmingGiven any positive integer N, you are suppo原创 2016-03-16 17:14:01 · 362 阅读 · 0 评论 -
PAT (Advanced Level) Practise 1015 Reversible Primes (20)
1015. Reversible Primes (20)时间限制400 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueA reversible prime in any number system原创 2016-03-03 23:33:31 · 492 阅读 · 0 评论 -
FZU 2086 餐厅点餐
DescriptionJack最近喜欢到学校餐厅吃饭,好吃干净还便宜。在学校餐厅,有a种汤,b种饭,c种面条,d种荤菜,e种素菜。为了保证膳食搭配,Jack每顿饭都会点1~2样荤菜,1~2样素菜(不重复)。同时,在Jack心情好的时候,会点一样饭,再配上一种汤。在心情不好的时候,就只吃一种面条。因为经济有限,Jack每次点餐的总价在min~max之间。Jack想知道,总共有多少原创 2016-03-03 18:27:47 · 692 阅读 · 0 评论 -
HDU 5615 Jam's math problem
Problem DescriptionJam has a math problem. He just learned factorization. He is trying to factorize ax^2+bx+cax2+bx+c into the form of pqx^2+(qk+mp)x+km=(px+k)(qx+m)pqx2+(qk+mp)x+km=(px+k)原创 2016-02-02 19:06:38 · 421 阅读 · 0 评论 -
HDU 5615 Jam's math problem
Problem DescriptionJam has a math problem. He just learned factorization. He is trying to factorize ax^2+bx+cax2+bx+c into the form of pqx^2+(qk+mp)x+km=(px+k)(qx+m)pqx2+(qk+mp)x+km=(px+k)原创 2016-02-02 19:02:05 · 372 阅读 · 0 评论 -
HDU 5610 Baby Ming and Weight lifting
Problem DescriptionBaby Ming is fond of weight lifting. He has a barbell pole(the weight of which can be ignored) and two different kinds of barbell disks(the weight of which are respectively aa a原创 2016-02-02 18:56:57 · 388 阅读 · 0 评论 -
HDU 1198 Farm Irrigation
Problem DescriptionBenny has a spacious farm land to irrigate. The farm land is a rectangle, and is divided into a lot of samll squares. Water pipes are placed in these squares. Different square h原创 2015-03-19 23:15:20 · 427 阅读 · 0 评论 -
HDU 5191 Building Blocks
Problem DescriptionAfter enjoying the movie,LeLe went home alone. LeLe decided to build blocks.LeLe has already built n piles. He wants to move some blocks to make W consecutive piles with e原创 2015-03-21 23:33:13 · 541 阅读 · 0 评论 -
UVA 539 The Settlers of Catan
Within Settlers of Catan, the 1995 German game of the year, players attempt to dominate an island by building roads, settlements and cities across its uncharted wilderness.You are employed by a so原创 2015-02-17 14:56:13 · 389 阅读 · 0 评论 -
ZOJ 3710 Friends
Alice lives in the country where people like to make friends. The friendship is bidirectional and if any two person have no less than kfriends in common, they will become friends in several days. Curr原创 2015-02-18 14:50:51 · 440 阅读 · 0 评论 -
UVA 131 The Psychic Poker Player
In 5-card draw poker, a player is dealt a hand of five cards (which may be looked at). The player may then discard between zero and five of his or her cards and have them replaced by the same number o原创 2015-02-17 13:36:54 · 691 阅读 · 0 评论 -
UVA 10344- 23 out of 5
Your task is to write a program that can decide whether you can find an arithmetic expression consisting of five given numbers (1<=i<=5) that will yield the value 23.For this problem we will only原创 2015-02-17 15:00:31 · 418 阅读 · 0 评论 -
UVA 216 Getting in Line
Computer networking requires that the computers in the network be linked.This problem considers a ``linear" network in which the computers are chained together so that each is connected to exa原创 2015-02-17 14:49:36 · 366 阅读 · 0 评论 -
UVA 11205 The broken pedometer
The ProblemA marathon runner uses a pedometer with which he is having problems. In the pedometer the symbols are represented by seven segments (or LEDs):But the pedometer does not work pro原创 2015-02-17 13:27:15 · 560 阅读 · 0 评论 -
UVA 331 Mapping the Swaps
Sorting an array can be done by swapping certain pairs of adjacent entries in the array. This is the fundamental technique used in the well-known bubble sort. If we list the identities of the pairs to原创 2015-02-17 15:13:08 · 380 阅读 · 0 评论 -
UVA 110 Meta-Loopless Sorts
Background Sorting holds an important place in computer science. Analyzing and implementing various sorting algorithms forms an important part of the education of most computer scientists, and sor原创 2015-02-17 14:27:47 · 550 阅读 · 0 评论