1 idea: enumerate the z range (2-31), then enumerate the value of x 1-> pow (x, z)> = k/2, find the value of y in the last two parts.2 analysis: 1 The formula can tell that the range of z is 2-31, but the range of x and y is not well determined, so
Question: give N people, where 0 is the location of the referee, there is a N-1 of people to ask questions, the referee needs to answer the question, each person has a val, the maximum val that each referee can obtain is K. The problem requires at
Question: There are cities on both sides, arranged from top to bottom. Some cities have roads, and there will be intersections between roads.Idea: First, you can convert a connected city into a point on the plane. For example, if there is a path
There is a tree with some forks on it. Each of the forks has an apple at the beginning. There can be two operations on each fork. If there is an apple at the beginning, there will be no apple, if there is no apple at the beginning, it becomes an
Question: give you some different numbers and find the number of groups that meet the requirements of a Code:[Cpp]# Include # Include # Include Using namespace std; Const int n= 20010;Struct people {Int id, num;} Pp [N];Struct newpeople {Int id, num;
[Cpp]// HDOJ 2999 Stone Game, Why are you always there? Game SG Functions/*N stones are arranged in a row, and each time only f stones are taken away, f is a given set.Q: How can I win a game? Idea: the situation cannot be judged.Assume that there
QuantityTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission (s): 11855 Accepted Submission (s): 4122
Problem DescriptionDefinition of final number: if the sum of all the factors of a positive integer
[Cpp]/*The memory is too large. I didn't want to solve this problem. Later I decided to pass the data.As a result, the memory is too large and the status is compressed,*/ # Include # Include Constint INF = 4100;Int d1 [4096] [16] [64], d2 [4100] [16]
There are some rectangles that have the unit weight. To obtain the maximum weight, the rectangle behind the rectangle will overwrite the rectangle above.
Question: rectangular cutting. This question is suitable for rectangular cutting, with few
[Cpp]// HDOJ 4155 The Game of 31 Game Search/*Question: There are four cards numbered 1, 2, 3, 4, 5, and 6. There are 24 cards in total,After a card is obtained, the total number of cards retrieved cannot exceed 31.The game starts from a given
Original question:DescriptionThe animal kingdom contains three types of animals A, B, and C. The food chains of these three types constitute an interesting ring. A eats B, B eats C, and C eats.There are N animals numbered 1-N. Every animal is one of
Question: place n coins in a circle, numbered 1-n. You can only flip 1-n coins in a row ~ K coins. The winner of the last coin wins.
Idea: Game
1) if k = 1, you can only flip one at a time. an odd number of first-hand wins and an even number of
Question: give you a bunch of coordinate points, and then tell you the connection between them. All sides are bidirectional and the graph is connected. Number of edges, points in all 10 WThen start to ask, each question is all vertices of a polygon
[Cpp]// ZOJ 3396 Conference Call// Obtain the minimum spanning tree of a specific three-point question.// Train of thought: enumeration of any point as a support point. to connect a specific three points, you must go through a common point. Find the
This question is how many different substrings with N length appear in a string, and different characters in the parent string are given.Number of NC.It is definitely time-out to save the sub-string to the set. This question has a solution using
It is also an amazing question. There are two operations. One is to place the stack where one element is located in the stack where the other element is located.Stack. Another operation is to count the number of elements under an element (of course,
[Cpp]// Function template usage// Function template standard does not support parameter default values# Include # Include Using namespace std;Template Void sort (T * a, int n) // sort by normal bubbles{Bool changed;Do{Changed = false;For (int I = 1;
Check the questions and write these questions for the first time.# Pragma comment (linker, "/STACK: 102400000,102400000 ")# Include # Include # Include # Include # Include # Include # Include # Include # Include # Include # Include # Include #
/*Set A and B to the bottom triangle matrix, and each of them is n rows and n columns. There is also a two-dimensional array C, which has n rows and n + 1 columns.Design A scheme to store the lower Triangle Area elements in two matrices A and B in
Question:B. Non-square EquationTime limit per test 1 secondMemory limit per test 256 megabytesInput standard inputOutput standard outputLet's consider equation:X2 second + second s (x) · x second-second n second = second 0, second,Where x, random n
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service