2012-10-03から1日間の記事一覧
問題概要 今1を持っている。今持っているものから重複ありで二つ選んで(a,bとする)、新たにa+bまたはa-bを得る(ただしa-b>0に限る)。X( 解法 基本アイデアは反復深化。 #include <cstdio> #include <cstring> #include <algorithm> using namespace std; int X; int ANSWER; bool exists[1</algorithm></cstring></cstdio>…