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

SRM384 div1 medium

問題要約 ーーーーーーーーーーーー n人の人が円形に並んでいて、 時計回りの順にボールを任意の他の人に向かって投げる。 ボールがあたった人は円から離脱し、 番号iの人が投げたボールが当たる確率はprobably[i]である。 この時円形に並んでいる人が1人に…

SRM397 div1 medium

k乗和の公式を使う。 求め方は数学Bの教科書に載っている。 #include <algorithm> #include <string> #include <vector> #include <iostream> #include <sstream> #include <cstdio> #include <cstring> #include <cmath> #include <set> #include <map> #include <climits> using namespace std; typedef long long LL; static const LL MOD=10000000…</climits></map></set></cmath></cstring></cstdio></sstream></iostream></vector></string></algorithm>