随笔分类 -  数论

A - Matrix 字符串 + 数学
摘要:A -MatrixTime Limit:1000MSMemory Limit:262144KB64bit IO Format:%I64d & %I64uSubmitStatusAppoint description:DescriptionYou have a string of decimal digitss. Let's definebij = si·sj. Find in matrixbthe number of such rectangles that the sumbijfor all cells(i, j)that are the elements of t 阅读全文

posted @ 2013-11-26 23:04 keep trying 阅读(316) 评论(0) 推荐(0)

P - Sereja and Contest 数学
摘要:P -Sereja and ContestTime Limit:2000MSMemory Limit:262144KB64bit IO Format:%I64d & %I64uSubmitStatusAppoint description:DescriptionDuring the last Sereja's Codesecrof round the server crashed many times, so the round was decided to be made unrated for some participants.Let's assume thatn 阅读全文

posted @ 2013-11-26 18:59 keep trying 阅读(247) 评论(0) 推荐(0)

A - Pair of Numbers 数论
摘要:A -Pair of NumbersTime Limit:2000MSMemory Limit:262144KB64bit IO Format:%I64d & %I64uSubmitStatusAppoint description:DescriptionSimon has an arraya1, a2, ..., an, consisting ofnpositive integers. Today Simon asked you to find a pair of integersl, r(1 ≤ l ≤ r ≤ n), such that the following conditi 阅读全文

posted @ 2013-11-25 15:08 keep trying 阅读(301) 评论(0) 推荐(0)

K - Magic Five 逆元
摘要:K -Magic FiveTime Limit:1000MSMemory Limit:262144KB64bit IO Format:%I64d & %I64uSubmitStatusAppoint description:DescriptionThere is a long platescontainingndigits. Iahub wants to delete some digits (possibly none, but he is not allowed to delete all the digits) to form his "magic number&quo 阅读全文

posted @ 2013-11-22 15:56 keep trying 阅读(252) 评论(0) 推荐(0)

Parallel and Perpendicular 几何,数学
摘要:Parallel and PerpendicularTime Limit:500MSMemory Limit:65536KB64bit IO Format:%I64d & %I64uSubmitStatusPracticeURAL 1981DescriptionYou are given a regularn-gon. Your task is to calculate two values: the number of its diagonals that are parallel to at least one of its other diagonals, and the num 阅读全文

posted @ 2013-11-15 14:47 keep trying 阅读(248) 评论(0) 推荐(0)

D. Renting Bikes 二分
摘要:D. Renting Bikestime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputA group ofnschoolboys decided to ride bikes. As nobody of them has a bike, the boys need to rent them.The renting site offered themmbikes. The renting price is different for different 阅读全文

posted @ 2013-11-11 21:20 keep trying 阅读(398) 评论(0) 推荐(0)

Maximum Absurdity DP + 数学
摘要:Maximum AbsurdityTime Limit:2000MSMemory Limit:262144KB64bit IO Format:%I64d & %I64uSubmitStatusAppoint description:DescriptionReforms continue entering Berland. For example, during yesterday sitting the Berland Parliament approved as much asnlaws (each law has been assigned a unique number from 阅读全文

posted @ 2013-11-09 18:38 keep trying 阅读(215) 评论(0) 推荐(0)

Alternate Task UVA11728 暴力枚举
摘要:FAlternate TaskInput:Standard InputOutput:Standard OutputLittle Hasan loves to play number games with his friends. One day they were playing a game where one of them will speak out a positive number and the others have to tell the sum of its factors. The first one to say it correctly wins. After a w 阅读全文

posted @ 2013-10-31 20:24 keep trying 阅读(240) 评论(0) 推荐(0)

GCD Extreme (II) 欧拉函数的应用
摘要:Problem JGCD Extreme (II)Input:Standard InputOutput:Standard OutputGiven the value of N, you will have to find the value of G. The definition of G is given below:HereGCD(i,j) means the greatest common divisor of integeriand integer j.For those who have trouble understanding summation notation, the m 阅读全文

posted @ 2013-10-31 20:09 keep trying 阅读(227) 评论(0) 推荐(0)

Yukari's Birthday 枚举+二分 过程注意数据的溢出问题 HDU4430
摘要:Yukari's BirthdayTime Limit: 12000/6000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1993Accepted Submission(s): 404Problem DescriptionToday is Yukari's n-th birthday. Ran and Chen hold a celebration party for her. Now comes the most important part, birthday 阅读全文

posted @ 2013-10-25 20:50 keep trying 阅读(767) 评论(0) 推荐(0)

Dressing HDU 4451简单数学题
摘要:DressingTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1925Accepted Submission(s): 831Problem DescriptionWangpeng has N clothes, M pants and K shoes so theoretically he can have N×M×K different combinations of dressing.One day he wears h 阅读全文

posted @ 2013-10-17 23:03 keep trying 阅读(212) 评论(0) 推荐(0)

Aeroplane chess HDU 4405 概率期望DP
摘要:Aeroplane chessTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 945Accepted Submission(s): 646Problem DescriptionHzz loves aeroplane chess very much. The chess map contains N+1 grids labeled from 0 to N. Hzz starts at grid 0. For each step he throws 阅读全文

posted @ 2013-10-17 19:23 keep trying 阅读(230) 评论(0) 推荐(0)

Crazy Tank HDU 4445 枚举角度 + 几何 + 物理
摘要:Crazy TankTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3578Accepted Submission(s): 637Problem DescriptionCrazy Tank was a famous game about ten years ago. Every child liked it. Time flies, children grow up, but the memory of happy childhood will 阅读全文

posted @ 2013-10-17 17:36 keep trying 阅读(358) 评论(1) 推荐(0)

Candy HDU 4665 概率期望问题
摘要:CandyTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1159Accepted Submission(s): 508Special JudgeProblem DescriptionLazyChild is a lazy child who likes candy very much. Despite being very young, he has two large candy boxes, each contains n candies 阅读全文

posted @ 2013-10-16 19:42 keep trying 阅读(508) 评论(0) 推荐(0)

10025 - The ? 1 ? 2 ? ... ? n = k problem 简单数论
摘要:The ? 1 ? 2 ? ... ? n = k problemThe problemGiven the following formula, one can set operators '+' or '-' instead of each '?', in order to obtain a given k? 1 ? 2 ? ... ? n = kFor example: to obtaink = 12, the expression to be used will be:- 1 + 2 + 3 + 4 + 5 + 6 - 7 = 12with 阅读全文

posted @ 2013-10-15 20:53 keep trying 阅读(217) 评论(0) 推荐(0)

CF DIV 2 206 C. Vasya and Robot
摘要:C. Vasya and Robottime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputVasya hasnitems lying in a line. The items are consecutively numbered by numbers from1tonin such a way that the leftmost item has number1, the rightmost item has numbern. Each item 阅读全文

posted @ 2013-10-14 21:35 keep trying 阅读(396) 评论(0) 推荐(0)

导航