2015-07-01から1ヶ月間の記事一覧

0128 - Abacus

#include <iostream> using namespace std; const string data[10]={ "* = ****", "* =* ***", "* =** **", "* =*** *", "* =**** ", " *= ****", " *=* ***", " *=** **", " *=*** *", " *=**** " }; void Slove(int number) { string answer[5]; for (int i=0; i<5; </iostream>…

0127 - Pocket Pager Input

#include <iostream> #include <string> using namespace std; const char data[6][6]= { {'a', 'f' ,'k', 'p', 'u', 'z'}, {'b', 'g', 'l', 'q', 'v', '.'}, {'c', 'h', 'm', 'r', 'w', '?'}, {'d', 'i', 'n', 's', 'x', '!'}, {'e', 'j', 'o', 't', 'y', ' '} }; void Slove(</string></iostream>…

0126 - Puzzle

#include <iostream> using namespace std; char data[9][9][2]; void CheckSide(int i) { int number[10]={0}; for (int j=0; j<9; ++j) ++number[data[i][j][0]-'0']; for (int j=0; j<9; ++j) if (number[data[i][j][0]-'0'] > 1) data[i][j][1]=1; } void CheckLen</iostream>…