2011-02-20から1日間の記事一覧

SRM395 div2 hard

DP[何回目][ボーナスポイント]=得点でDP O(50^2)でちょっと変だと思ったけど送信した 英語を読み間違えた,"lose that many point"はpointを手に入れられないではなく pointが引かれる(-point)が足されるという意味 #include <cstring> #include <algorithm> #include <vector> using na</vector></algorithm></cstring>…

SRM378 div1 easy

asi1024さんが誘ってくれたのでやった 普通にやればいいんだけど、-1となるケースに注意(落とした) チャレンジやるとは思ってなかったのですぐsysytem testした asi1024さんすいません #include <algorithm> #include <vector> using namespace std; class TrueStatements { pu</vector></algorithm>…

SRM318 div2 hard

DPなんだけど、外した場合の事を考えてなくてエラいことになった DP[何回目][何点]=ここからwinする確立(パーセント) #include <algorithm> using namespace std; class SimplifiedDarts { public: double DP[1000+1][3000+1]; double tryToWin(int W, int N, int P1, </algorithm>…

SRM398 div2 hard

全探索。簡単だった。900で納得。 動かさないやつを決める #include <string> #include <vector> #include <iostream> #include <cstdio> using namespace std; class MatchString { public: int placeWords(string matchString, vector <string> matchWords) { int len=0; int n=matchWords.size(); fo</string></cstdio></iostream></vector></string>…