Application of poj 1265 pick theorem, water

# Include # include # include # include struct point {int X, Y;} p [1, 1000]; int gcd (int A, int B) {If (B = 0) return; return gcd (B, A % B);} int onedge (int n, point * P) // Number of grid points on the side of the polygon {int I, ret = 0;

PKU 3348 calculate Geometric Convex Hull area

Pay attention to the output # Include # include # include # include # include using namespace STD; const double EPS = 1e-8; struct point {Double X, Y;} p [20010]; int top; bool cmpxy (point a, point B) {If (FABS (. y-b.y)> EPS) return. Y M &

Poj 2942 round-table samurai

Search for the connected component. In the deep priority search process, a stack is used to store all the nodes that pass through, judge the cut point, mark the node at the top of the current stack when the cut point is reached, and return to the

HDU 4000 tree Array

Fruit Ninja Time Limit: 2000/1000 MS (Java/others) memory limit: 32768/32768 K (Java/Others)Total submission (s): 374 accepted submission (s): 197 Problem descriptionrecently, dolobby is addicted in the Fruit Ninja. as you know, dolobby is a free

Hdu1428 walking Campus (memory-based search)

Walking on campus Time Limit: 2000/1000 MS (Java/others) memory limit: 65536/32768 K (Java/Others)Total submission (s): 1881 accepted submission (s): 538 Problem descriptionll has recently become addicted to AC, with 2.1 million lines per day in

Ultraviolet A 321 the new villa (Search)

The new villa Mr. black recently bought a villa in the countryside. only one thing bothers him: Although there are light switches in most rooms, the lights they control are often in other rooms than the switches themselves. while his estate agent

Maximum stream Template

# Include Using namespace STD;# Define maxn205# Define INF 2110000000# Define min (x, y) (x Int map [maxn] [maxn];Int max_flow (INT num, int map [] [maxn], int source, int sink) // parameter description: number of nodes network Source Vertex

Ultraviolet A 10480-Sabotage (maximum Stream)

Sabotage The regime of a small but wealthy dictatorship has been abruptly overthrown by an unexpected rebellion. because of the enormous disturbances this is causing in world economy, an imperialist military super power has decided to invade the

HDU 3220 haoguang search

Bitwise operations are used to achieve wide search. Each edge is in one direction. View code # Include # Include # Include String . H> Using Namespace STD; Int Steps;Queue Int > Q; Int Vis [ 1 17 ];Int Dir [ 32 ] [ 2 ] = { 0 , 1 , 0 , 2 ,

HDU 3269 simulation questions

View code # Include # Include String . H> Int T, cases, N, K, M, fsize; Int Isver [ 25 ]; Int Speed [ 25 ] [ 25 ]; Int Online [ 25 ] [ 1010 ]; Int Get [ 25 ]; Int Start [ 25 ]; Void Init (){Memset (isver, 0 , Sizeof (Isver ));Memset (online, 0

Poj 2418 binary insert sorting tree

View code # Pragma Warning (Disable: 4786)# Include # Include # Include String ># Include Using Namespace STD; Int Main (){ Char STR [ 50 ]; Double Num = 0 ;Map String , Int > M; While (Gets (STR )! = NULL){M [STR] ++;Num ++;}Map String ,

HDU 2473 and check the delete relationship of the Set

View code # Include # Include String . H> Int N, m; Int P [ 1101000 ]; Int Id [ 1101000 ]; Int Vis [ 1100010 ]; Void Init (){ Int I;Memset (VIS, 0 , Sizeof (VIS )); For (I = 0 ; I {P [I] = I;Id [I] = I;}} Int Find (Int X){ Return X = P [x]? X:

PKU 1509 glass beads

Minimum string representation:   Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> # Include Stdio. h > # Include String . H > Int Min ( Int A, Int B){ If ( B) Return A;

Minimum zju 1729 String Representation

Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> # Include Stdio. h > # Include String. h > Int min (int A, int B){If ( B ) Return;Else return B;}Int main (){Char STR [2, 100001], s [2, 2

Tree-like DP pku1947

In fact, no matter what DP, the essence of the idea is unchanged, around the optimal sub-structure to expand the idea, and finally record the optimal results, so write state transfer, to deal with the boundary problem, is a key means. Status: DP

The DC3 and multiplication methods of luoweiga

For more information, see "suffix array-powerful tool for processing strings" and Xu zhilei's suffix array. AlgorithmAnd Multiplication Multiplier template O (nlgn) View plaincopy to clipboardprint?Int wa [maxn], WB [maxn], WV [maxn], WS [maxn];

Multiple knapsack problems

Question There are n items and a backpack with a capacity of v. A maximum of N [I] items are available for the I-th item. The cost per item is C [I] and the value is W [I]. Solving which items are loaded into a backpack can make the total cost of

Color the ball tree Array

Color the ball Time Limit: 5000 Ms memory limit: 65536 KTotal submit: 126 accepted: 53 Description N balloons are arranged in a row, numbered 1, 2, 3... from left to right .... n. given two integers a B (A Input The first behavior of each

Pku 1459 Max streaming SAP

  Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--># Include # Include # Define msize 205 // maximum number of vertices// # Define INT_MAX 100000000Using namespace std;Int d [msize]; // numberInt r [

Maximum pku 2112 binary answer stream

Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--># Include Using namespace std;# Define maxn250# Define INF 2110000000# Define MIN (x, y) (x Int map [MAXN] [MAXN];Int K, C, M, n;Int s, t;Int dis [MAXN]

Total Pages: 64722 1 .... 54791 54792 54793 54794 54795 .... 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.