I successfully submitted the problem : http://www.codechef.com/problems/DIRECTI
again a good problem for STL learner in C++.
But I saw a strange behavior of getline function. It did not use my string container efficiently – by leaving the 0 subscript space of string container as empty.
My solution is : http://www.codechef.com/viewsolution/1727919
Why is it so? Please suggest.
also getline function is not working properly in test cases like structure …
kindly suggest me a method to input a string that may or may not have the spaces in them …???