
ACM_数学
知足--常乐
这个作者很懒,什么都没留下…
展开
-
HDU-1465 不容易系列之一
Problem Description 大家常常感慨,要做好一件事情真的不容易,确实,失败比成功容易多了! 做好“一件”事情尚且不易,若想永远成功而总从不失败,那更是难上加难了,就像花钱总是比挣钱容易的道理一样。 话虽这样说,我还是要告诉大家,要想失败到一定程度也是不容易的。比如,我高中的时候,就有一个神奇的女生,在英语考试的时候,竟然把40个单项选择题全部做错了!大家都学过概率论,应该知道出原创 2017-07-21 16:55:12 · 292 阅读 · 0 评论 -
HDU 6127-Hard challenge(计算几何)
address: http://acm.hdu.edu.cn/showproblem.php?pid=6127Problem Description There are n points on the plane, and the ith points has a value vali, and its coordinate is (xi,yi). It is guaranteed that no原创 2017-08-19 11:45:51 · 629 阅读 · 0 评论 -
HDU 2017多校联赛-Is Derek lying?
Problem Description Derek and Alfia are good friends.Derek is Chinese,and Alfia is Austrian.This summer holiday,they both participate in the summer camp of Borussia Dortmund.During the summer camp,the原创 2017-07-28 17:15:17 · 306 阅读 · 0 评论 -
HDU 2017多校联赛-Regular polygon
Problem Description On a two-dimensional plane, give you n integer points. Your task is to figure out how many different regular polygon these points can make.Input The input file consists of several原创 2017-07-28 17:02:46 · 963 阅读 · 0 评论 -
HDU 6130-Kolakoski(Kolakoski序列)
address :http://acm.hdu.edu.cn/showproblem.php?pid=6130Problem Description This is Kolakosiki sequence: 1,2,2,1,1,2,1,2,2,1,2,2,1,1,2,1,1,2,2,1……. This sequence consists of 1 and 2, and its first term原创 2017-08-16 08:16:49 · 2112 阅读 · 0 评论 -
HDU 6124-Euler theorem
addresss:http://acm.hdu.edu.cn/showproblem.php?pid=6124Problem Description HazelFan is given two positive integers a,b, and he wants to calculate amodb. But now he forgets the value of b and only reme原创 2017-08-16 08:14:10 · 481 阅读 · 0 评论 -
HDU 5924-Mr. Frog’s Problem
One day, you, a clever boy, feel bored in your math class, and then fall asleep without your control. In your dream, you meet Mr. Frog, an elder man. He has a problem for you. He gives you two positive原创 2017-09-14 21:13:20 · 342 阅读 · 0 评论 -
2017 ACM-ICPC 亚洲区(乌鲁木齐赛区)网络赛-A. Banana
Bananas are the favoured food of monkeys.In the forest, there is a Banana Company that provides bananas from different places.The company has two lists.The first list records the types of bananas prefe原创 2017-09-09 13:45:37 · 7777 阅读 · 2 评论 -
2017 ACM-ICPC 亚洲区(乌鲁木齐赛区)网络赛C. Coconut
Coconut is Captain Gangplank’s favourite fruit. That is why he needs to drink coconut juice from bb coconuts each day.On his next trip, he would pass through NN citis.His trip would begin in the 11-st原创 2017-09-09 13:47:15 · 1010 阅读 · 0 评论 -
HDU-1798 Tell me the area(数学)
Tell me the areaTime Limit: 3000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 3183 Accepted Submission(s): 1034Problem Description There are two circ原创 2017-11-06 20:17:13 · 239 阅读 · 0 评论 -
HDU 1719 Friend(规律)
Problem Description Friend number are defined recursively as follows. (1) numbers 1 and 2 are friend number; (2) if a and b are friend numbers, so is ab+a+b; (3) only the numbers defined in (1) and原创 2017-11-19 19:31:54 · 269 阅读 · 0 评论 -
HDU 2600 War
WarTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 3358 Accepted Submission(s): 1203Problem Description War is the reciprical an...原创 2018-03-07 20:51:52 · 314 阅读 · 0 评论 -
问题 1443: [蓝桥杯][历届试题]数字游戏
题目描述 栋栋正在和同学们玩一个数字游戏。 游戏的规则是这样的:栋栋和同学们一共n个人围坐在一圈。栋栋首先说出数字1。接下来,坐在栋栋左手边的同学要说下一个数字2。再下面的一个同学要从上一个同学说的数字往下数两个数说出来,也就是说4。下一个同学要往下数三个数,说7。依次类推。 为了使数字不至于太大,栋栋和同学们约定,当在心中数到 k-1 时,下一个数字从0开始数。例如,当k=13时,...原创 2018-03-21 17:50:14 · 972 阅读 · 0 评论 -
HDU 1201-18岁生日(字符串)
Problem Description Gardon的18岁生日就要到了,他当然很开心,可是他突然想到一个问题,是不是每个人从出生开始,到达18岁生日时所经过的天数都是一样的呢?似乎并不全都是这样,所以他想请你帮忙计算一下他和他的几个朋友从出生到达18岁生日所经过的总天数,让他好来比较一下。Input 一个数T,后面T行每行有一个日期,格式是YYYY-MM-DD。如我的生日是1988-03-07原创 2017-08-13 10:08:23 · 365 阅读 · 0 评论 -
ZOJ 3497-Mistwald(矩阵快速幂)
address :http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3497In chapter 4 of the game Trails in the Sky SC, Estelle Bright and her friends are crossing Mistwald to meet their final enemy,原创 2017-08-11 19:52:11 · 337 阅读 · 0 评论 -
FZU-2205 据说题目很水
Sunday最近对图论特别感兴趣,什么欧拉回路什么哈密顿回路,又是环又是树。在看完一本书后,他对自己特别有信心,便找到大牛牛犇犇,希望他出一题来考考自己。在遥远的古代东方有N个城市,它们之间可以通过双向的道路相连。任意两个城市由不超过一条道路直接相连,而且没有城市的道路连向自身。但是牛犇犇是个纯情的小伙子,尽管他还没有女朋友,但他还是很讨厌第三者,以至于讨厌三这个数字。所以他希望Sunday能够构造原创 2017-07-22 14:59:19 · 319 阅读 · 0 评论 -
hdu 1575-Tr A(矩阵快速幂)
address : http://acm.hdu.edu.cn/showproblem.php?pid=1575Problem Description A为一个方阵,则Tr A表示A的迹(就是主对角线上各项的和),现要求Tr(A^k)%9973。Input 数据的第一行是一个T,表示有T组数据。 每组数据的第一行有n(2 <= n <= 10)和k(2 <= k < 10^9)两个数据。接下来原创 2017-08-08 20:16:12 · 355 阅读 · 0 评论 -
hdu 6090-Rikka with Graph
address :http://acm.hdu.edu.cn/showproblem.php?pid=6090 Problem Description As we know, Rikka is poor at math. Yuta is worrying about this situation, so he gives Rikka some math tasks to practice. Th原创 2017-08-09 10:09:45 · 317 阅读 · 0 评论 -
hdu 6095-Rikka with Competition
address : http://acm.hdu.edu.cn/showproblem.php?pid=6095 Problem Description As we know, Rikka is poor at math. Yuta is worrying about this situation, so he gives Rikka some math tasks to practice. T原创 2017-08-09 10:11:00 · 380 阅读 · 0 评论 -
HDU 6063-RXD and math
链接:http://acm.hdu.edu.cn/showproblem.php?pid=6063 Problem Description Input There are several test cases, please keep reading until EOF. There are exact 10000 cases. For each test case, there are原创 2017-08-01 19:21:07 · 422 阅读 · 0 评论 -
HDU 2604-Queuing(矩阵快速幂)
address : http://acm.hdu.edu.cn/showproblem.php?pid=2604 Problem Description Queues and Priority Queues are data structures which are known to most computer scientists. The Queue occurs often in our原创 2017-08-09 20:52:00 · 915 阅读 · 0 评论 -
HDU 2017多校联赛-1011 KazaQ's Socks
Problem DescriptionKazaQ wears socks everyday.At the beginning, he has n pairs of socks numbered from 1 to n in his closets. Every morning, he puts on a pair of socks which has the smallest number in t原创 2017-07-25 18:07:53 · 482 阅读 · 0 评论 -
HDU 2017 多校联赛-1001 Add More Zero
Problem DescriptionThere is a youngster known for amateur propositions concerning several mathematical hard problems.Nowadays, he is preparing a thought-provoking problem on a specific type of supercom原创 2017-07-25 17:35:30 · 363 阅读 · 0 评论 -
HDU 6098-Inversion
Problem Description Give an array A, the index starts from 1. Now we want to know Bi=maxi∤jAj , i≥2.Input The first line of the input gives the number of test cases T; T test cases follow. Each cas原创 2017-08-10 15:12:25 · 938 阅读 · 0 评论 -
HDU 6106-Classes
Problem Description The school set up three elective courses, assuming that these courses are A, B, C. N classes of students enrolled in these courses. Now the school wants to count the number of stu原创 2017-08-10 15:16:07 · 296 阅读 · 0 评论 -
hdu 6075-Questionnaire
Problem Description In order to get better results in official ACM/ICPC contests, the team leader comes up with a questionnaire. He asked everyone in the team whether to have more training.Picture fro原创 2017-08-03 15:50:02 · 352 阅读 · 0 评论 -
HDU 1757-A Simple Math Problem(矩阵快速幂)
address : http://acm.hdu.edu.cn/showproblem.php?pid=1757 Problem Description Lele now is thinking about a simple function f(x).If x < 10 f(x) = x. If x >= 10 f(x) = a0 * f(x-1) + a1 * f(x-2) + a2 *原创 2017-08-10 16:39:29 · 328 阅读 · 0 评论 -
问题 1454: [蓝桥杯][历届试题]蚂蚁感冒
题目描述 长100厘米的细长直杆子上有n只蚂蚁。它们的头有的朝左,有的朝右。 每只蚂蚁都只能沿着杆子向前爬,速度是1厘米/秒。 当两只蚂蚁碰面时,它们会同时掉头往相反的方向爬行。 这些蚂蚁中,有1只蚂蚁感冒了。并且在和其它蚂蚁碰面时,会把感冒传染给碰到的蚂蚁。 请你计算,当所有蚂蚁都爬离杆子时,有多少只蚂蚁患上了感冒。 输入 第一行输入一个整数n (1 < n...原创 2018-03-21 18:21:05 · 493 阅读 · 0 评论