07 2015 档案
摘要:#1191 : 小W与网格描述给定一个n*m的网格,左上角(1, 1),右下角(n, m)。小w在(i, j),他会从"上左下右"四个方向中选定两个不同但正交的方向,然后他只能沿着这两个方向走,直到他走出网格。小w想知道有多少种不同的走法。两个走法不同当且仅当所经过的格子的集合不同。输入输入包含多组...
阅读全文
摘要:Max Sum Problem Description Given a sequence a[1],a[2],a[3]......a[n], your job is to calculate the max sum of a sub-sequence. For example, given (6,-
阅读全文
摘要:Buildings Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 1622 Accepted Submission(s): 460 Prob
阅读全文
摘要:SouvenirAccepts: 901Submissions: 2743Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 262144/262144 K (Java/Others)Problem DescriptionToday is the ...
阅读全文
摘要:第一题想当然了,结果被坑。。 有1的肯定能构成所有的其他数,没有1的肯定构不成1 ,这题T T #include <iostream> #include <cstring> #include <cstdio> #include <algorithm> using namespace std; int
阅读全文
摘要:uva12545 Bits Equalizer You are given two non-empty strings S and T of equal lengths. S contains the characters `0', `1' and `?', whereas T contains `
阅读全文
摘要:uva12546. LCM Pair Sum One of your friends desperately needs your help. He is working with a secret agency and doing some encoding stuffs. As the miss
阅读全文
摘要:Problem Description OO has got a array A of size n ,defined a function f(l,r) represent the number of i (l<=i<=r) , that there's no j(l<=j<=r,j<>i) sa
阅读全文
摘要:就是按着DP的思路来做的,结果还是想不到。T_T,行了,别玻璃心了,继续。这道题目是求在一列数里,由两部分子段和组成的最大和。即对于连续整数组成的串 S1、S2,使 S1 + S2 的和最大。题目与求最大子段和有相似之处,可以说是最大子段和的变形。最大子段和: 在一列数里,对于连续整数组成的串S,...
阅读全文
摘要:算法想到了,题目坑太多,数组,含‘0’ #include <cstdio> #include <algorithm> #include <cstring> #include <iostream> #define LL long long const int MAXN = 50100; using n
阅读全文