Educational Codeforces Round 26 Problem A
A. Text Volumetime limit per test1 second
memory limit per test256 megabytes
inputstandard input
outputstandard output
You are given a text of single-space separated words, consisting of small and capital Latin letters.
Volume of the word is number of capital letters in the word. Volume of the text is maximum volume of all words in the text.
Calculate the volume of the given text.
InputThe first line contains one integer number n (1 ≤ n ≤ 200) — length of the text.
The second line contains text of single-space separated words s1, s2, ..., si, consisting only of small and capital Latin letters.
OutputPrint one integer number — volume of text.
Examplesinput7
NonZEROoutput5input24
this is zero answer textoutput0input24
Harbour Space Universityoutput1NoteIn the first example there is only one word, there are 5 capital letters in it.
In the second example all of the words contain 0 capital letters.
题目大意:输出所给字符串中大写字符最多的数量
输入输出的入门题。
1 #include<iostream>
2 #include<stdio.h>
3 using namespace std;
4 int main(){
5 int n;
6 char a[300];
7 cin>>n;
8 char c;
9 c=getchar();
10 gets(a);
11 int mx=0;
12 for(int i=0;i<n;i++){
13 int tmp=0;
14 while(a[i]!=' '&&i<n){
15 if(a[i]>='A'&&a[i]<='Z'){
16 tmp++;
17 }
18 i++;
19 }
20 mx=max(mx,tmp);
21 }
22 cout<<mx<<endl;
23 return 0;
24 }
Educational Codeforces Round 26 Problem A的更多相关文章
- Educational Codeforces Round 26
Educational Codeforces Round 26 困到不行的场,等着中午显示器到了就可以美滋滋了 A. Text Volume time limit per test 1 second ...
- CodeForces 837F - Prefix Sums | Educational Codeforces Round 26
按tutorial打的我血崩,死活挂第四组- - 思路来自FXXL /* CodeForces 837F - Prefix Sums [ 二分,组合数 ] | Educational Codeforc ...
- CodeForces - 837E - Vasya's Function | Educational Codeforces Round 26
/* CodeForces - 837E - Vasya's Function [ 数论 ] | Educational Codeforces Round 26 题意: f(a, 0) = 0; f( ...
- CodeForces 837D - Round Subset | Educational Codeforces Round 26
/* CodeForces 837D - Round Subset [ DP ] | Educational Codeforces Round 26 题意: 选k个数相乘让末尾0最多 分析: 第i个数 ...
- Educational Codeforces Round 32 Problem 888C - K-Dominant Character
1) Link to the problem: http://codeforces.com/contest/888/problem/C 2) Description: You are given a ...
- Educational Codeforces Round 26 [ D. Round Subset ] [ E. Vasya's Function ] [ F. Prefix Sums ]
PROBLEM D - Round Subset 题 OvO http://codeforces.com/contest/837/problem/D 837D 解 DP, dp[i][j]代表已经选择 ...
- Educational Codeforces Round 26 B,C
B. Flag of Berland 链接:http://codeforces.com/contest/837/problem/B 思路:题目要求判断三个字母是否是条纹型的,而且宽和高相同,那么先求出 ...
- Educational Codeforces Round 21 Problem E(Codeforces 808E) - 动态规划 - 贪心
After several latest reforms many tourists are planning to visit Berland, and Berland people underst ...
- Educational Codeforces Round 21 Problem D(Codeforces 808D)
Vasya has an array a consisting of positive integer numbers. Vasya wants to divide this array into t ...
- Educational Codeforces Round 21 Problem A - C
Problem A Lucky Year 题目传送门[here] 题目大意是说,只有一个数字非零的数是幸运的,给出一个数,求下一个幸运的数是多少. 这个幸运的数不是最高位的数字都是零,于是只跟最高位有 ...
随机推荐
- fastapi启动后访问docs不显示页面的问题
笔者之前正常使用fastapi的docs接口进行各种接口调试,使用很正常,之前安装也都是正常安装流程,没有做任何修改,可以突然有一天不知道为啥,docs接口打开是空白的,接口也没有报错,就是空白,摸索 ...
- QA|20211013|SecureCRT:如图,有很多^,中文显示有问题,乱码,如何解决
Q1:如图,有很多^,中文显示有问题,乱码,如何解决 Q2:securecrt的vi展示有问题:少很多字.有很多^M和^,光标无法移动到最右侧 A: 首先检查当前编码格式: 1 echo $LANG ...
- Storm整合Kafka Java API源码
1.Maven项目的pom.xml源码如下: <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi=&qu ...
- Nextcloud 维护管理
Nextcloud 维护管理 目录 Nextcloud 维护管理 1.管理员被禁用怎么办 2.管理员密码忘了怎么办 1.管理员被禁用怎么办 通过命令行解禁管理员用户: 方法一:通过命令行解禁管理员用户 ...
- 【逆向专题】【危!!!刑】(一)使用c#+Win32Api实现进程注入到wechat
引言 自从上篇使用Flaui实现微信自动化之后,这段时间便一直在瞎研究微信这方面,目前破解了Window微信的本地的Sqlite数据库,使用Openssl,以及Win32Api来获取解密密钥,今天作为 ...
- 织梦DEDEBIZ调用全站文章数量
织梦DEDEBIZ如何调用全站文章数量{dede:sql sql="select count(*) as c from biz_archives} 共有文章:[field:c/] 篇 {/d ...
- 「luogu - P3911」最小公倍数之和
link. Denote \(cnt_{x}\) = the number of occurrences of \(x\), \(h\) = the maximum of \(a_i\), there ...
- TDengine 用户案例合集 | 智能环保项目的时序数据处理难点与优化实践
智能环保系统通常涉及大量的传感器和监测设备,以收集环境数据并对其进行分析和处理,这些数据通常是时序数据,即在一段时间内按时间顺序生成的数据,规模庞大且要求快速准确地进行分析和处理.也因此时序数据处理是 ...
- Centos7使用s3fs-fuse挂载minio对象存储实践
Centos7使用s3fs-fuse挂载minio对象存储实践 事前准备 主机可以访问到对象存储API.例如minio默认的9000端口 主机安装好s3fs软件 已在minio上创建存储桶 安装s3f ...
- MySQL实战实战系列 06 全局锁和表锁 :给表加个字段怎么有这么多阻碍?
今天我要跟你聊聊 MySQL 的锁.数据库锁设计的初衷是处理并发问题.作为多用户共享的资源,当出现并发访问的时候,数据库需要合理地控制资源的访问规则.而锁就是用来实现这些访问规则的重要数据结构. 根据 ...