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 ;};

HDU Flipper (using Stack simulation)

# Include # include # include using namespace STD; int t; stack S [105]; int main () {int flag [105]; // 0-up, 1-down int N, I, j; int PL, PR, P; int ans [105]; int outnum, out [105]; char UD [105]; char Command [105]; t = 1; while (1) {memset

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 #

HDU-1431-prime number

HDU-1431-prime number Http://acm.hdu.edu.cn/showproblem.php? Pid = 1, 1431 The length of the Statistic code is estimated to be a table. First, find all the prime numbers of the input. #include#include#include#define N 100000005char a[N];int num[100

[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

About the loss of pow floating point Precision

/* A very simple question asked me by my dormitory students is to convert the string output after the number is in reverse order to a numerical value. The students use the common function pow, and the code logic is correct, but I don't understand

Fast Power Multiplication

Fast Power Multiplication uses the idea of binary. A ^ B % c. When B is large, it can be decomposed. When B is an even number, a ^ B % c = (a ^ (B/2) * a ^ (B/2) % c; when B is an odd number, a ^ B % c = (a ^ (B/2) * a ^ (B/2) * a) %

Hdu2955-01 backpack

1. Robberies http://acm.hdu.edu.cn/showproblem.php? Pid = 1, 2955The correct equation is: f [j] = max (f [j], f [j-q [I]. money] * q [I]. v) f [j] indicates the maximum probability of escaping from the j ocean. The condition is f [j-q [I]. money]

Minimum Spanning Tree-prim algorithm Template

#include#include#include#includeusing namespace std;#define inf 10000000#define maxn 21int m,n;int edge[maxn][maxn],lowcost[maxn],nearvex[maxn];void prim(int u0){ int i,j; int sumweight=0; for(i=1; i>n>>m; memset(edge,0,sizeof(edge));

11-year Chengdu Network Competition

Today, I made the online competition in Chengdu last year. Last year, it was not a question. Now it is very difficult. I still have a few questions. I will try again later if I have time. Attack Http://acm.hdu.edu.cn/showproblem.php? Pid = 1,

[Poj3320] Jessica's reading problem, problem solving report + Data + code

# Include # include # include # include # include # include # include /* Problem: POJ3320-Jessica's reading problem; Begin Time: 27/2/2012 p. m. end Time: 29/2/2012 :13. m Last Time: 2 Days + Test Data: 11110000061 1 1 1 151 8 8 161 2 3 4 5 651

[ZOJ3471] Most Powerful, idea + source code + Problem Solving report (I haven't written a problem solving report for a long time ......) [Goal achieved: 0.1%]

/** Problem: ZOJ3471-Most Powerful. reference: http://blog.csdn.net/magicnumber/article/details/6182891 Knowledge point: State compression DP Thought: According to artillery positions (that's another question) and this question, there is also a

[HDU4313] Matrix multi-school problem solving report + AC code + ideas + proof of algorithm correctness, This is a greedy and simple version of Kruskal. The disgusting version will be released later [reaching the goal of 0.2%]

# Include # include # include # include using namespace std;/** c0de4fun declaration: I did not provide the test data, and I did not declare an AC question. I wrote it by myself based on the problem solving report. We sincerely salute those

Cf div2 191

A. Flipping Gametime limit per test 1 secondMemory limit per test 256 megabytesInput Standard inputOutput Standard output Iahub got bored, so he has Ted a game to be played on paper. He writesNIntegersA1, bytes,A2, middle..., middle ,...,AN.Each of

Hdu simple calculator (without AC or stack)

#include #include #include int main(){ int num[500]; double in[500]; double ans; char op[500],io[500]; char c; int i,j,k,len; while(1){ memset(in,0,sizeof(in)); memset(io,'\0',sizeof(io));

HDU-1542-Atlantis

HDU-1542-Atlantis Http://acm.hdu.edu.cn/showproblem.php? Pid = 1, 1542 Use the line segment tree to calculate the rectangular area and imitate other people's code to write it. We need to study it well. #include#include#include#include#includeusing

Hdu Max Sum of Max-K-sub-sequence (monotonous Queue)

Max Sum of Max-K-sub-sequenceTime Limit: 2000/1000 ms (Java/Other) Memory Limit: 32768/32768 K (Java/Other) Total Submission (s ): 6 Accepted Submission (s): 4 Font: Times New Roman | Verdana | GeorgiaFont Size: Regular → Problem DescriptionGiven a

Poj A Simple Problem with Integers (lazy line segment tree)

A Simple Problem with IntegersTime Limit: 10000/5000 ms (Java/Other) Memory Limit: 262144/131072 K (Java/Other) Total Submission (s): 40 Accepted Submission (s): 13 Problem Description You haveNIntegers,A1,A2 ,...,AN. You need to deal with two kinds

Hdu Billboard (line segment tree)

Billboard Time Limit: 20000/8000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission (s): 4097 Accepted Submission (s): 1907Problem DescriptionAt the entrance to the university, there is a huge rectangular billboard of size h *

Total Pages: 64722 1 .... 56339 56340 56341 56342 56343 .... 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.