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

Codeforces Beta Round #54 (Div. 2)

A. Chat room #include <iostream> #include <string> using namespace std; int main() { string s, t("hello"); cin>>s; int cnt = 0; for(int i = 0; i < s.size(); i++){ if(cnt >= t.size()) break; if(s[i] == t[cnt]){ cnt++; } } cout<<(cnt >= t.size() ? "YES" : "NO</string></iostream>…

TopCoder SRM 496 DIV2

Rating: 654→892(灰) 前が酷かったので上がってもまだ灰色コーダーだけれども、大分一気に上がった。Total: 698.3 points 250: AnagramFree 239.97 points #include <map> #include <string> #include <vector> using namespace std; class AnagramFree { public: int getMaximumS</vector></string></map>…