Codeforces Beta Round #28 Problem BC