1
3 3 1 2
2
1 2
2 1
AC output
Case 1: 1 0
How is the answer 1 0 for this case. If I understand the problem correctly, the knight will not be able to make a single move (because of the water) and hence it should be 0 0 right? Help appreciated.
Search found 2 matches
- Fri Mar 20, 2015 9:05 am
- Forum: Volume 119 (11900-11999)
- Topic: 11906 - Knight in a War Grid
- Replies: 13
- Views: 10268
- Sun Mar 08, 2015 10:28 am
- Forum: Volume 123 (12300-12399)
- Topic: 12356 - Army Buddies
- Replies: 21
- Views: 10488
Re: 12356 - Army Buddies
You are using a map over a 1d array. In essence you are converting all O(1) into O(log n) and hence the extra cost.