Search found 67 matches
- Tue Sep 07, 2004 2:32 am
- Forum: Volume 5 (500-599)
- Topic: 545 - Heads
- Replies: 67
- Views: 43854
That a problem is a multiple input is never told in any problem description. But if you check http://online-judge.uva.es/cgi-bin/OnlineJudge?Volume:5 Then you'll see a checkmark besides each question. And if you look at the very top you'll see a key for what they mean, and a link to what Multiple In...
- Fri Sep 03, 2004 4:01 pm
- Forum: Volume 5 (500-599)
- Topic: 594 - One Little, Two Little, Three Little Endians
- Replies: 46
- Views: 13420
There's probably an end-of-line character at the end of the data. You should always make your solution not depend on there being/not being one. So after it reads the last number, there's still that last character, the end-of-line. So the feof() returns false. But the next iteration you don't read a ...
- Fri Sep 03, 2004 3:52 pm
- Forum: Volume 5 (500-599)
- Topic: 534 - Frogger
- Replies: 41
- Views: 17745
- Tue Aug 31, 2004 3:03 pm
- Forum: Volume 7 (700-799)
- Topic: 751 - Triangle War
- Replies: 17
- Views: 7685
Ok, this is kind of confusing, but here is what's happening. The problem is multiple input, so you should first read the number of data sets. Each data set involves a number of cases. The sample input only shows the number of cases, it doesn't show the number of data sets. So you need to read anothe...
- Mon Aug 30, 2004 3:07 am
- Forum: Volume 7 (700-799)
- Topic: 790 - Head Judge Headache
- Replies: 49
- Views: 14693
Just adding this because the problem description was not very descriptive:
Assume that every team with a number between 1 and T exists, where T is the largest team number in the input case.
If a team has multiple submissions at the same contest time, consider all off the Y's to happen after the N's.
Assume that every team with a number between 1 and T exists, where T is the largest team number in the input case.
If a team has multiple submissions at the same contest time, consider all off the Y's to happen after the N's.
- Mon Aug 30, 2004 2:47 am
- Forum: Volume 6 (600-699)
- Topic: 630 - Anagrams (II)
- Replies: 25
- Views: 6367
- Sat Aug 28, 2004 9:13 pm
- Forum: Volume 4 (400-499)
- Topic: 468 - Key to Success
- Replies: 33
- Views: 4228
- Sat Aug 28, 2004 8:54 pm
- Forum: Volume 4 (400-499)
- Topic: 468 - Key to Success
- Replies: 33
- Views: 4228
One thing I noticed is that you have:
I assume 26 is there because there are 26 letters. But this problem says that capital are distinct from lowercase, so this should be 52
Code: Select all
for(i=0;i<26;i++)
- Sat Aug 28, 2004 6:32 am
- Forum: Volume 7 (700-799)
- Topic: 715 - Substitution Cipher
- Replies: 9
- Views: 5148
- Fri Aug 27, 2004 3:06 pm
- Forum: Volume 7 (700-799)
- Topic: 734 - The Programmer's Hex
- Replies: 8
- Views: 3735
Gadalada, Nope, there are no catches. Mine swapped D & E also, but got AC. Ming, What I did was basically try each permutation of hexagons on every peg and each rotation of all the hexagons. Of course if you just do this then you'll time out. Luckily there are a lot of configurations that don't work...
- Fri Aug 27, 2004 10:43 am
- Forum: Volume 2 (200-299)
- Topic: 202 - Repeating Decimals
- Replies: 82
- Views: 10928
GPI, I copied your code and put it through my compiler and then ran it against the sample input. The answers all looked correct except the pattern length always seemed to lag a test case behind. For example, the output for test case 2 was case 1's pattern length. I think the cause is: [cpp]cout << n...
- Fri Aug 27, 2004 10:23 am
- Forum: Volume 6 (600-699)
- Topic: 640 - Self Numbers
- Replies: 47
- Views: 18139
- Thu Aug 26, 2004 7:09 pm
- Forum: Volume 6 (600-699)
- Topic: 640 - Self Numbers
- Replies: 47
- Views: 18139
- Thu Aug 26, 2004 6:41 pm
- Forum: Volume 7 (700-799)
- Topic: 751 - Triangle War
- Replies: 17
- Views: 7685
- Mon Aug 23, 2004 8:27 am
- Forum: Volume 7 (700-799)
- Topic: 709 - Formatting Text
- Replies: 5
- Views: 3877
I think this problem is fairly straight forward. A hint would be, for each word, see how good you can do if the message started with just that word. Also remember to satisfy the condition: If there are several ways to format a paragraph with the same badness, use the following algorithm to choose wh...