2015-08-10から1日間の記事一覧

0138 - Track and Field Competition

#include <cstdio> #include <iostream> #include <map> using namespace std; void Slove(void) { int number; double time; map<double,int> top, third; third.clear(); for (int i=0; i<3; ++i) { top.clear(); for (int j=0; j<8; ++j) { cin >> number >> time; top.insert( map<double,int>::value_ty</double,int></double,int></map></iostream></cstdio>…

0137 - Middle-Square Method

#include <iostream> using namespace std; void Slove(int x) { int n, number[8]; for (int i=0; i<x; ++i) { cin >> n; cout << "Case " << i+1 << ":" << endl; for (int i=0; i<10; ++i) { n*=n; int tmp=n, answer=0; for (int j=0; j<8; ++j) { number[j]=tmp%10; tmp/=10; } in</x;></iostream>…