<[SRM 446][Div2][Div2 Level-1][Math][80%] Sold... | [SRM 236][Div2][Div2 Level-1][Simple Math][St...>
2009-09-29
IncredibleMachineEasy
SRM 440, Div2, Div2 Level-1, Math, cheated |
与えられたシステムの、重力の加速度を求めよ。
加速度を求める式を作って解かせるだけの問題だが、自力で解けなかった。
196.50/250 (cheated)
class IncredibleMachineEasy { public: double gravitationalAcceleration(vector <int> height, int T) { double sum = 0.0; for (int i = 0; i < height.size(); i++) sum += sqrt(2*height[i]); return square(sum/T); } private: double square(const double x) { return x*x; } };
コメントを書く