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