[Logo] Mendo Judge Discussion Board - Forums
  [Search] Search   [Recent Topics] Recent Topics   [Hottest Topics] Hottest Topics   [Members]  Member Listing   [Groups] Back to home page 
What the hell ?!  XML
Forum Index » Други задачи
Author Message
Perez



Joined: 18/10/2014 18:53:59
Messages: 93
Offline

A. Text Volume
time 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.
Input
The 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.
Output
Print one integer number — volume of text.
Examples
Input
7
NonZERO
Output
5
Input
24
this is zero answer text
Output
0
Input
24
Harbour Space University
Output
1
Note
In 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



http://prntscr.com/g7jixy
http://prntscr.com/g7jj21

Како е можно ова ?
MOI



Joined: 07/07/2010 16:31:48
Messages: 447
Offline

Perez wrote:Како е можно ова ?

Баш и не пробав да ја прочитам задачата од почеток, ама мислам дека имаш проблеми со читатењето на влезните податоци.
1. text[n] е подобро да е text[n+1], поради http://mendo.mk/Lecture.do?id=21 (види "Низи од знаци")
2. Мислам дека кога читаме со cin >> str, читањето се врши до првото празно место или нов ред и слично.

Можеби нешто вака би било подобро:
Perez



Joined: 18/10/2014 18:53:59
Messages: 93
Offline

А уште полесно со stringче?!
 
Forum Index » Други задачи
Go to:   
Powered by JForum 2.1.8 © JForum Team