CandyRush SOLUTIONS SC_03 CODECHEF
All of you more likely than not played the game treats squash. So here is a bomb which works a lot of the organic product bomb in treats squash. A creator, Anton, planned an exceptionally incredible bomb. The bomb, when put on an area (x,y) in a R×C network, clears out the line x and section y totally.
You are given a R×C lattice with N targets. You have just one bomb. Your point is to amplify the harm and subsequently devastate generally number of targets. Given the area of focuses on the network, discover the quantity of focuses on that can devastated.
The lattice framework utilizes record beginning with 0.
First line contains three space isolated numbers, R, C and N. At that point, N lines follow.
Each line contains space isolated whole numbers r and c referencing the area of the objective.
A solitary whole number giving the quantity of focuses on that can be crushed.
Any information pair (r,c) isn’t rehashed.
The all out imprints will be separated into:
20% : R,C≤103
80% : Original Constraints
It is conceivable to pulverize all the objectives in the event that we place the bomb at (0,1). Henceforth, complete number of targets devastated is 3, which is our answer.