UVA 12658 模拟
来源:互联网 发布:淘宝客在哪推广 编辑:程序博客网 时间:2024/06/06 05:13
Write a program that recognizes characters. Don’t worry, because you only need to recognize three
digits: 1, 2 and 3. Here they are:
.*. *** ***
.*. ..* ..*
.*. *** ***
.*. *.. ..*
.*. *** ***
Input
The input contains only one test case, consisting of 6 lines. The first line contains n, the number of
characters to recognize (1 ≤ n ≤ 10). Each of the next 5 lines contains 4n characters. Each character
contains exactly 5 rows and 3 columns of characters followed by an empty column (filled with ‘.’).
Output
The output should contain exactly one line, the recognized digits in one line.
Sample Input
3
.*..***.***.
.*....*...*.
.*..***.***.
.*..*.....*.
.*..***.***.
Sample Output
123
题意:给你一个字符图形,输出阿拉伯数字
题解:模拟就好了
#include<iostream>#include<cstdio>#include<cstring>#include<algorithm>#include<vector>#include<set>#include<string>using namespace std;#define N 1000+5char s[N][N];typedef unsigned long long LL; int main(){#ifdef CDZSCfreopen("i.txt","r",stdin);#endifint k;while(~scanf("%d",&k)){for(int i=0;i<5;i++){scanf("%s",s[i]);}for(int i=2;i<4*k;i+=4){if(s[3][i]=='.'){if(s[3][i-1]=='.')printf("2");else printf("1");}else{printf("3");}}puts("");}return 0;}
0 0
- UVA 12658 模拟
- UVA 10196 模拟题。。
- UVa 100 简单模拟
- UVa 602 简单模拟
- Uva 11039(排序+模拟)
- UVA 11039 模拟
- UVa 10189 Minesweeper (模拟)
- uva 11995 STL模拟
- uva 10205 模拟
- UVA 514 - Rails(模拟)
- uva 502(模拟)
- uva--188+模拟
- UVA Palindromes(模拟)
- UVA Artificial Intelligence?(模拟)
- UVA 401-Palindromes(模拟)
- UVa 227 模拟
- UVa 340 模拟
- UVa 1589 da模拟!!
- OpenGL ES 学习教程(十) Light casters 之 Spot Light (聚光灯)
- macbook pro安装linux系统
- HDU 5630 Rikka with Chess
- VS2015--win32工程配置的一些想法之warning LNK4042: 对象被多次指定;已忽略多余的指定
- 机器学习系列(3)_逻辑回归应用之Kaggle泰坦尼克之灾
- UVA 12658 模拟
- VS2010~VS2013中文注释带红色下划线的解决方法
- 在文章中使用amsmath宏包的原因
- 积跬步至千里系列之十--编译Android源码实践
- JSP-include指令
- java学习笔记-参数的调用
- neuq oj 1047: 谭浩强C语言(第三版)习题6.3 C++
- PyQt4入门教程(3)_菜单栏和工具条
- UVA 12667 模拟