Kamehameha-Greedy approach

@jaskaran_1 you deleted your previous comments and also change the solution link. And, greedy approach never get passed in this problem.

2 Likes

@amntri Hereā€™s a test case where your solution fails.

33
1 1
2 1
3 1
1 2
2 2
3 2
1 3
2 3
3 3
1 4
2 4
3 4
4 4
5 4
4 5
5 5
4 6
5 6
5 7
6 7
7 7
8 7
6 8
7 8
8 8
8 9
9 9
10 9
11 9
8 10
9 10
10 10
11 10

The answer should be 9.

It looks like this:

.......XXXX
.......XXXX
.....XXX...
....XXXX...
...XX......
...XX......
XXXXX......
XXX........
XXX........
XXX........
1 Like

@kevinsogo Thanks a lot for your time :slight_smile:

1 Like

@kevinsogo Thanks for your time :slight_smile:
Hats off for the test cases.

1 Like

@soubhagya
what kind of approach is this ?
http://www.codechef.com/viewsolution/2827617
thank you very much

agreedā€¦