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的核心思想是把求解低维空间上的高维分类器转化为求解高维函数空间上的线性 ...
随机推荐
- Xcode10 代码块(Code Snippet)添加和删除
https://blog.csdn.net/lg767201403/article/details/82761448 Code Snippets 使用 https://blog.csdn.net/lv ...
- Leetcode551.Student Attendance Record I学生出勤记录1
给定一个字符串来代表一个学生的出勤纪录,这个纪录仅包含以下三个字符: 'A' : Absent,缺勤 'L' : Late,迟到 'P' : Present,到场 如果一个学生的出勤纪录中不超过一个' ...
- Redis源码解析:29事务
Redis通过MULTl,EXEC,WATCH,DISCARD等命令来实现事务(transaction)功能. 事务从MULTI命令开始,之后,该客户端发来的其他命令会被排队,客户端发来EXEC命令之 ...
- NPOI 1.1
1 .NPOI 版本2.1 2. NPOI 读取execl 3.导入数据(SqlBulkCopy) 示例代码: public class ImportServerData { DataTable dt ...
- Faster RCNN 的细节补充
一.faster rcnn的结构 通过上面的结构,我们知道该faster rcnn前面以VGG16为框架,加入RPN层,最后做分类层. 采用VGG16相对ZF来说慢一点,但是精度也高一点. 二.RPN ...
- Java中字符串为什么不以\0结尾
Java中字符串为什么不以\0结尾 其实这个问题没有什么好说的,Java里面一切都是对象,是对象的话,字符串肯定就有长度,即然有长度,编译器就可以确定要输出的字符个数,当然也就没有必要去浪费那1字节的 ...
- os模块和sys模块
1.os模块与path有关:os.path.isfile():判断置顶对象是否为文件,是返回True,否返回Falseos.path.isdir():判断指定对象是否为目录,是返回True,否返回Fa ...
- js对象类型判断工具
对象类型判断工具 /** *类功能:对象类型判断工具 **/ var TypeUtil = { /** *方法说明:是否是数组 **/ isArray: function (obj) {//是否是数组 ...
- PHP快速导出Excel文件 (采用xlsx Writer)
<?php include_once("xlsxwriter.class.php"); ini_set('display_errors', 0); ini_set('log_ ...
- Swift 和 Objective-C 混编后对ipa包大小的影响
https://my.oschina.net/ilrrong/blog/800923 最近用Swift对以前写的一个应用进行重写,使用了Swift和Objective-C的混编,提交审核后发现比以前大 ...