Gridland Metro

  • + 2 comments

    Am I supposed to check if the input is correct i.e. that there are three strings in the first line in input, not 5 , or numbers are integers etc? I checked only given constraints: that r is not less than 1 and not more than n, et cetera. My algorithm works correctly with all correct inputs (9 for the test input, 8 for the input from lonely_wolf and my own tests). Algo is correct: but I get only first 6 tests positive. My algorithm computes the number of occupied spots of a set of overlaping (in principle) sets of intervals (c1,c2) of different rows. then it deducts them from m*n.