Update pair.cpp

search problem for HackerRank
Completed