add inverse pair code #Problem 2-4
Merge pull request #7 from mengjiaowang/dev

add inverse pair code #Problem 2-4