当前位置:网站首页>4276. 擅长C
4276. 擅长C
2022-06-29 01:13:00 【Ray.C.L】

思路:有意思的模拟题
代码:
#include <iostream>
#include <cstring>
#include <algorithm>
using namespace std;
char g[26][7][6];
bool is_first = true;
void write(string word){
if(word.empty()) return ;
char str[7][60] = {
'.'};
if(is_first) is_first = false;
else cout << endl;
for(int i = 0; i < word.size(); i++)
for(int j = 0; j < 7; j++)
for(int k = 0; k < 5; k++)
str[j][i * 6 + k] = g[word[i] - 'A'][j][k];
for(int i = 1; i < word.size(); i++)
for(int j = 0; j < 7; j++)
str[j][i * 6 - 1] = ' ';
for(int i = 0; i < 7; i++)
cout << str[i] << endl;
}
int main()
{
for(int i = 0; i < 26; i++)
for(int j = 0; j < 7; j++)
cin >> g[i][j];
string word;
char c;
while( (c = getchar()) != -1){
if(c >= 'A' && c <= 'Z') word += c;
else{
write(word);
word = "";
}
}
write(word);
return 0;
}
边栏推荐
- Uvm:field automation mechanism
- [proteus simulation] 4x4 matrix keyboard interrupt mode scanning + nixie tube display
- 手把手教你搞懂测试环境项目部署
- [eight part essay] MySQL
- How can multidimensional analysis pre summary work?
- 一条update语句到底加了多少锁?带你深入理解底层原理
- Maximum path and problem (cherry picking problem)
- Linux7 (centos7) setting oracle11 boot auto start
- WPF 实现心电图曲线绘制
- 第七天 脚本与特效
猜你喜欢

戴口罩人脸数据集和戴口罩人脸生成方法

Finally understand the difference between DOM XSS and reflection XSS

BMFONT制作位图字体并在CocosCreator中使用

674. longest continuous increasing sequence

Depth first search to realize the problem of catching cattle
![[MCU club] design of classroom number detection based on MCU [physical design]](/img/cf/65c1bdbb45afcc6db265a79c25a3ae.jpg)
[MCU club] design of classroom number detection based on MCU [physical design]

Connected to rainwater series problems

IT治理方面的七个错误,以及如何避免
![[MCU club] design of blind water cup based on MCU [physical design]](/img/06/93d7a8fd97cdccbc639d2a95b10826.jpg)
[MCU club] design of blind water cup based on MCU [physical design]

FSS object storage how to access the Intranet
随机推荐
【Proteus仿真】4x4矩阵键盘中断方式扫描 +数码管显示
DO280分配持久性存储
[staff] accent mark, gradually stronger mark and gradually weaker mark
【RRT三维路径规划】基于matlab快速扩展随机树无人机三维路径规划【含Matlab源码 1914期】
Interviewer: with the for loop, why do you need foreach??
用户登录(记住用户)&用户注册(验证码) [运用Cookie Session技术]
不同的子序列问题I
我想今天买股票,可以么?现在网上开户安全么?
肖特基二极管在防止电源反接的作用
Linux7 (centos7) setting oracle11 boot auto start
Nodejs installation and download
Cocoscrreator dynamically switches skeletondata to update bones
Day 8 script and audio
Drawing ECG curve with WPF
Is l1-031 too fat (10 points)
【架构师(第三十八篇)】 服务端开发之本地安装最新版 MySQL 数据库
Oracle uses sqlloader to prompt sql*loader-406 Import failed but no error was reported
统计字符串中不同回文子序列的个数
Streaming media cluster application and configuration: how to deploy multiple easycvr on one server?
Similarities and differences between SRAM and DRAM