Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
简单模拟题。。。当type为C5的时候。。。page[row+i][col+j]字符为*时不可取代。但是。C5字符的某个位置为.时。 不更新对应page[row+i][col+j]的值。 当Type为C1的时候。可以直接重写对应位置的值。 void paintC5(int row, int col, char ch) { int i, j; int num; if(ch == ' ') num = 26; else num = ch - 'A'; for(i = 0; i<5; i++) for(j = 0; j<6; j++) { if( inrange(row+i, col+j) && page[row+i][col+j] != '*' && letter[num][i][j]!='.') page[row+i][col+j] = letter[num][i][j]; } } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator