imesecan | Oct.20.2012 at 10:55:31 AM
|
0 | Сообщение скрыто
|
imesecan | Oct.20.2012 at 11:03:34 AM | |
1 | Your program gives error on the first test. I checked your output and the pattern. The pattern seems correct.
Please check your program again.
|
imesecan | Oct.20.2012 at 11:38:29 AM
|
2 | Сообщение скрыто
|
imesecan | Oct.20.2012 at 11:46:26 AM | |
3 | It's OK to add or not? There is no difference. The checker reads as integer, and thus, space is ignored.
|
imesecan | Oct.20.2012 at 12:29:27 PM
|
4 | Сообщение скрыто
|
imesecan | Oct.20.2012 at 12:37:39 PM | |
5 | The test inputs are like the sample inputs from the question.
|
imesecan | Oct.20.2012 at 01:25:42 PM
|
6 | Сообщение скрыто
|
imesecan | Oct.20.2012 at 02:12:17 PM
|
7 | Сообщение скрыто
|
imesecan | Oct.20.2012 at 03:28:04 PM
|
8 | Сообщение скрыто
|
imesecan | Oct.20.2012 at 03:30:46 PM | |
9 | OK. Let me give the test case 1: Test input1: <p>For a research on languages, scientiests want to see which letters are used most. In order to make these letters calculations, write a program in which the user can write a text and the program shows the frequency of letters.</p>
<p><strong>Input specification</strong><br /> The input text can contain any character. You required to read until the end of file.</p>
The output is: A= 22 B= 1 C= 14 D= 6 E= 38 F= 6 G= 6 H= 13 I= 18 J= 0 K= 1 L= 8 M= 4 N= 21 O= 18 P= 9 Q= 2 R= 25 S= 19 T= 34 U= 10 V= 0 W= 6 X= 2 Y= 3 Z= 0
|
imesecan | Oct.20.2012 at 03:36:06 PM
|
10 | Сообщение скрыто
|
imesecan | Oct.20.2012 at 04:00:24 PM
|
11 | Сообщение скрыто
|
imesecan | Oct.20.2012 at 04:34:41 PM
|
12 | Сообщение скрыто
|
imesecan | Oct.20.2012 at 05:20:52 PM | |
13 | in C++ when you say, while(fin>>c) (in C you have similar structures) that reads the the chars until the end of file.
|
imesecan | Oct.20.2012 at 05:25:34 PM
|
14 | Сообщение скрыто
|
imesecan | Oct.20.2012 at 05:29:42 PM
|
15 | Сообщение скрыто
|
imesecan | Oct.20.2012 at 05:45:15 PM
|
16 | Сообщение скрыто
|
imesecan | Oct.20.2012 at 05:51:19 PM
|
17 | Сообщение скрыто
|
imesecan | Oct.20.2012 at 06:11:55 PM | |
18 | Yes, this ( while(fin>>c) ) is actually for reading an input from a file. As you said, the standard reading ( while(cin>>c) ) works here because the standard input and output are directed to files.
As you proposed, the question could be much understandable for standard input, if we have mentioned sth special that can be used to show the end of file (like the one ";" we have used in question four).
But you, are Olympiad students, you must be comfortable with reading from text files.
|
imesecan | Oct.20.2012 at 06:27:26 PM | |
19 | Your problem I think you are not comfortable with files. You use standard input while(getline(cin,t)) { if (t.empty()) ....
But, in the test input there was a line which contains nothing (an empty line). Thus, your code finishes reading there :(
As mentioned in the question you should have read until the end of file.
|