• [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\n",str[i]);for(int i=0;i<8;i++)printf("%s\n",str1[i]);}return 0;
}

View Code

转载于:https://www.cnblogs.com/clliff/p/4749289.html

NBUT 1452 Ezreal (模拟水题)相关推荐

  1. 洛谷 1563 玩具谜题——模拟水题

    题目:https://www.luogu.org/problemnew/show/P1563 模拟水题. #include<iostream> #include<cstdio> ...

  2. 【CCCC】L2-027 名人堂与代金券 (25分),模拟水题

    problem L2-027 名人堂与代金券 (25分) 对于在中国大学MOOC(http://www.icourse163.org/ )学习"数据结构"课程的学生,想要获得一张合 ...

  3. poj 3095 Linear Pachinko 模拟水题

    题意: 给一个字符串,求小球随机放在上面进洞或到达两边之外的期望. 分析 水题,直接模拟. 代码: //poj 3095 //sep9 #include <iostream> using ...

  4. 【HDU - 1326】Box of Bricks(模拟水题)

    题干: Little Bob likes playing with his box of bricks. He puts the bricks one upon another and builds ...

  5. 一发模拟水题但是RE,暑假抽个时间改一改、、

    这是我们实验室纳新考试的A题,简单模拟. 话不多说上题干: 哲哲晔晔很难受 Description 哲哲和晔晔最喜欢一起睡懒觉了!可老师又特别喜欢点名,所以每个第一节有课的早晨,他们都会很难受. 因为 ...

  6. 数字罗列模拟水题-郑轻 2438

    原题传送 2438: shape of you 时间限制: 1 Sec  内存限制: 128 MB 提交: 279  解决: 234 [提交] [状态] [讨论版] [命题人:541607120135 ...

  7. [UVA12108]Extraordinarily Tired Students(模拟+水题)

    最近在填紫书上的坑(以前由于浮躁没有做的习题),发现还是有很多题比较麻烦,虽然思路很容易想,但就是写不出ac代码,可能这就是眼高手低吧.希望在接下来的学习生活中,从小事做起,向着自己的目标而努力吧. ...

  8. 牛客~~打篮球~~~模拟水题

    链接:https://www.nowcoder.com/acm/contest/118/D 来源:牛客网 题目描述 1, 2, 3在打篮球, 可是二打一总是不公平的, 于是他们决定一对一,另一个人在边 ...

  9. 【HDU 1889】Reaux! Sham! Beaux!(模拟+水题)

    传送门:http://acm.hdu.edu.cn/showproblem.php?pid=1889 题意:给出一个表,每个国家的石头剪子布的叫法,给两个人用自己国家的语言进行石头剪子布,进行统计,最 ...

最新文章

  1. javascript面向对象系列第一篇——构造函数和原型对象
  2. python集合中的元素是否可以重复_python中集合中的元素是否可以重复
  3. EE Servlet 3:在Servlet中生成HTML输出
  4. java客户端查询hive很慢_Hive面试,如何优化查询效率!
  5. 【成长之路】【python】python基础2
  6. wp10 手机 部署linux,【图片】02-15【吐槽】【转】win10手机端直接安装xap教程!【windowsphone吧】_百度贴吧...
  7. 大脑网络结构、功能和控制的物理学
  8. 【菜鸟小屁的成长日记】之ElasticSearch中的TimeStamp时间戳篇
  9. PyTorch——device与cuda.device用法
  10. PAAS平台(摘360百科)
  11. DataTable常用数据筛选方法
  12. mc 手游无限挑战服务器,盘点mc中可无限获得的东西(无BUG无mod)[多图]
  13. 这社会并不是靠努力和辛苦赚钱的
  14. Java 8 list 对象字段升序降序
  15. Angular8简单方式实现表格固定表头和冻结列
  16. 会声会影2023最新中文旗舰版新功能介绍
  17. java使用knn实现mnist_java使用knn实现mnist - 百度学术
  18. ERP综合竞争力排名价值几何?
  19. KEIL-MDK快速格式化代码的方法
  20. html中如何引用其外部字体,css引入外部字体

热门文章

  1. winedt文件栏显示
  2. 和女生约会的30条注意事项
  3. linux将h264文件转化为flv文件
  4. # C 语言编写二进制/十六进制编辑器
  5. 各种协议报头解析(以太网,IP,TCP,UDP报头)
  6. ArcGIS利用自定义形状创建地图网格
  7. 开放数据库:共享杯版_前列腺肿瘤预警数据集
  8. 文献:三维视觉前沿进展 大场景下的视觉定位阅读笔记
  9. java基础语法day29_集合
  10. cisp cissp cisa 区别