夢追い人

"It takes a dreamer to make a dream come true."―Vincent Willem van Gogh

2011-09-06から1日間の記事一覧

Div.1Easy修行

FoxMakingDice NとKの大小関係で場合分けする。 その上で、3つ以上N以下の数字二つでその数を作れる場合の数を計算していく。 class FoxMakingDice { public: long long theCount( int N, int K ) { ll res = 0; if (N < 6) return res; if (N >= K) { for (…

PKU70問達成

3425 構造体使って初めて通した。 できる問題のはばが広がった気がする。 #include <cstdio> #include <map> using namespace std; struct ac { int anum, cost; }; int main() { int N; int q, a, x; map<int, ac> m; scanf("%d",&N); for (int i=0; i</int,></map></cstdio>

AとB

Cとか変態だったから一応これだけやっといた。 また今度C以外の他の問題も暇だったら練習としてやる。 A やるだけ #include <cstdio> #include <algorithm> using namespace std; int main() { char input[300]; scanf("%s",input); int k=0,u=0,p=0,c=0; for (int i=0; i</algorithm></cstdio>