http://codeforces.com/problemset/problem/596/B
一路递推过去就好了。#include <iostream>#include <cstdio>#include <list>#include <stack>#include <queue>#include <cstdlib>#includ