题意,给出一个n行m列的矩阵
里面元素是0或者1
给出q个询问
a,b,c,d
求(a,b)到(c,d)有多少个由0组成的矩形
我们定义
即为求(a,b)到(c,d)有多少个由0组成的矩形
对一个矩形来说
dp[a][b][c][d]=dp[a][b][c][d-1]+dp[a][b][c-1][d]-dp[a][b][c-1][d-1]+包含右下角(当前点)的矩形;
重...
分类:
其他好文 时间:
2014-08-24 15:29:52
阅读次数:
203
Description
Combinatorics is a branch of mathematics chiefly concerned with counting discrete objects. For instance, how many ways can you pick two people out of a crowd of
n people? Into how many...
分类:
其他好文 时间:
2014-08-23 20:24:01
阅读次数:
317
Description
We are given a rooted tree of n vertices. The vertices are to be labeled with numbers
1, 2,..., n so that each label is unique and the heap condition holds, i.e. the label of any verte...
分类:
其他好文 时间:
2014-08-22 17:53:39
阅读次数:
264
Description
Triangles are polygons with three sides and strictly positive area. Lattice triangles are the triangles all whose vertexes have integer coordinates. In this problem you have to find the...
分类:
其他好文 时间:
2014-08-21 22:56:15
阅读次数:
443
/*Prime Cuts
Description
A prime number is a counting number (1, 2, 3, ...) that is evenly divisible only by 1 and itself. In this problem you are to write a program that will cut some number of pri...
分类:
其他好文 时间:
2014-08-21 17:14:24
阅读次数:
283
1148 - Mad Counting
PDF (English) Statistics Forum
Time Limit: 0.5 second(s) Memory Limit: 32 MB
Mob was hijacked by the mayor of the Town "TruthTown". Mayor wants Mob to count the total population...
分类:
其他好文 时间:
2014-08-21 11:34:55
阅读次数:
261
Kindergarten Counting Game
Everybody sit down in a circle. Ok. Listen to me carefully.
``Woooooo, you scwewy wabbit!''
Now, could someone tell me how many words I just said?
Input and...
分类:
其他好文 时间:
2014-08-20 18:04:02
阅读次数:
205
题目链接:https://icpcarchive.ecs.baylor.edu/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=4613
数学统计...
分类:
其他好文 时间:
2014-08-20 12:35:02
阅读次数:
155
Problem DescriptionThere are a bunch of stones on the beach; Stone color is white or black. Little Sheep has a magic brush, she can change the color o...
分类:
其他好文 时间:
2014-08-20 12:11:22
阅读次数:
209
Boring counting
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768
K (Java/Others)
Problem Description
...
分类:
其他好文 时间:
2014-08-19 10:55:54
阅读次数:
220