随笔分类 - HDU
摘要:1001: 传递要求 a->b->c && a->c 我的做法就是利用bitset预处理出x点可达点集,与可达到x点的点集 那么如何检验这个图是否传递;枚举完b和,枚举可达b点集中的点x,那么点x可达点集要包含c点集,这个利用bieset可以快速判断 整个做法就是(n^2) #include<cst
阅读全文
摘要:Life Winner Bo Problem Description Bo is a "Life Winner".He likes playing chessboard games with his girlfriend G.The size of the chessboard is N×M.The
阅读全文
摘要:Fxx and game Fxx and game 问题描述 青年理论计算机科学家Fxx给的学生设计了一款数字游戏。 一开始你将会得到一个数\:XX,每次游戏将给定两个参数\:k,tk,t, 任意时刻你可以对你的数执行下面两个步骤之一: 1.\:X = X - i(1 <= i <= t)1.X=X
阅读全文
摘要:Chess Problem Description Alice and Bob are playing a special chess game on an n × 20 chessboard. There are several chesses on the chessboard. They ca
阅读全文
摘要:A Simple Nim Problem Description Two players take turns picking candies from n heaps,the player who picks the last one will win the game.On each turn
阅读全文
摘要: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,2,3,5,8,13…
阅读全文
摘要: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 starting p
阅读全文
摘要:Be the Winner Problem Description Let's consider m apples divided into n groups. Each group contains no more than 100 apples, arranged in a line. You
阅读全文
摘要:John Problem Description Little John is playing very funny game with his younger brother. There is one big box filled with M&Ms of different colors. A
阅读全文
摘要:Substring Problem Description ?? is practicing his program skill, and now he is given a string, he has to calculate the total number of its distinct s
阅读全文
摘要:The war Problem Description In the war, the intelligence about the enemy is very important. Now, our troop has mastered the situation of the enemy's w
阅读全文
摘要:Sequence I Problem Description Mr. Frog has two sequences a1,a2,⋯,an and b1,b2,⋯,bm and a number p. He wants to know the number of positions q such th
阅读全文
摘要:Sequence II Problem Description Mr. Frog has an integer sequence of length n, which can be denoted as a1,a2,⋯,an There are m queries.In the i-th query
阅读全文
摘要:Zhu and 772002 Problem Description Zhu and 772002 are both good at math. One day, Zhu wants to test the ability of 772002, so he asks 772002 to solve
阅读全文
摘要:Lanterns Problem Description Alice has received a beautiful present from Bob. The present contains n lanterns and m switches. Each switch controls som
阅读全文
摘要:考研路茫茫——空调教室 Problem Description 众所周知,HDU的考研教室是没有空调的,于是就苦了不少不去图书馆的考研仔们。Lele也是其中一个。而某教室旁边又摆着两个未装上的空调,更是引起人们无限YY。一个炎热的下午,Lele照例在教室睡觉的时候,竟然做起了空调教室的美梦。Lele
阅读全文
摘要:Jewel Problem Description Jimmy wants to make a special necklace for his girlfriend. He bought many beads with various sizes, and no two beads are wit
阅读全文
摘要:odd-even number Problem Description For a number,if the length of continuous odd digits is even and the length of continuous even digits is odd,we cal
阅读全文
摘要:QSC and Master Problem Description Every school has some legends, Northeastern University is the same.Enter from the north gate of Northeastern Univer
阅读全文
摘要:Sparse Graph Problem Description In graph theory, the complement of a graph G is a graph H on the same vertices such that two distinct vertices of H a
阅读全文

浙公网安备 33010602011771号