2014-08-21から1日間の記事一覧

0063 - Palindrome

#include <iostream> #include <string> using namespace std; bool Slove(string word) { int i; for (i=0; i<word.length()/2; ++i) if ( word[i] != word[ (word.length()-1)-i ] ) break; return (i == word.length()/2)? true : false; } int main(void) { int count=0; string word; while (cin >> word) count+=Slov…</word.length()/2;></string></iostream>

0062 - What is the Bottommost?

#include <iostream> #include <string> using namespace std; void Slove(string str) { int number[10]; for (int i=0; i</string></iostream>

0061 - Rank Checker

#include <cstdio> #include <iostream> #include <queue> #include <vector> using namespace std; typedef pair<int,int> P_II; void Slove(void) { int number, point, before_number, before_point, team; vector<int> rank(1000,1); priority_queue< P_II,vector<P_II> > que; while ( scanf ("%d,%d", &numbe</p_ii></int></int,int></vector></queue></iostream></cstdio>…