2012-04-11から1日間の記事一覧
Easy (250) 177.43 Medium (550) 0 Hard (1050) 0 Challenge 0 結果 177.43点 182位 2022→2034
RandomColoringDiv2 #include <algorithm> using namespace std; class RandomColoringDiv2{public: int getCount( int maxR, int maxG, int maxB, int startR, int startG, int startB, int d1, int d2 ) { return (min(startR+d2,maxR-1)-max(startR-d2,0)+1) *(min(s</algorithm>…
ImportantSequence最左の数字を決めれば、全ての数字が定まる。数字1個ずつ処理すると時間が足りないので、それぞれの数字が取り得る範囲で計算する。 #include <string> #include <vector> using namespace std; class ImportantSequence{public: int getCount( vector <int> B, </int></vector></string>…