HDU 1201 18th birthday

Here we are mainly entangled in the leap year. If there is no birthday, it must be the February 29 of the leap year, right? If it is a leap year this year or 18 years later, we should consider whether it was before or after February 29. # Include

HDU 2079 course selection time (subject modified, pay attention to read questions) Master function | multiple backpacks

I did this today to know that the original prototype of the primary function does not start with the second bracket, but is optimized, except for 1 ^ N, 2 ^ n can start from 2 and start from 1. Okay, go to the code. #includeint n,k,m1[450],m2[450],t,

Poj 3041 Hungarian algorithm minimum vertex coverage

Question: A matrix of N * n. Each lattice has some planets. It has a special weapon that can destroy one row or one column at a time and ask the minimum number of such weapons used to destroy all the planets. Diagram: At the beginning, we thought

Minimum possible short circuit of poj 1062

The first Chinese Question of poj. At the beginning, the algorithm was wrong. Algorithm with the initial error: 1. Create a Graph Based on the question 2. Floyd evaluate the passing closure. 3. Calculate the dijsktra algorithm once starting from 1

HDU 3081 marriage match II

Sample input14 5 21 12 33 24 41 42 3 combined with the input data to explain the meaning, 1 is a group of input data, 4 indicates there are 2*4 people, Girls numbered 1-4, the boys' numbers are also 1-4, 5, indicating that there is no quarrel

Alice's chance poj 1698

At the beginning, I made a diagram like this.1. The number of days from the source point to 1-7 days is the maximum number of weeks.2. Connect the Time of the corresponding movie presentation every day, with the size of its week3. Aggregate all the

Fighting for HDU

Fighting for HDU Time Limit: 3000/1000 MS (Java/others) memory limit: 32768/32768 K (Java/Others)Total submission (s): 3100 accepted submission (s): 1577Problem description In the last time, we asked you to guess the shape of the Haidong group's

HDU 1012 U calculate E

U calculate E Time Limit: 2000/1000 MS (Java/others) memory limit: 65536/32768 K (Java/Others)Total submission (s): 13241 accepted submission (s): 5725Problem descriptiona simple mathematical formula for e is WhereN is allowed to go to infinity.

Calculate S (n) HDU 2114

Calculate S (n) Time Limit: 10000/1000 MS (Java/others) memory limit: 32768/32768 K (Java/Others)Total submission (s): 3451 accepted submission (s): 1335Problem description Calculate S (n ). S (n) = 13 + 23 + 33 +... + N3.Input Each line will

Number of workers contest 4

1565: Number of workers Time Limit: 1 sec memory limit: 128 MBSubmit: 22 solved: 13[Submit] [Status] [web board] Description defines a class of integers named k-omitted-square-number (K-OSN). If number N is a K-OSN, the following conditions

List of line segments of the enemy army deployment Array

#include#includeint c[60000];struct node{struct node *rchild,*lchild;int right,left,val;};int creat_tree( int l,int r,struct node *q){int mid;struct node *q1,*q2; q1=new node,q2=new node; q->lchild=q1,q->rchild=q2; q->left=l;

Map erase clear

# Include # Include # Include # Include # Include Using namespace STD;Int main (){Map MP;MP [1] = "ABC ";MP [2] = "BCD ";MP [3] = "EFG ";Map :: iterator ITER;Iter = mp. Find (1 );// Clear and delete data// MP. Erase (MP. Begin (), MP. End ());MP.

Dating with girls

Use binary search .. # Include # Include # Include # Include # Include Using namespace STD;Int A [100010], visit [100010];// BinaryInt find (int l, int R, int V){Int mid;While (L {// Printf ("****");Mid = (L + r)/2;If (A [Mid] = V)Return mid;Else if

Dictionary tree statistical difficulties

#include #include #include #define MAX 26struct Trie { Trie *next[MAX];int v;};Trie *root;void creattrie(char *str){ Trie *p, *q;int t, len, i, j; p = root; len = strlen(str);for (i = 0; i t = str[i] - 'a';if(p->next[t] == NULL) {

Number Theory and remainder China Remainder Theorem

1. Same definition: Set two integers a, B, positive integer m, M | A-B, that is, M * c = K (a-B), it is said that M of the model is the same as B, or a is the same as B m, and a = B (mod m) is recorded ). 2. homogeneous nature: 1) Self-defense 2)

Efficient prime number Filtering Algorithm

It takes about 1000 ms to use the ordinary screening method, which is 0000 million. #include #include #include char dp[10000010];const int inf = 10000001;int t = sqrt(inf);inline void prime ( ){int i, j, k = 0,p; dp[1] = -1;for (i = 2; i if(

A strange lift

Search: Haha. I used STL... to get lazy .. Too lazy to write queues .. #include#include#include#include#includeusing namespace std;dequeq;int floor,N,M,A[300];int mark[300];int dp[300];int main( ){ int i,j,x; while(scanf("%d",&floor),floor) {

Suffix Array application 3: Number of substrings

View code # Include # include # include # include # include # include # include # include # include # include using namespace STD; # define maxn 10010int SA [maxn], rank [maxn], sum [maxn], height [maxn]; int wa [maxn], WB [maxn], wx

Apply the suffix array to 1: Obtain the longest common substring

After one day, the Code has not been tested, and the test data has passed .. Algorithm: 1. Multiply Algorithm for SA, rank array, time complexity O (nlgn ). 2. Calculate the height array for O (n) time complexity .. 3. rmq, preprocessing, time

HDU 1002 A + B Problem II Large Number Addition

After the test data is passed, the tragedy is wrong answer. Let's take a closer look at the question. The array is opened and then submitted. Let's continue with my tragedy, presentation error, and look at the question, it turns out that "\ n" is

Total Pages: 64722 1 .... 27725 27726 27727 27728 27729 .... 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.