// 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 ",
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 ;};
# 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 // 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
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
# 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
/* 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 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) %
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]
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,
# 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
/** 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
# 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
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-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
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
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
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 *
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