UVA232
这只是大概的雏形。
步骤就是:1输入网格,2给网格里的起始格编序号,3输出所有字母,前面要加序号
#include<stdio.h>
#include<ctype.h>
#include<string.h>
][];//保存字母和*
][];//保存顺序编号
int main(){
int r,c;
;
scanf("%d %d",&r,&c);
memset(a,,sizeof(a));
memset(b,,sizeof(b));
//输入网格
getchar();//输入字符串要加getchar来跳过回车
;i<r;i++)
gets(a[i]);
//标记起始格
;i<r;i++)
;j<c;j++){
]) || !isalpha(a[i-][j-]) ) )
b[i][j]=++d;
}
;i<r;i++)
;j<c;j++){
] == ])){
printf("%d.",b[i][j]);
}//输出数字
if(isalpha(a[i][j]))
putchar(a[i][j]);//输出每一个字母
] == ]){
printf("\n");
}
}
;
}
UVA232的更多相关文章
- [刷题]算法竞赛入门经典 3-4/UVa455 3-5/UVa227 3-6/UVa232
书上具体所有题目:http://pan.baidu.com/s/1hssH0KO 题目:算法竞赛入门经典 3-4/UVa455:Periodic Strings 代码: //UVa455 #inclu ...
- 【每日一题】 uva-232 模拟+输出要求很严格
https://cn.vjudge.net/problem/UVA-232 uva的题,结尾不能多\n,空格什么的 反正就是个中型模拟,题目多读就行 #define _CRT_SECURE_NO_WA ...
- UVA232字符串处理
#include <iostream> #include <cstdio> #include <algorithm> #include <cstring> ...
- UVa232.Crossword Answers
题目链接:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem& ...
- Crossword Answers -------行与列按序输出
题目链接:https://vjudge.net/problem/UVA-232#author=0 题意:关键句:The de nitions correspond to the rectangular ...
随机推荐
- Dynamics CRM 之ADFS 使用 SQL Server 的联合服务器场
此拓扑用于 Active Directory 联合身份验证服务 (AD FS) 不同于使用 Windows 内部数据库 (WID) 部署拓扑,因为不会将数据复制到每台联合服务器场中的联合身份验证服务器 ...
- Android Weekly Notes Issue #225
Android Weekly Issue #225 October 2nd, 2016 Android Weekly Issue #225 本期内容包括: Android 7.0的Quick Sett ...
- java、easyui-combotree树形下拉选择框
最近一直在研究这个树形的下拉选择框,感觉非常的有用,现在整理下来供大家使用: 首先数据库的表架构设计和三级菜单联动的表结构是一样,(父子关系) 1.下面我们用hibernate建一下对应的额实体类: ...
- Centos 6.5 Percona 5.6.27 Tokudb 配置
参考 https://www.percona.com/doc/percona-server/5.6/tokudb/tokudb_installation.html # wget https://www ...
- DOS下命令符开启wifi无internet访问解决办法
先按win+R 输入cmd netsh wlan set host mode=allow ssid=nothing key=323435435 (ssid后面的可以任意,key后面最少8个字符) 我的 ...
- 图像处理中任意核卷积(matlab中conv2函数)的快速实现。
卷积其实是图像处理中最基本的操作,我们常见的一些算法比如:均值模糊.高斯模糊.锐化.Sobel.拉普拉斯.prewitt边缘检测等等一些和领域相关的算法,都可以通过卷积算法实现.只不过由于这些算法的卷 ...
- Ural 1209. 1, 10, 100, 1000... 一道有趣的题
1209. 1, 10, 100, 1000... Time limit: 1.0 secondMemory limit: 64 MB Let's consider an infinite seque ...
- spring3 DI基础
Spring IOC容器的依赖有两层含义:Bean依赖容器和容器注入Bean的依赖资源: Bean依赖容器:bean要依赖于容器,这里的依赖是指容器负责创建Bean并管理bean的生命周期.正是由于由 ...
- 使用jOrgChart插件实现组织架构图的展示
项目要做组织架构图,要把它做成自上而下的树形结构. 一.说明 (1)通过后台查询数据库,生成树形数组结构,返回到前台. (2)需要引入的js插件和css文件: ①jquery.jOrgChart.cs ...
- [LeetCode] Bitwise AND of Numbers Range 数字范围位相与
Given a range [m, n] where 0 <= m <= n <= 2147483647, return the bitwise AND of all numbers ...