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
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,
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
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
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
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
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
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)
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
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
# 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.
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
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)
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(
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) {
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
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
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
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