摘要: http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=3504C代表有几个字母,每一行输入的16进制是每个字母的显示,每个字母有7行5列,每一行输入的5个16进制数,每个二进制数对应显示的每一列,取每个16进制数的二进制表示的后7位,如果该位为1,则显示'#',否则显示为空格。比如第一个case的第一列7F 08 08 08 7F是字母H的显示,H有7行5列,7F的二进制表示为01111111,后面7位为1,则相应的字母显示的第一列显示为'#######'。注意,每行有6C*1个字符,是字母之间要用 阅读全文
posted @ 2009-12-05 19:27 zhwj184 阅读(139) 评论(0) 推荐(0) 编辑
摘要: http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=3220简单题,好久没写c++代码了,练习zoj,也学习c++.#include <iostream>#include <cmath>using namespace std;const int ROW = 8;const int COLUMN = 6;char abacus[ROW][COLUMN];int main(){ int cas; cin >> cas; int start; int end; int sum; while(cas- 阅读全文
posted @ 2009-12-05 18:29 zhwj184 阅读(99) 评论(0) 推荐(0) 编辑
摘要: #include <iostream>#include <cmath>using namespace std;const int SIZE = 100;int map[SIZE][SIZE];struct{ int min; int max; char direction;}step[SIZE];int n;int m;int stepSize ;int isOk;void swap(int &a, int &b){ int t = b; b = a; a = t;}bool canGo(int sx, int sy, int ex, int ey){ 阅读全文
posted @ 2009-12-05 14:43 zhwj184 阅读(112) 评论(0) 推荐(0) 编辑