Codeforces Round #236 (Div. 1) D. Beautiful Pairs of Numbers
http://codeforces.com/contest/403/problem/DD. Beautiful Pairs of Numberstime limit pertest3 secondsmemory limit pertest256 megabytesinputstandard inputoutputstandard outputThe sequ