hdu2026(water~~)
http://acm.hdu.edu.cn/showproblem.php?pid=2026
#include<iostream>
#include<stdio.h>
#include<math.h>
#include<string.h>
#include<stdlib.h>
using namespace std; int main()
{
//freopen("in.txt","r",stdin);
char a;
int count=;
while(~scanf("%c",&a))
{
if(a=='\n')
{
count=;
printf("\n");
continue;
}
else if(a==' ')
count=;
if(a>='a' && a<='z' && count==)
{
a-=;
count=;
}
printf("%c",a);
}
return ;
}
hdu2026(water~~)的更多相关文章
- [LeetCode] Pacific Atlantic Water Flow 太平洋大西洋水流
Given an m x n matrix of non-negative integers representing the height of each unit cell in a contin ...
- [LeetCode] Trapping Rain Water II 收集雨水之二
Given an m x n matrix of positive integers representing the height of each unit cell in a 2D elevati ...
- [LeetCode] Water and Jug Problem 水罐问题
You are given two jugs with capacities x and y litres. There is an infinite amount of water supply a ...
- [LeetCode] Trapping Rain Water 收集雨水
Given n non-negative integers representing an elevation map where the width of each bar is 1, comput ...
- [LeetCode] Container With Most Water 装最多水的容器
Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). ...
- 如何装最多的水? — leetcode 11. Container With Most Water
炎炎夏日,还是呆在空调房里切切题吧. Container With Most Water,题意其实有点噱头,简化下就是,给一个数组,恩,就叫 height 吧,从中任选两项 i 和 j(i <= ...
- 【leetcode】Container With Most Water
题目描述: Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ...
- [LintCode] Trapping Rain Water 收集雨水
Given n non-negative integers representing an elevation map where the width of each bar is 1, comput ...
- [LintCode] Container With Most Water 装最多水的容器
Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). ...
随机推荐
- 1.Ubuntu查看Python版本
1.输入命令:ls -l /usr/bin/python*
- 洛谷 2922 BZOJ 1590 [USACO08DEC]秘密消息Secret Message
[题意概述] 给出n个01串组成的字典和m个询问,每次询问某个01串和多少个字典中的串有相同的前缀.(前缀长度是两串中较小的部分) [题解] 直接上Trie树即可.树上每个节点记录两个信息:这个节点有 ...
- [bzoj1878][SDOI2009][HH的项链] (莫队算法)
Description HH有一串由各种漂亮的贝壳组成的项链.HH相信不同的贝壳会带来好运,所以每次散步 完后,他都会随意取出一段贝壳,思考它们所表达的含义.HH不断地收集新的贝壳,因此, 他的项链变 ...
- saltstack(七)返回值
一.自定义创建模块 在base目录下创建_modules目录,你自己编写的模块都可以存放在该目录下,当前目录结构下: 1 2 3 4 5 6 7 8 [root@localhost:]# tree - ...
- AC自动机模板浅讲
Description 给你N个单词,然后给定一个字符串,问一共有多少单词在这个字符串中出现过(输入相同的字符串算不同的单词,同一个单词重复出现只计一次). Input 第一行一个整数N,表示给定单词 ...
- ssc项目Python爬虫心得
###今日心得 ####time.datetime 1.字符串格式到标准化格式:time.strptime(str, "%Y%m%d") 2.今天的标准化格式:today = da ...
- JavaSE 学习笔记之网络编程(二十三)
端口: 物理端口: 逻辑端口:用于标识进程的逻辑地址,不同进程的标识:有效端口:0~65535,其中0~1024系统使用或保留端口. java 中ip对象:InetAddress. import ja ...
- 程序员如何在百忙中更有效地利用时间,如何不走岔路,不白忙(忙得要有效率,要有收获)-----https://www.cnblogs.com/JavaArchitect/p/9080484.html
https://www.cnblogs.com/JavaArchitect/p/9080484.html 程序员如何在百忙中更有效地利用时间,如何不走岔路,不白忙(忙得要有效率,要有收获)
- [luoguP2434] [SDOI2005]区间(贪心)
传送门 简单贪心 ——代码 #include <cstdio> #include <iostream> #include <algorithm> int n, l, ...
- [K/3Cloud]ksql翻译札记
2011-11-16 又学一招,集合转化临时表的方法: var sql = string.Format(@"select b.FENTRYID,a.{2} from {0} a inner ...