Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|

Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |

Language: Cross Counting
Description Given a x-th row or the y-th column and within a distance of k from (x,y) share the same color. Note that if two crosses have the same center but different sizes we consider they are distinct. Unfortunately, the color of each cell may varies by time and you have to respond to all the queries.Input There are four integers, Output Output the answer to each query. Sample Input 5 5 3 6 1 3 2 3 1 3 3 2 3 3 2 2 2 2 2 3 3 2 3 3 1 3 2 3 1 Q 1 Q 2 Q 3 C 2 3 3 C 3 2 3 Q 3 Sample Output 0 2 0 1 Source POJ Monthly--2007.11.25, Yang Yi |

[Submit] [Go Back] [Status] [Discuss]

All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di

Any problem, Please Contact Administrator