2010-07-28から1日間の記事一覧

SRM477 Div1 Easy(250), Div2 Medium(500) Islands

Islands #include <iostream> #include <string> #include <vector> using namespace std; class Islands { public: int beachLength( vector <string> kingdom ); }; int Islands::beachLength( vector <string> kingdom ) { int h = (int)kingdom.size(); int w = (int)kingdom[0].length(); int l = </string></string></vector></string></iostream>…

SRM477 Div2 Easy(250) VacationTime

VacationTime #include <iostream> #include <vector> #include <numeric> using namespace std; class VacationTime { public: int bestSchedule( int N, int K, vector <int> workingDays ); }; int VacationTime::bestSchedule( int N, int K, vector <int> workingDays ) { vector<int> day( N ); f</int></int></int></numeric></vector></iostream>…

SRM477

Easy (250) 277.63 Medium (500) 0 適当に貪欲に書いてみたけどSystem落ち。 Hard (1000) 0 Challenge 0 結果 1490 → 1516黄色に戻れて良かった。