2011-03-15から1日間の記事一覧

SRM329 div2 hard

日付が代わりそうなんだけど… メモ化再起で書いてしまった。通ったからいいけど何とかしないと。 汚いのであんまり参考にならないと思う。 #include <string> #include <sstream> #include <vector> #include <map> using namespace std; class ProbabilisticTranslator { public: int n; m</map></vector></sstream></string>…

SRM353 div2 hard

メモ化再起で通ると思ったらEPSでつまずいた 実数型の統合付き比較は "x #include <cstring> #include <cmath> #include <sstream> #include <string> #include <vector> #define EPS 1e-9 using namespace std; class PlatformJumper { public: int n,v,g; vector<int> x; vector<int> y; vector<int> coin; int cach</int></int></int></vector></string></sstream></cmath></cstring>…

SRM352 div2 hard

x+yP>=minimum (xはどの馬も勝たなかったときに入ってくるお金の期待値 yはどの馬かが勝ったときに出て行くお金の期待値(マイナスになる)) を変形して P=(minimum-x)y (ただしy==0かつminimum #include <vector> #define EPS 1e-16 using namespace std; class R</vector>…