UVA_445:Marvelous Mazes


Language:C++ 4.8.2
#include<stdio.h>
#include<string.h>
#include<ctype.h>
int main(void)
{
char str[];
int sum;
while()
{
if(fgets(str, sizeof(str), stdin) == NULL)
break;
if(str[] == '\n')
{
printf("\n");
continue;
}
else // 处理读入行
{
int i = ;
while(i < strlen(str))
{
if(str[i] == '!')
{
printf("\n");
i++;
}
sum = ;
while(isdigit(str[i]))
sum += str[i++] - '';
for(int j = ; j < sum; j++)
printf("%c", str[i] == 'b' ? ' ' : str[i]); // 最好用if.else,懒得改了:-
i++; // 缺少此行的话,该程序陷入死循环
}
printf("\n");
} }
return ;
}
UVA_445:Marvelous Mazes的更多相关文章
- Marvelous Mazes
F - Marvelous Mazes Time Limit:3000MS Memory Limit:0KB 64bit IO Format:%lld & %llu Submi ...
- UVa 445 - Marvelous Mazes
https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=94&page=s ...
- Marvelous Mazes UVA - 445
#include<iostream> #include<stdio.h> #include<string> #include<cstring> #def ...
- UVA题目分类
题目 Volume 0. Getting Started 开始10055 - Hashmat the Brave Warrior 10071 - Back to High School Physics ...
- 【索引】Volume 0. Getting Started
AOAPC I: Beginning Algorithm Contests (Rujia Liu) Volume 0. Getting Started 10055 - Hashmat the Brav ...
- TOJ 2017: N-Credible Mazes
2017: N-Credible Mazes Time Limit(Common/Java):1000MS/10000MS Memory Limit:65536KByteTotal Subm ...
- CodeForce 377 A mazes(dfs+连通性问题)
Pavel 喜欢网格迷宫.一个网格迷宫是一个 n × m 的长方形迷宫,其中每个单元格要么是空白的,要么是墙体.您可以从一个单元格走到另一个单元格,只要两个单元格均是空白的,且拥有一条公共的边. Pa ...
- History lives on in this distinguished Polish city 2017/1/4
原文 History lives on in this distinguished Polish city Though it may be ancient. KraKow, Poland, is a ...
- SVM(支持向量机)的一点理解
最近有被问到SVM的问题,不懂装懂,羞愧不已.百度有很多深入浅出介绍SVM的文章,我就不赘述了,这里写一点自己肤浅的理解. SVM的核心思想是把求解低维空间上的高维分类器转化为求解高维函数空间上的线性 ...
随机推荐
- hbase字典顺序存储
rowkey rowkey是行的主键,而且hbase只能用个rowkey,或者一个rowkey范围即scan来查找数据.所以 rowkey的设计是至关重要的,关系到你应用层的查询效率.我们知 ...
- 【Streaming】Storm内部通信机制分析
一.任务执行及通信的单元 Storm中关于任务执行及通信的三个概念:Worker(进程).Executor(线程)和Task(Spout.Bolt) 1. 一个worker进程执行的是一个Topol ...
- BZOJ2120&&2453 数颜色&&维护队列
2453: 维护队列 Time Limit: 10 Sec Memory Limit: 128 MB Submit: 1442 Solved: 678 [Submit][Status][Discuss ...
- Luogu P1712 [NOI2016]区间(线段树)
P1712 [NOI2016]区间 题意 题目描述 在数轴上有 \(N\) 个闭区间 \([l_1,r_1],[l_2,r_2],...,[l_n,r_n]\) .现在要从中选出 \(M\) 个区间, ...
- k8s(openshift) 部署istio1.1
准备工作: openshift 默认不允许UID为0的容器运行,要先授权scc以便安装istio # oc adm policy add-scc-to-user anyuid -z istio-ing ...
- 配置android studio环境2
安装android studio 2.1运行 exe 程序 安装截图 备注 :O(∩_∩)O~等了 ,但是还是失败, 完全安装啊,不影响,可以手动运行安装目录下的 如:D:\Program Files ...
- TZ_14_Zuul网关
1.spring-cloud的微服务大致是 2.zuul是 Netflix开源的微服务网关, 它可以和 Eureka. Ribbon. Hystrix等组件配合使用.zul的核心是一系列的过滤器,这些 ...
- C# 多线程操作之异步委托
标签: 多线程任务nullstringhtml工作 2012-06-29 23:00 1276人阅读 评论(0) 收藏 举报 分类: C/C++/C#/dotnet(126) 目录(?)[+] ...
- AutoMapper introduction
http://automapper.org/ A convention-based object-object mapper映射. 100% organic and gluten-free. Take ...
- HTML:如何将网页分为上下两个部分
1.使用table: <table> <tr> <td height="80%"><jsp:include page=" ...