| # | Problem | Pass Rate (passed user / total user) |
|---|---|---|
| 1613 | Problem D. Daily Walk |
|
| 10019 | Lining Up |
|
| 10021 | Wavio Sequence |
|
| 10055 | Playing with Wheels |
|
| 10056 | Buy Tickets |
|
| 10057 | Frequent values |
|
| 10059 | Sliding Window |
|
| 10078 | A Simple Problem with Integers |
|
| 10079 | Summits |
|
| 10080 | Maximum Sum |
|
| 10081 | Assembly line |
|
| 10082 | Image Is Everything |
|
| 10083 | Meteor |
|
| 10118 | Steam Roller |
|
| 10119 | Palindromic Subsequence |
|
| 10120 | Jurassic Remains |
|
| 10121 | Roads in the North |
|
| 10122 | Corporative Network |
|
| 10123 | Paper Folding |
|
| 10155 | The Largest Clique |
|
| 10156 | 9 Puzzle |
|
| 10157 | Interstellar Trade |
|
| 10187 | Moving to Nuremberg |
|
| 10188 | Game of Sum |
|
| 10189 | Fabled Rooks |
|
| 10190 | Bishops |
|
| 10214 | Long Distance Taxi |
|
| 10215 | String painter |
|
| 10216 | Asterix and Obelix |
|
| 10217 | Parade |
|
| 10247 | Piece it together |
|
| 10248 | And Then There Was One |
|
| 10249 | Surrounding a house |
|
| 10278 | Plants vs. Zombies HD SP |
|
| 10279 | Period |
|
| 10280 | Number Assignment |
|
Description
Welcome to Summer Rift! Summer Rift is a modern city. Its roads run either north-south or east-west and therefore the whole city looks like a grid table. As a result, every intersection in Summer Rift can be identified by a pair of integer (x, y), 0<=x<=n, 0<=y<=m.
Garen is a Summer Rift citizen and lives at intersection (0, 0). Every day he is going to visit Lux, who is living at intersection (n, m), and fight with her. Garen don't want to waste time, so he needs to follow a shortest route from (0, 0) to (n, m). In other words, if Garen is at intersection (x, y) on his way to Lux's place, he can only go to (x+1, y) or (x, y +1) in the next step. Now Garen wonders that how many routes he can choose.
Oh, that's too easy, right?
Summer Rift is also a dangerous city. There're many rampage enemies that slay, double-kill or triple-kill other citizens. So every day the police will block a rectangle region which is represented as (x1, y1, x2, y2). All intersections (x, y) that satisfy x1<=x <=x2 and y1<=y<=y2 are dangerous this day.
Every day Garen receives the blocked region (x1, y1, x2, y2) of that day before he visits Lux. Now Garen wonders how many routes he can choose to visit Lux without passing through any dangerous intersection during the tour?
Input
The first line of input contains an integer T, the number of test cases in total.
The first line of each test case contains three integers n; m; d, the size of Summer Rift and the number of considered days. Each of following d lines contains four integers (x1, y1, x2, y2) which is the representation of the blocked region of that day.
1<=T<=25
1<=n,m<=2000
1<=d<=2*10^5
0<=x1<=x2<=n, 0<=y1<=y2<=m
Output
Print the number of routes module 10007 for each day, one day per line.
Sample Input Download
Sample Output Download
Tags
Discuss
Description
uva:
http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=206
pdf:
http://uva.onlinejudge.org/external/2/270.pdf
Input
Output
Sample Input Download
Sample Output Download
Tags
Discuss
Description
uva:
http://uva.onlinejudge.org/index.php?option=onlinejudge&page=show_problem&problem=1475
pdf:
http://uva.onlinejudge.org/external/105/10534.pdf
Input
Output
Sample Input Download
Sample Output Download
Tags
Discuss
Description
uva:
http://uva.onlinejudge.org/index.php?option=onlinejudge&page=show_problem&problem=1008
pdf:
http://uva.onlinejudge.org/external/100/10067.pdf
Input
Output
Sample Input Download
Sample Output Download
Tags
Discuss
Description
poj:
http://poj.org/problem?id=2828
Input
Output
Sample Input Download
Sample Output Download
Tags
Discuss
Description
uva:
http://uva.onlinejudge.org/index.php?option=onlinejudge&page=show_problem&problem=2176
Input
Output
Sample Input Download
Sample Output Download
Tags
Discuss
Description
poj:
http://poj.org/problem?id=2823
Input
Output
Sample Input Download
Sample Output Download
Tags
Discuss
Description
poj:
http://poj.org/problem?id=3468
Input
Output
Sample Input Download
Sample Output Download
Tags
Discuss
Description
icpc:
pdf:
https://icpcarchive.ecs.baylor.edu/external/39/3977.pdf
Input
Output
Sample Input Download
Sample Output Download
Tags
Discuss
Description
uva:
http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=44
pdf:
http://uva.onlinejudge.org/external/1/108.pdf
Input
Output
Sample Input Download
Sample Output Download
Tags
Discuss
Description
icpc:
pdf:
https://icpcarchive.ecs.baylor.edu/external/49/4961.pdf
Input
Output
Sample Input Download
Sample Output Download
Tags
Discuss
Description
icpc:
pdf:
https://icpcarchive.ecs.baylor.edu/external/29/2995.pdf
Input
Output
Sample Input Download
Sample Output Download
Tags
Discuss
Description
icpc:
pdf:
https://icpcarchive.ecs.baylor.edu/external/39/3905.pdf
Input
Output
Sample Input Download
Sample Output Download
Tags
Discuss
Description
icpc 4128 Steam Roller:
pdf:
https://icpcarchive.ecs.baylor.edu/external/41/4128.pdf
Input
Output
Sample Input Download
Sample Output Download
Tags
Discuss
Description
uva 11404 Palindromic Subsequence:
http://uva.onlinejudge.org/index.php?option=onlinejudge&page=show_problem&problem=2399
Input
Output
Sample Input Download
Sample Output Download
Tags
Discuss
Description
icpc 2965 Jurassic Remains:
pdf:
https://icpcarchive.ecs.baylor.edu/external/29/2965.pdf
Input
Output
Sample Input Download
Sample Output Download
Tags
Discuss
Description
uva 10308 Roads in the North:
http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=1249
pdf:
http://uva.onlinejudge.org/external/103/10308.pdf
Input
Output
Sample Input Download
Sample Output Download
Tags
Discuss
Description
uva 1329 Corporative Network:
http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=4075
pdf:
http://uva.onlinejudge.org/external/13/1329.pdf
Input
Output
Sample Input Download
Sample Output Download
Tags
Discuss
Description
uva 177 Paper Folding:
http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=113
pdf:
http://uva.onlinejudge.org/external/1/177.pdf
Input
Output
Sample Input Download
Sample Output Download
Tags
Discuss
Description
uva 11324 The Largest Clique
http://uva.onlinejudge.org/index.php?option=onlinejudge&Itemid=8&page=show_problem&problem=2299
Input
Output
Sample Input Download
Sample Output Download
Tags
Discuss
Description
uva 11513 9 Puzzle:
http://uva.onlinejudge.org/index.php?option=onlinejudge&page=show_problem&problem=2508
pdf:
http://uva.onlinejudge.org/external/115/11513.pdf
Input
Output
Sample Input Download
Sample Output Download
Tags
Discuss
Description
icpc 6520 Interstellar Trade
pdf:
https://icpcarchive.ecs.baylor.edu/external/65/6520.pdf
Input
Output
Sample Input Download
Sample Output Download
Tags
Discuss
Description
uva 12223 Moving to Nuremberg:
http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=3375
pdf:
http://uva.onlinejudge.org/external/122/12223.pdf
Input
Output
Sample Input Download
Sample Output Download
Tags
Discuss
Description
uva 10891 Game of Sum:
http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=1832
pdf:
http://uva.onlinejudge.org/external/108/10891.pdf
Input
Output
Sample Input Download
Sample Output Download
Tags
Discuss
Description
uva 11134 Fabled Rooks
http://uva.onlinejudge.org/index.php?option=onlinejudge&page=show_problem&problem=2075
Input
Output
Sample Input Download
Sample Output Download
Tags
Discuss
Description
uva 10237 Bishops:
http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=1178
pdf:
http://uva.onlinejudge.org/external/102/10237.pdf
Input
Output
Sample Input Download
Sample Output Download
Tags
Discuss
Description
icpc 5854 Long Distance Taxi:
pdf:
https://icpcarchive.ecs.baylor.edu/external/58/5854.pdf
Input
Output
Sample Input Download
Sample Output Download
Tags
Discuss
Description
icpc 4394 String painter:
pdf:
https://icpcarchive.ecs.baylor.edu/external/43/4394.pdf
Input
Output
Sample Input Download
Sample Output Download
Tags
Discuss
Description
uva 10246 Asterix and Obelix:
http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=1187
pdf:
http://uva.onlinejudge.org/external/102/10246.pdf
Input
Output
Sample Input Download
Sample Output Download
Tags
Discuss
Description
icpc 4327 Parade:
pdf:
https://icpcarchive.ecs.baylor.edu/external/43/4327.pdf
Input
Output
Sample Input Download
Sample Output Download
Tags
Discuss
Description
uva 1514 Piece it together:
http://uva.onlinejudge.org/index.php?option=onlinejudge&page=show_problem&problem=4260
pdf:
http://uva.onlinejudge.org/external/15/1514.pdf
Input
Output
Sample Input Download
Sample Output Download
Tags
Discuss
Description
icpc 3882 And Then There Was One:
pdf:
https://icpcarchive.ecs.baylor.edu/external/38/3882.pdf
Input
Output
Sample Input Download
Sample Output Download
Tags
Discuss
Description
icpc 6699 Surrounding a house:
pdf:
https://icpcarchive.ecs.baylor.edu/external/66/6699.pdf
Input
Output
Sample Input Download
Sample Output Download
Tags
Discuss
Description
uva 12452 Plants vs. Zombies HD SP
http://uva.onlinejudge.org/index.php?option=onlinejudge&page=show_problem&problem=3883
Input
Output
Sample Input Download
Sample Output Download
Tags
Discuss
Description
uva 1328 Period:
http://uva.onlinejudge.org/index.php?option=onlinejudge&page=show_problem&problem=4074
pdf:
http://uva.onlinejudge.org/external/13/1328.pdf
Input
Output
Sample Input Download
Sample Output Download
Tags
Discuss
Description
icpc 6434 Number Assignment
pdf:
https://icpcarchive.ecs.baylor.edu/external/64/6434.pdf