-
[1452] Ezreal
- 时间限制: 1000 ms 内存限制: 65535 K
- 问题描述
-
There are a LCD (Liquid Crystal Display) on Ezreal's arm. The LCD is composed of liquid crystal, and the LCD is 16 lines and 48 rows. How did it work?
The CPU will send a series of bytes to the LCD. A byte means to eight bits.When the LCD received the byte, it will show a page vertically. And each byte will display from bottom to top.
For example, 0x01 0x9C 0xED will be shown as below:
*.* ... .** .** .*. ..* ..* .**
Now give you 64 bytes, you should print it to the LCD from left to right and top to bottom. 32 columns in aBig Row (containing 8 rows).
- 输入
-
First line contains an integer T (T < 100), means the test case.
For each case, there are 2 lines which contain 64 hexadecimal numbers, and it is less than 0xff. - 输出
-
For each test case, print the LCD's status.
- 样例输入
-
1 01 9C ED DD 1A 2B CF CD C3 00 19 D0 5A 9F 56 13 E5 40 E5 46 E3 BD 4F A4 39 AF D8 2D 6F D4 54 36 1C B5 3C 24 9F 85 01 75 10 4B A0 00 77 44 77 7D 3B 82 57 47 DD DA DA 61 E5 FD F7 B7 1D E5 D3 A7
- 样例输出
-
*.**.****.*..*.**.*.***.**.**... ....***.*...****...**.*..*..*..* .***..**.....**.*.**.***.*.***** .*******..*.**.......**.*****... .*.**.....******.....*..*.*..*** ..*..*..........*.*.**.***.**..* ..**..***..**.*.*****.*...*.***. .***..***..*.*..*.*.**.*.**..*.. .*..****.*..*.***.***..********* ....*....*..*.*.****.**...**..** ******.*....****..***...******.* *.*.*....*.....**...***..*..*... ***.*..**...*.***.*.***..****.*. .***...*..*.*.***......*****.*.* .......*.*..****..*********..**. .*..**....*......*..***.****.***
- 提示
-
无
- 来源
-
Monkeyde17
题意:EZ有一只神奇的右手~吼吼,每次这个手可以射出点什么,射出的东西是由16进制数转换过来的,给出16进制数字串,求射出的图形。(竟然能射出不同的图形,好厉害)
分析:一开始把这个图的点都看成 . 然后修改图就行了。
解释一下题目给的例子,三个十六进制数字 0x01 0x9C 0xED 那么转换成二进制就是00000001 10011100 11101101 ,然后把0换成 . 1换成*,高位至低位放置,也就是
101 .*.
000 ...
011 .**
011 -> .**
010 .*.
001 ..*
001 ..*
011 .**
#pragma comprint(linker, "/STACK:1024000000,1024000000") #include<cstdio> #include<string> #include<iostream> #include<cstring> #include<cmath> #include<stack> #include<queue> #include<vector> #include<map> #include<stdlib.h> #include<time.h> #include<algorithm> #define LL __int64 #define FIN freopen("in.txt","r",stdin) using namespace std; char str[10][50],str1[10][50]; int main() { int kase,num,val; scanf("%d",&kase); while(kase--) { for(int i=0;i<8;i++) { for(int j=0;j<32;j++) str[i][j]='.'; str[i][32]=0; } for(int i=0;i<32;i++) { scanf("%x",&val); num=0; while(val) { if(val%2) str[num][i]='*'; val/=2; num++; } } for(int i=0;i<8;i++) { for(int j=0;j<32;j++) str1[i][j]='.'; str1[i][32]=0; } for(int i=0;i<32;i++) { scanf("%x",&val); num=0; while(val) { if(val%2) str1[num][i]='*'; val/=2; num++; } } for(int i=0;i<8;i++) printf("%s ",str[i]); for(int i=0;i<8;i++) printf("%s ",str1[i]); } return 0; }