2013-12-01から1ヶ月間の記事一覧

Starry Sky Tree

StarrySkyを解こうとしました. 枝刈りしていないので半分ぐらいTLEします. #include <cstdio> #include <string.h> #include <algorithm> #define X first #define Y second using namespace std; const int MAXN = 4096; typedef pair<int, int> P; typedef pair<P, int> STAR; int N; int cx[MAXN], cy[M</p,></int,></algorithm></string.h></cstdio>…

JOI 2013-2014予選

JOI

通っていました。 4が全滅して悲しかった。 1,2,3完+5の部分点(60)で360点 本選ではこんなことにならないようにします。

POJ 3252 Round Numbers

http://poj.org/problem?id=3252 パスカルの三角形をあらかじめ計算しておく。 まず、((数字の桁数) - 1)桁以下の2進数についてRound Numberを求める。 これは、iを桁数、jを0の個数として iCj - (i-1)C(j-1) の和を計算すればよい。次に(数字の桁数)桁の2進…

SRM 491 div 1

easy 和sとして、「和がsになる2つの数字の組合せ」を3つ取ってくる円順列を考えて、sがmax(7,K)から2N-5までの円順列の和を求めればよい。 #include <cstdio> #include <algorithm> #include <vector> #include <string> using namespace std; class FoxMakingDice{ public: long long c3(long </string></vector></algorithm></cstdio>…