2014-07-13から1日間の記事一覧

0029 - English Sentence

#include <algorithm> #include <iostream> #include <map> #include <string> using namespace std; map<string,int> data; bool compare(const pair<string,int> T1, const pair<string,int> T2) { return T1.second < T2.second; } string Slove(string word, string max_length) { if (max_length.size() < word.size()…</string,int></string,int></string,int></string></map></iostream></algorithm>

0028 - Mode Value

#include <algorithm> #include <iostream> using namespace std; int number_count[100]={0}; void Slove(int max_count) { for (int i=0; i<100; ++i) if ( max_count == number_count[i] ) cout << i+1 << endl; } int main(void) { int max_count=0, number; while (cin >> nu</iostream></algorithm>…