2011-07-01から1ヶ月間の記事一覧

TopCoder SRM 458 DIV 2

Problem 500 int n; // int aの下からn桁分のbitをdequeに入れて返す deque<int> bitDigits(int a, int dig){ deque<int> arr; for(int i=0 ; i<dig ; i++){ arr.push_front(a%2); a/=2; } return arr; } class BouncingBalls { public: double expectedBounces(vector <int> x, int T) { double result; n = x.size(); ll time = 2LL*T; …</dig></int></int>

TopCoder SRM 459 DIV 2

Problem 500 // -inf to 0 int bottom; // area[k] -> k to k+1 int area[1001]; int point[1001]; vector<string> split(const string& str, const string& delimiter) { // delimiter(2 文字以上も可) を空白に置換 string item(str); for(unsigned pos = item.fin</string>…