8afddeabcf 2011-09-21 kinaba: #include <iostream> 8afddeabcf 2011-09-21 kinaba: #include <sstream> 8afddeabcf 2011-09-21 kinaba: #include <iomanip> 8afddeabcf 2011-09-21 kinaba: #include <vector> 8afddeabcf 2011-09-21 kinaba: #include <string> 8afddeabcf 2011-09-21 kinaba: #include <map> 8afddeabcf 2011-09-21 kinaba: #include <set> 8afddeabcf 2011-09-21 kinaba: #include <algorithm> 8afddeabcf 2011-09-21 kinaba: #include <numeric> 8afddeabcf 2011-09-21 kinaba: #include <iterator> 8afddeabcf 2011-09-21 kinaba: #include <functional> 8afddeabcf 2011-09-21 kinaba: #include <complex> 8afddeabcf 2011-09-21 kinaba: #include <queue> 8afddeabcf 2011-09-21 kinaba: #include <stack> 8afddeabcf 2011-09-21 kinaba: #include <cmath> 8afddeabcf 2011-09-21 kinaba: #include <cassert> 8afddeabcf 2011-09-21 kinaba: #include <cstring> 8afddeabcf 2011-09-21 kinaba: using namespace std; 8afddeabcf 2011-09-21 kinaba: typedef long long LL; 8afddeabcf 2011-09-21 kinaba: typedef complex<double> CMP; 8afddeabcf 2011-09-21 kinaba: 8afddeabcf 2011-09-21 kinaba: class LargestSubsequence { public: 8afddeabcf 2011-09-21 kinaba: string getLargest(string s) 8afddeabcf 2011-09-21 kinaba: { 8afddeabcf 2011-09-21 kinaba: string result; 8afddeabcf 2011-09-21 kinaba: for(string::iterator it=s.begin(); it!=s.end(); ) { 8afddeabcf 2011-09-21 kinaba: it = max_element(it, s.end()); 8afddeabcf 2011-09-21 kinaba: if( it != s.end() ) 8afddeabcf 2011-09-21 kinaba: result += *it++; 8afddeabcf 2011-09-21 kinaba: } 8afddeabcf 2011-09-21 kinaba: return result; 8afddeabcf 2011-09-21 kinaba: } 8afddeabcf 2011-09-21 kinaba: };