09 2018 档案

摘要:UVALive 7066 Intersection Description Matt is a big fan of logo design. Recently he falls in love with logo made up by rings. The following figures ar 阅读全文
posted @ 2018-09-26 20:36 caomp 阅读(188) 评论(0) 推荐(0)
摘要:UVALive 7068 K.Bro Sorting Description Matt’s friend K.Bro is an ACMer. Yesterday, K.Bro learnt an algorithm: Bubble sort. Bubble sort will compare ea 阅读全文
posted @ 2018-09-26 20:03 caomp 阅读(124) 评论(0) 推荐(0)
摘要:HDU 1452 Happy 2004 Problem Description Consider a positive integer X,and let S be the sum of all positive integer divisors of 2004^X. Your job is to 阅读全文
posted @ 2018-09-25 16:14 caomp 阅读(150) 评论(0) 推荐(0)
摘要:HDU 1212 Big Number Problem Description As we know, Big Number is always troublesome. But it's really important in our ACM. And today, your task is to 阅读全文
posted @ 2018-09-24 16:23 caomp 阅读(171) 评论(0) 推荐(0)
摘要:Gym 101666K King of the Waves Description You are organising a king of the hill tournament, the Buenos Aires Paddleboarding Competition (BAPC), with n 阅读全文
posted @ 2018-09-24 12:34 caomp 阅读(338) 评论(1) 推荐(1)
摘要:Gym 101666L Lemonade Trade Description The lunch break just started! Your mother gave you one litre of pink lemonade. You do not like pink lemonade an 阅读全文
posted @ 2018-09-24 10:30 caomp 阅读(413) 评论(0) 推荐(0)
摘要:Gym 101666M Manhattan Mornings Description As a New Yorker you are always very busy. Apart from your long work day you tend to have a very long list o 阅读全文
posted @ 2018-09-23 23:51 caomp 阅读(417) 评论(0) 推荐(0)
摘要:Gym 101666I Irrational Division Description Your family has been blessed with chocolate! A huge piece of chocolate has been given to you and your sist 阅读全文
posted @ 2018-09-23 23:40 caomp 阅读(321) 评论(0) 推荐(0)
摘要:Gym 101666C Collatz Conjecture Description In 1978 AD the great Sir Isaac Newton, whilst proving that P is a strict superset of N P, defined the Beta 阅读全文
posted @ 2018-09-23 23:32 caomp 阅读(309) 评论(0) 推荐(0)
摘要:Gym 101666A Amsterdam Distance Description Your friend from Manhattan is visiting you in Amsterdam. Because she can only stay for a short while, she w 阅读全文
posted @ 2018-09-23 23:09 caomp 阅读(332) 评论(0) 推荐(0)
摘要:ACM/ICPC2018北京网络赛 Hihocoder1831 : 80 Days 描述 80 Days is an interesting game based on Jules Verne's science fiction "Around the World in Eighty Days". 阅读全文
posted @ 2018-09-22 21:18 caomp 阅读(156) 评论(0) 推荐(0)
摘要:ACM/ICPC2018北京网络赛 Hihocoder1830 : Cheat 描述 Cheat is a card game played by four players sitting around a table. They are numbered from 1 to 4 in clockw 阅读全文
posted @ 2018-09-22 20:21 caomp 阅读(642) 评论(3) 推荐(0)
摘要:HDU2177 取(2堆)石子游戏 Problem Description 有两堆石子,数量任意,可以不同。游戏开始由两个人轮流取石子。游戏规定,每次有两种不同的取法,一是可以在任意的一堆中取走任意多的石子;二是可以在两堆中同时取走相同数量的石子。最后把石子全部取完者为胜者。现在给出初始的两堆石子的 阅读全文
posted @ 2018-09-21 00:33 caomp 阅读(285) 评论(0) 推荐(0)
摘要:51Nod 1185 威佐夫游戏 V2 Description 有2堆石子。A B两个人轮流拿,A先拿。每次可以从一堆中取任意个或从2堆中取相同数量的石子,但不可不取。拿到最后1颗石子的人获胜。假设A B都非常聪明,拿石子的过程中不会出现失误。给出2堆石子的数量,问最后谁能赢得比赛。 例如:2堆石子 阅读全文
posted @ 2018-09-20 21:08 caomp 阅读(194) 评论(0) 推荐(0)
摘要:Gym 101667I Slot Machines Description Slot machines are popular game machines in casinos. The slot machine we are considering has six places where a f 阅读全文
posted @ 2018-09-20 10:20 caomp 阅读(693) 评论(0) 推荐(0)
摘要:Gym 101667F Philosopher's Walk Description In Programming Land, there are several pathways called Philosopher’s Walks for philosophers to have a rest. 阅读全文
posted @ 2018-09-20 09:35 caomp 阅读(437) 评论(0) 推荐(0)
摘要:Gym 101667D Happy Number Description Consider the following function ݂ defined for any natural number ݊: ݂ሺ݊ሻ is the number obtained by summing up the 阅读全文
posted @ 2018-09-19 20:29 caomp 阅读(320) 评论(0) 推荐(0)
摘要:Gym 101667C Game Map Description The ICPC World is the most popular RPG game for ACM ICPC contestants, whose objective is to conquer the world. A map 阅读全文
posted @ 2018-09-19 20:22 caomp 阅读(479) 评论(0) 推荐(0)
摘要:HDU1496 Equations Problem Description Consider equations having the following form: a x1^2+b x2^2+c x3^2+d x4^2=0 a, b, c, d are integers from the int 阅读全文
posted @ 2018-09-18 16:11 caomp 阅读(190) 评论(0) 推荐(0)
摘要:Gym101158G Placing Medals on a Binary Tree 题意 一颗完全二叉树,给出n个点,xi的值表示深度为xi的点。问能否在当前状态下使得从根节点到该点的路径中不会遇到其他点。 思路 其实本题的意思就是 1/2,1/4,1/8等等等等,看剩下的点能不能减。然而由于k值 阅读全文
posted @ 2018-09-12 21:46 caomp 阅读(244) 评论(0) 推荐(0)
摘要:Gym101158D Hidden Anagrams 题意 给出两个字符串s1,s2。 找到s1,s2中的子串使得重组之后能够相同,求这个子串的最大长度 思路 暴力+hash,按长度计算所有子串的hash值,利用set维护,再在另一个字符串中按长度进行查找。对结果进行保存 代码 C++ includ 阅读全文
posted @ 2018-09-12 21:09 caomp 阅读(296) 评论(0) 推荐(0)
摘要:Gym101158C Distribution Center 题意 n条传送带,m个机械臂。给出m个机械臂的坐标,问每个库存能接收多少种货物 思路 稍作思考可以得到这样的结论,实际上相邻的传送带一定可以传送,至少可以有两种货物。然后由于对称性,可以维护上下两路的最远距离。如何维护?采取如下策略: + 阅读全文
posted @ 2018-09-12 21:03 caomp 阅读(200) 评论(0) 推荐(0)
摘要:Gym101158A Rearranging a Sequence 题意 n表示n个数,m表示m次操作 每次操作将位于ei位置的数移动到最前端。 思路 一个数组记录操作记录,一个数组记录访问值。从操作数末尾向前推倒,如果遇到未记录的数值,打印并记录。遍历一遍之后,从头向尾输出未被记录的值。 代码 c 阅读全文
posted @ 2018-09-12 20:36 caomp 阅读(167) 评论(0) 推荐(0)
摘要:取(m堆)石子游戏 Problem Description m堆石子,两人轮流取.只能在1堆中取.取完者胜.先取者负输出No.先取者胜输出Yes,然后输出怎样取子.例如5堆 5,7,8,9,10先取者胜,先取者第1次取时可以从有8个的那一堆取走7个剩下1个,也可以从有9个的中那一堆取走9个剩下0个, 阅读全文
posted @ 2018-09-11 19:35 caomp 阅读(178) 评论(0) 推荐(0)
摘要:悼念512汶川大地震遇难同胞——选拔志愿者 Problem Description 对于四川同胞遭受的灾难,全国人民纷纷伸出援助之手,几乎每个省市都派出了大量的救援人员,这其中包括抢险救灾的武警部队,治疗和防疫的医护人员,以及进行心理疏导的心理学专家。根据要求,我校也有一个奔赴灾区救灾的名额,由于广 阅读全文
posted @ 2018-09-11 19:18 caomp 阅读(116) 评论(0) 推荐(0)
摘要:Euclid's Game Problem Description Two players, Stan and Ollie, play, starting with two natural numbers. Stan, the first player, subtracts any positive 阅读全文
posted @ 2018-09-11 16:19 caomp 阅读(162) 评论(0) 推荐(0)
摘要:How Many Tables Problem Description Today is Ignatius' birthday. He invites a lot of friends. Now it's dinner time. Ignatius wants to know how many ta 阅读全文
posted @ 2018-09-11 10:06 caomp 阅读(139) 评论(0) 推荐(0)
摘要:Wireless Network | Time Limit: 10000MS | | Memory Limit: 65536K | | | | | | Total Submissions: 38703 | | Accepted: 16044 | Description An earthquake t 阅读全文
posted @ 2018-09-11 09:56 caomp 阅读(123) 评论(0) 推荐(0)
摘要:HDU1944 S Nim Problem Description Arthur and his sister Caroll have been playing a game called Nim for some time now. Nim is played as follows: The st 阅读全文
posted @ 2018-09-07 16:48 caomp 阅读(267) 评论(0) 推荐(0)
摘要:HDU1848 Fibonacci again and again Problem Description 任何一个大学生对菲波那契数列(Fibonacci numbers)应该都不会陌生,它是这样定义的: F(1)=1; F(2)=2; F(n)=F(n 1)+F(n 2)(n =3); 所以,1 阅读全文
posted @ 2018-09-07 16:31 caomp 阅读(94) 评论(0) 推荐(0)
摘要:UVA12716 GCD XOR Description Given an integer N, find how many pairs (A, B) are there such that: gcd(A, B) = A xor B where 1 ≤ B ≤ A ≤ N. Here gcd(A, 阅读全文
posted @ 2018-09-04 20:21 caomp 阅读(104) 评论(0) 推荐(0)
摘要:UVA10791 Minimum Sum LCM Description LCM (Least Common Multiple) of a set of integers is defined as the minimum number, which is a multiple of all int 阅读全文
posted @ 2018-09-04 17:36 caomp 阅读(220) 评论(0) 推荐(0)
摘要:UVA 10375 Choose and divide Description The binomial coefficient C(m, n) is defined as C(m, n) = m!/((m − n)! n!) Given four natural numbers p, q, r, 阅读全文
posted @ 2018-09-04 16:58 caomp 阅读(136) 评论(0) 推荐(0)
摘要:UVA 12169 Disgruntled Judge Description Once upon a time, there was an NWERC judge with a tendency to create slightly too hard problems. As a result, 阅读全文
posted @ 2018-09-04 16:25 caomp 阅读(199) 评论(0) 推荐(0)
摘要:UVA11582 Colossal Fibonacci Numbers! Description The i’th Fibonacci number f(i) is recursively defined in the following way: • f(0) = 0 and f(1) = 1 • 阅读全文
posted @ 2018-09-04 15:27 caomp 阅读(169) 评论(0) 推荐(0)
摘要:博弈论入门 有一种很有意思的游戏,就是有物体若干堆,可以是火柴棍或是围棋子等等均可。两个人轮流从堆中取物体若干,规定最后取光物体者取胜。这是我国民间很古老的一个游戏,别看这游戏极其简单,却蕴含着深刻的数学原理。下面我们来分析一下要如何才能够取胜。 (一)巴什博奕(Bash Game) 定义: 只有一 阅读全文
posted @ 2018-09-04 09:45 caomp 阅读(1199) 评论(0) 推荐(2)