luogu#P4346. [CERC2015] ASCII Addition
[CERC2015] ASCII Addition
题目背景
Nowadays, there are smartphone applications that instantly translate text and even solve math problems if you just point your phone’s camera at them. Your job is to implement a much simpler functionality reminiscent of the past – add two integers written down as ASCII art.
题目描述
An ASCII art is a matrix of characters, exactly 7 rows high, with each individual character either a dot or the lowercase letter x.
An expression of the form a + b is given, where both a and b are positive integers. The expression is converted into ASCII art by writing all the expression characters (the digits of a and b as well as the + sign) as 7 5 matrices, and concatenating the matrices together with a single column of dot characters between consecutive individual matrices. The exact matrices corresponding to the digits and the + sign are as follows:
Given an ASCII art for an expression of the form a + b, find the result of the addition and write it out in the ASCII art form.
输入格式
Input consists of exactly 7 lines and contains the ASCII art for an expression of the form a + b, where both a and b are positive integers consisting of at most 9 decimal digits and written without leading zeros.
输出格式
Output 7 lines containing ASCII art corresponding to the result of the addition, without leading zeros.
题目大意
题目背景
现在,如果你只是用手机的相机对着它们,智能手机应用可以即时翻译文本,甚至解决数学问题。您的工作是实现一个更简单的功能,回忆过去——添加两个作为ASCII艺术的整数。
题目描述
ASCII艺术是一个字符矩阵,正好是7行高,每个字符都是点或小写字母X。
给出了A +B形式的表达式,其中A和B都是正整数。通过将所有的表达式字符(A和B的数字以及符号)作为7 5个矩阵,将这些矩阵转换成ASCII艺术,并将矩阵与单个字符的单个列串联在连续的各个矩阵之间。对应于数字和+符号的精确矩阵如下:
给定一个ASCII艺术来表达A+B的形式,找到加法的结果并用ASCII艺术形式写出。
输入输出格式
输入格式:
输入由7行组成,包含用于A+B形式的表达式的ASCII技术,其中A和B都是由至多9个十进制数字组成的正整数,并且没有前导零。
输出格式:
输出包含ASCII艺术的7行,对应于加法的结果,没有前导零。
感谢@剑圣夜雨声烦 提供的翻译
....x.xxxxx.xxxxx.x...x.xxxxx.xxxxx.xxxxx.......xxxxx.xxxxx.xxxxx
....x.....x.....x.x...x.x.....x.........x...x...x...x.x...x.x...x
....x.....x.....x.x...x.x.....x.........x...x...x...x.x...x.x...x
....x.xxxxx.xxxxx.xxxxx.xxxxx.xxxxx.....x.xxxxx.xxxxx.xxxxx.x...x
....x.x.........x.....x.....x.x...x.....x...x...x...x.....x.x...x
....x.x.........x.....x.....x.x...x.....x...x...x...x.....x.x...x
....x.xxxxx.xxxxx.....x.xxxxx.xxxxx.....x.......xxxxx.xxxxx.xxxxx
....x.xxxxx.xxxxx.xxxxx.x...x.xxxxx.xxxxx
....x.....x.....x.x.....x...x.x.........x
....x.....x.....x.x.....x...x.x.........x
....x.xxxxx.xxxxx.xxxxx.xxxxx.xxxxx.....x
....x.x.........x.....x.....x.....x.....x
....x.x.........x.....x.....x.....x.....x
....x.xxxxx.xxxxx.xxxxx.....x.xxxxx.....x
提示
样例:1234567+890=1235457
Central Europe Regional Contest 2015 Problem A