Codeforces round #182 (Div. 2)

// A hasn't done it for a long time, and 5.1 has never turned off the lights in the dormitory. Today, I have only done two things. Weak. # Include # include using namespace STD; int A [200005], B [200005]; int main () {// freopen ("1.txt"," r ",

Poj 3984 BFS

http://poj.org/problem? Id = 3984 # Include # include #include # define Max 0x7f7f7f7fusing namespace STD; int map [6] [6]; int visited [6] [6]; int dir [4] [2] = {}, {-}, {0,-1}, {}; int ans [6] [6]; int pre [30]; struct node {int X; int y ;};

Zoj 2913 BFS

// Zoj 2913 BFS // traverses BFS from each region on each line, // calculates the maximum value of the shortest distance between each region and other regions on each line, find the minimum value among all the maximum values. # Include # include #

Poj 1423 big number // mathematics, factorial

Go directlyCode, Click here for more information. # Include # include # define PI 3.141582626535 # define e 2.718281828459 using namespace STD; int main () {int n, m; CIN >>> N; while (n --) {CIN> m; int ans; ans = int (M * log10 (M/E) + log10 (2

Poj 1151 (line segment tree + scan + geometric calculation)

# Include #include # include using namespace STD; struct node {int St, Ed, C; double m;} st [802]; struct line {Double X, Y1, Y2; bool s;} line [205]; Double Y [205], Ty [205]; void build (INT root, int left, int right) {st [root]. st = left; ST

Codeforces round #172 (280a)-rectangle puzzle

Keep W small h large... keep a It is possible to calculate the number of brute force settings in two cases. It is too troublesome to add a helper line. Program: # Include # include # include # include # include # include #include

Poj1102 LC-Display

Haha... A teammate recommended this question to me. I didn't want to do question a because I was too big to read the English question. However, you only need to check the input and output to understand the general idea of this question. It's so

Usaco spinning wheels

This question is a bit interesting, but it is relatively simple .. Directly PasteCode. Hehe .... /* ID: Guo Geer prog: spinlang: C ++ */# include using namespace STD; int main () {ifstream fin ("spin. in "); ofstream fout (" spin. out "); int

HDU-1501-Zipper

HDU-1501-Zipper Http://acm.hdu.edu.cn/showproblem.php? Pid = 1, 1501 Basic DFS. Note that the status you have searched must be marked, otherwise it will time out. #include#include#includechar str1[205],str2[205],str3[405];int flag;int len1,len2,len3

[HDU4313]-Matrix-tree DP Version idea + solution report + AC code [0.4% achieved]

# Include # include # include # include # include using namespace std;/** Problem: HDU4313-Matrix-DP Version [0.4% achieved] Copyright: belongs to our school training team and myself, which can be reproduced without consent. [However, if you

Poj 1190 search + pruning

Birthday cake Time Limit:1000 MS   Memory Limit:10000 K Total Submissions:12183   Accepted:4302 DescriptionJuly 17 is the birthday of Mr. W, ACM-THU for this to create a volume of N π M-layer birthday cake, each

Search for poj 3083

Children of the Candy Corn Time Limit:1000 MS   Memory Limit:65536 K Total Submissions:8062   Accepted:3529 DescriptionThe cornfield maze is a popular Halloween treat. visitors are shown the entrance and must

10557-xy.pdf // search

Question:Your initial blood volume is 100. The blood volume in each room may be negative and may be positive. If your blood volume is not greater than 0 or you cannot run to the last room, you will lose. Otherwise, you will win. Analysis:Each room

Poj 3104 (Binary)

Drying Time Limit:2000 MS   Memory Limit:65536 K Total Submissions:7104   Accepted:1823 Description It is very hard to wash and especially to dry clothes in winter. but Jane is a very smart girl. she is not afraid

Poj 2255-Tree Recovery // Binary Tree, recursion

The idea of this question is very simple, but it is difficult to write recursion! The idea of recursion is weak. Each time, the first and middle orders are divided into two parts: the left subtree and the right subtree. Recursive until the end!

Question 1498: Search for expressions

/* Question 1498: directly search for expressions for complexity 3 ^ 14 Power */# include int n; int op [20]; bool judge () {int ans; if (op [1] = 0) ans = 0; else ans = 1; int I = 1; int temp; while (I = 10) temp = temp * 100 + I; elsetemp = temp

Poj 1190 birthday cake // backtracking, reducing branches

First, calculate the area and volume without π. In fact, the code that does not remove branches is still very easy to write: // M indicates the number of layers of the cake. // v indicates the size of the currently coated. // s indicates the size of

POJ-1556 & ZOJ-1721 keep feeling...

Enumerate each vertex ~~ Determine whether the distance between two straight lines is partitioned by line segments (two difference multiplication judgments)... and then Floyd will be O... to keep the feeling completely ~~ But it's also very annoying.

Ural 1558-Periodical Numbers...

Question: (Abc) represents the infinite loop of abc .... question (a1a2a3 ....) + (b1b2b3 ...) the value is .. (...) ** format (the previous is cyclical ..) Question I think a little more about this exercise. The sum of the two violent questions is

POJ 2449 A * K Short Circuit

A long time ago, I wanted to do K short circuit. It's just a tough little dish ~. First, let's talk about A * algorithm. As we all know, the * algorithm is A heuristic search in the basic form: f (x) = g (x) + h (x); Where f (x) represents the total

Total Pages: 64722 1 .... 64506 64507 64508 64509 64510 .... 64722 Go to: GO

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.