思路分析:
遗憾不知道矩阵的构造。线段树上比较水的矩阵。。。
M[x] = [1 A[x]]
[1 0 ]
就有
[ F[R] ] = M[R] * M[R-1] * ... * M[L+2] * [F[L+1]]
[F[R-1]] ...
分类:
其他好文 时间:
2014-05-13 08:45:03
阅读次数:
270
题目链接:
http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3768
Continuous Login
Time Limit: 2 Seconds Memory Limit: 131072 KB Special Judge
Pierre is recently obsessed...
分类:
其他好文 时间:
2014-05-13 07:28:07
阅读次数:
412
How Many Sets IITime Limit:2 Seconds Memory
Limit:65536 KBGiven a setS= {1, 2, ...,n}, numbermandp, your job is to count how
many setTsatisfies the fo...
分类:
其他好文 时间:
2014-05-12 13:05:52
阅读次数:
238
链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=151
For each list of words, output a line with each word reversed without changing the order of the words.
This problem contains multi...
分类:
其他好文 时间:
2014-05-11 22:20:43
阅读次数:
443
链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=1109
FatMouse prepared M pounds of cat food, ready to trade with the cats guarding the warehouse containing his favorite food, JavaBean...
分类:
其他好文 时间:
2014-05-11 20:57:36
阅读次数:
400
链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=2724
Message queue is the basic fundamental of windows system. For each process, the system maintains a message queue. If something h...
题意:求在两边人数不相差超过1个的情况下,实力尽量相等的情况
思路:从实力和的一半开始类背包操作
#include
#include
#include
#include
using namespace std;
const int MAXN = 45010;
const int MAXM = 110;
int a[MAXM];
int dp[MAXN][MAXM];
int n;
...
分类:
其他好文 时间:
2014-05-11 05:02:03
阅读次数:
279
题目链接:
http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=729
题目意思:...
分类:
其他好文 时间:
2014-05-11 01:52:41
阅读次数:
367
题目:意思就是判断给定的几条线段是否有相交的。
方法:模版吧,有空在来细细学习。
代码:
#include
#include
using namespace std;
struct Point
{
double x,y;
};
struct LineSeg
{
Point a,b;
};
double Cross(Point a, Point b, Poi...
分类:
其他好文 时间:
2014-05-10 03:39:07
阅读次数:
326
题目链接:
http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=4535
How Many Sets I
Time Limit: 2 Seconds Memory Limit: 65536 KB
Give a set S, |S| = n, then how many ordered set g...
分类:
其他好文 时间:
2014-05-09 13:50:00
阅读次数:
347