A note for CIN

# Include using namespace STD; int main () {int A; while (! (CIN> A) {cout Above from http://zhidao.baidu.com/question/58822190 The idea is to input a number and input other characters into the loop. When a is input, an error occurs, because CIN

Class implementation Joseph Ring

# Include using namespace STD; Class lnode {friend class list; public: lnode (): m (0), next (0) {} PRIVATE: int m; int num; lnode * Next;}; Class head {friend class list; public: Head (): Top (0), rear (0) {} PRIVATE: lnode * top; lnode * rear;};

* HDU 2437 DFS

I personally feel like a good question ~~ # Include # include # include # define INF 0x3f3f3fusing namespace STD; const int maxn = 1005; const int maxm = 20005; struct node {int U, v, W ;}; node edge [maxm]; int first [maxn], next [maxm]; int

Poj 2586 Y2K accounting bug

This is an explanation of the topic discussed by poj, which is well written. Thanks to the providers ,,, For every month, if it is profit, then profit is S, and if it is lost, then loss is D. Statistics are made once every five months. A total of

Hdu1757 quick power

# Include # include # include # define max 10 using namespace STD; struct matrix {int num [Max] [Max]; matrix () {memset (Num, 0, sizeof (Num) ;}}; matrix res; matrix A; int m; Matrix Operator * (Matrix & A, Matrix & B) {Matrix T; int I, j, k;

Segment update of the HDU 3577 line segment tree

One thing to consider about this question is that someone sat down at Station B from Station A, and he got off at Station B. He took a to B-1 in the bus range. # Include # include # include using namespace STD; const int maxn = 1000005;

Hdu1575 fast power

# Include # include # include # define max 15 using namespace STD; struct matrix {int num [Max] [Max]; matrix () {memset (Num, 0, sizeof (Num) ;}}; matrix res; matrix A; int N, K; Matrix Operator * (Matrix & A, Matrix & B) {Matrix T; int I, j, k;

Poj 2492 A Bug's Life [and check the determination of the same type of simple application of the set]

A Bug's Life Time limit:10000 ms   Memory limit:65536 K Total submissions:23484   Accepted:7639 Description Background  Extends sor Hopper is researching the sexual behavior of a rare species of bugs. he assumes

PKU 3070 rapid matrix power

Fibonacci Time limit:1000 ms   Memory limit:65536 K Total submissions:6946   Accepted:4908 Description In the Fibonacci integer sequence,F0 = 0,F1 = 1, andFN=FN− 1 +FN−2N≥2. For example, the first ten termsThe

Hdu2157 fast power

How many ways ?? Time Limit: 2000/1000 MS (Java/others) memory limit: 32768/32768 K (Java/Others)Total submission (s): 822 accepted submission (s): 254Problem description spring is approaching. The HDU campus is full of flowers, which are very

HDU 3549 Flow Problem]

Question: http://acm.hdu.edu.cn/showproblem.php? PID = 1, 3549 Flow Problem Time Limit: 5000/5000 MS (Java/others) memory limit: 65535/32768 K (Java/Others)Total submission (s): 5111 accepted submission (s): 2385Problem descriptionnetwork flow is a

Hdu3308 line segment tree interval Merging

~~ #include #include #include #define lson pos>1; }};node tree[MAXN*4];int num[MAXN];inline void pushup(int pos){ tree[pos].msum=max(tree[lson].msum,tree[rson].msum); tree[pos].lsum=tree[lson].lsum; tree[pos].rsum=tree[rson].rsum; if(

Deepen understanding of dynamic binding

#include using namespace std;class base{ public: virtual void fun() { coutsonfun2(); return 0;} Compilation error: Main. cpp: 31: 8: Error: 'class base' has no member named 'sonfun2 C ++ primer version 4 p498: The

Combine the HDU 2871 line segment tree and interval

A very comprehensive question ~ No online segment tree is used for the second test ~~ #include #include #include #include #define lson pos>1; }};node tree[MAXN*4];inline void pushup(int pos){ tree[pos].msum=max(tree[lson].msum,tree[rson].msum)

HDU 1542 line segment tree + scanned line + discretization ~~

Amount of the first line ~~ I have understood it for a long time ~ The idea is basically online ~ #include #include #include #include #include #define lson pos>1; }};node tree[MAXN*4];void pushup(int pos);void build(int l,int r,int pos){ tree[

HDU 1828 line segment tree + scanning line

Rectangular length and ~ #include #include #include #include #define lson pos>1; }};node tree[MAXN*4];void build(int l,int r,int pos){ tree[pos].l=l; tree[pos].r=r; if(l==r) { tree[pos].cover=0; tree[pos].sum=0;

HDU 3265 line segment tree + scanning line

Although it is also a rectangle area and ~ But it gave me a deeper understanding ~~ The original idea is to mark the large rectangle normally. To mark the small rectangle in reverse direction, the following is-1 and the above is 1 ~~ Failed to find

What is impetuous ~

Most people have been in an impetuous status for almost ten years from the age of seventeen to the Age of twenty-seven. If this happens, you can only show one thing: you are normal -- or that sentence: Believe me, you are not alone. The first reason

Hdu3435 fee Flow

A New Graph game Time Limit: 8000/4000 MS (Java/others) memory limit: 32768/32768 K (Java/Others)Total submission (s): 1010 accepted submission (s): 454Problem descriptionan undirected graph is a graph in which the nodes are connected by undirected

HDU 1051 wooden sticks [greedy]

Wooden sticks Problem descriptionthere is a pile of N wooden sticks. the length and weight of each stick are known in advance. the sticks are to be processed by a woodworking machine in one by one fashion. it needs some time, called setup time, for

Total Pages: 64722 1 .... 40850 40851 40852 40853 40854 .... 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.