2015-07-09から1日間の記事一覧

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>…