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的核心思想是把求解低维空间上的高维分类器转化为求解高维函数空间上的线性 ...
随机推荐
- JasperReport编译报表设计5
我们在前面的章节中产生的JasperReport模板(JRXML文件).这个文件不能直接用于生成报告.它必须被编译成JasperReport的“本地二进制"格式,称为Jasperfile.在 ...
- TZOJ 3522 Checker Challenge(深搜)
描述 Examine the 6x6 checkerboard below and note that the six checkers are arranged on the board so th ...
- hdu1233还是畅通工程
还是畅通工程 Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Sub ...
- 二进制日志过期时间设置expire_logs_days
# expire_logs_days参数只支持整数,且范围是[0,99] show variables like 'expire_logs_days';set global expire_logs_d ...
- js图片碎片效果(移动端也适用)
<!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content ...
- 玩转 Django2.0 笔记1
模板静态 路由 urls.py urlpatterns = [ path("<year>/<int:month>/<slug:day>",my ...
- Django+小程序技术打造微信小程序助手
Django+小程序技术打造微信小程序助手 整个课程都看完了,当前这个课程的分享可以往下看,下面有某盘的链接,之前做java开发也做了一些年头,也分享下自己看这个视频的感受,同时也分享下自己的总结 ...
- Oracle存储函数,存储过程
一.Oracle存储函数:存储的PL/SQL语法块,完成特定的功能.1.语法: 函数关键字: function (1)创建函数 CREATE [OR REPLACE] FUNCTION <fun ...
- oracle常用的时间格式转换
1:取得当前日期是本月的第几周 select to_char(sysdate,'YYYYMMDD W HH24:MI:SS') from dual; TO_CHAR(SYSDATE,'YY') se ...
- NOIP模拟17.9.21
NOIP模拟17.9.21 3 58 145 201 161.5 样例输出21.6 数据规模及约定对于40% 的数据,N <= 20对于60% 的数据,N <= 1000对于100% 的数 ...