The practice must be DFS, but it is best to do some processing before DFS. Calculate the numbers that can be entered for all unknown points. Each number is called a candidate, and the number of candidates for each unknown point is called the number
/* LCS */# include # include # define max (a, B) (a)> (B )? (A) :( B) int N; char S1 [2010], S2 [2010]; int Fen [2010], d [2010] [2010]; int main () {int I, j, len1, len2; while (scanf ("% d", & N )! =-1) {getchar (); gets (S1); for (I = 0; I len1
Source: http://poj.org/problem? Id = 1389
Give some rectangles to calculate the area of these rectangles. A rectangle is the coordinates in the lower left corner and lower right corner. It is a positive integer.
Idea: a simple line segment tree
Source: http://poj.org/problem? Id = 3737
Question: give you a cone, the area of the cone, and ask you what the maximum volume of the cone is.
Idea: enumerate the radius of the bottom circle to calculate the volume of the cone. The expression
Dxut programming guide(Translated from DirectX SDK document)Dxut is a layer built on the direct3d API. It is used in most direct3d guides and instances. It aims to make direct3d examples, samples, tools, and professional games more robust and easy
In win7, the automatic wallpaper replacement function is integrated. In other words, one day I downloaded a wallpaper package from verycd, and more than 1000 of them were game wallpapers, which were directly set to automatic replacement. Many
I want to use the stack for a long time. If I want to think about it for a long time, I just want to simulate it ........
# Include # include int N; int A [40]; void p_to_w () {int I; Int J; for (I = 0; I
Stone scissors cloth 1
Timelimit: 1 second memorylimit: 32Megabyte
Totalsubmit: 73 accepted: 30
Description
After winter vacation, X is bored at home. So he came up with a new stone scissors cloth (single-host ).
The method is as follows: S
The question is to give a bunch of wooden sticks, each of which has two endpoints painted with color, ask whether the pile of wooden sticks can be connected to each other to form a big wooden stick, the conditions of the connection is: if two sticks
The question is so lonely. Of course, the question is more lonely. This kind of question should be done less .........
# Include # include int color [101] [101]; void paint (int x, int y, int L, int paint_color) {int I; Int J; for (I = X; I
This question has been tangled for a whole day. At the beginning, I had no idea how to create a graph. after a long time of tangle, I read the discussion area ,, finally, I understood how to build a graph. Next, I went to WR, and wR for a long time.
The most basic question, always merge and merge... The number of the final number set is enough.
# Include int n, m; int set [50001]; int OCC [50001]; int find (int I) {Int J = I; while (I! = Set [I]) {I = set [I];} set [J] = I; return I;} void
The source code and comments are as follows, which is much better than the memory syntax! I personally think that the auto_ptr class is not designed, for example, it cannot be passed as a parameter (it is useless after passing the parameter), and it
After doing this for an afternoon, it was almost a crash. Key points:
1. Pay attention to the special situation of 'W'. When you reach a certain position, pay attention to the situation of 'W' on the left and right.
2. You have to see the circular
It may take a day to create a template .... I admire myself too much .... Root Initialization is not complete ..
# Include # include # include # include # define Val 10005 using namespace STD; struct dictree {int CNT; dictree * fail, * Next [26];
Source: http://poj.org/problem? Id = 2356
Question: There are n numbers, and the sum of some numbers is a multiple of N. If yes, the output is OK. No. The output is 0.
Train of Thought: The concept of Pigeon nest, combining the original questions in
Finally, I encountered a simple question on poj. It's not easy .. Simulation, you can easily water over .. Question:
Tanning Salon
Time limit:1000 ms
Memory limit:10000 K
Total submissions:5582
Accepted:3052
Source: http://acm.fzu.edu.cn/problem.php? PID = 1, 1402
Question: Chinese ~
Idea: it is the template Question of the Chinese surplus theorem. It was originally a question on poj. That question does not require two vehicles to be of different
This question is the subject of the Emy-general competition. It is the same as that of the previous month's competition of OJ. However, we asked OJ to maximize the absolute value. This question only minimizes the absolute value. You can directly use
It was a very simple question that made me wa for n times. I did not expect that the data I provided could be time-consuming, and I was not interested in it. The code was messy and I was too lazy to change it.
T [I]. CuO [J] indicates that the
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