2012-03-27から1日間の記事一覧

AOJ_0128 Abacus

問題 解法 テーブル作ってやるだけ。 #include <cstdio> using namespace std; const char table[10][9] = { "* = ****", "* =* ***", "* =** **", "* =*** *", "* =**** ", " *= ****", " *=* ***", " *=** **", " *=*** *", " *=**** ", }; int main(){ int n; boo</cstdio>…

AOJ_0220 Binary Digit A Doctor Loved

問題 解法 普通に2進数に変換すればいい。 #include <cstdio> #include <algorithm> using namespace std; const double EPS = 1e-9; const double bit[] = {128.0, 64.0, 32.0, 16.0, 8.0, 4.0, 2.0, 1.0, 0.5, 0.25, 0.125, 0.0625}; int main(){ double r; while(scanf("%lf"</algorithm></cstdio>…