Search found 30 matches

by rickyliu
Wed Jan 03, 2007 1:49 pm
Forum: Volume 1 (100-199)
Topic: 152 - Tree's a Crowd
Replies: 30
Views: 4016

IIRC, the initialization may only initialize the first element in C to 0. But in C++, it should initialize all elements to 0 according to the standard. I did use -Wall when compiling but no warning messages were received. Anyway, I have changed the initialization of result[10] to the one you suggest...
by rickyliu
Wed Jan 03, 2007 6:15 am
Forum: Volume 1 (100-199)
Topic: 152 - Tree's a Crowd
Replies: 30
Views: 4016

152 - C++ compiler problem?

I submitted the same program in C and C++. Former got AC but latter got WA. Is it something wrong with the C++ compiler? For details, please read this thread: http://online-judge.uva.es/board/viewtopic.php?t=13656
by rickyliu
Wed Jan 03, 2007 6:09 am
Forum: Volume 1 (100-199)
Topic: 113 - Power of Cryptography
Replies: 163
Views: 17035

Your program cannot solve the last case of the sample input. Consider using log.
by rickyliu
Tue Jan 02, 2007 9:51 am
Forum: Volume 1 (100-199)
Topic: 152 - Tree's a Crowd
Replies: 30
Views: 4016

I got AC but I did not feel happy. I managed to find the input and output of the judge used. I have verified this by just sending the output line and got AC. Then, I verified with my program's output and found no differences. Since my compiler (GCC 3.4.2 mingw-special) changed the variable treeNum t...
by rickyliu
Mon Jan 01, 2007 3:43 pm
Forum: Volume 1 (100-199)
Topic: 152 - Tree's a Crowd
Replies: 30
Views: 4016

152 WA, please help

This problem seems simple. However, my brute force solution got WA. As the problem does not say explicitly, I assume the input can be in real numbers. My algorithm is as follows: 1. initialize result[] to 0 and read in all trees 2. for each tree i, find the minimum distance amongst all other trees a...
by rickyliu
Sat Dec 30, 2006 4:45 pm
Forum: Volume 1 (100-199)
Topic: 139 - Telephone Tangles
Replies: 66
Views: 8520

Am I right? Yes, you are right. It is ambiguous. Shouldn't use it for the testing input. Here are the other input/output for your reference: Input: 088925 Broadwood0000000baaaaaaad$81 03 Arrowtown $38 01 $24 0061 Australia$140 00852 Hong Kong.012345678901234$1111 00 Los Angelos$10 000000 031526 22 ...
by rickyliu
Sat Dec 30, 2006 4:05 pm
Forum: Volume 1 (100-199)
Topic: 150 - Double Time
Replies: 18
Views: 3908

Here are the testing input and the output from my AC program: Input: Saturday 1 January 1600 Tuesday 1 January 1600 Tuesday 29 February 2000 Sunday 12 March 2000 Monday 13 March 2000 Tuesday 14 March 2000 Thursday 31 December 2099 Wednesday 31 December 2099 Saturday 29 August 1992 Saturday 16 August...
by rickyliu
Mon Dec 18, 2006 3:49 pm
Forum: Volume 1 (100-199)
Topic: 139 - Telephone Tangles
Replies: 66
Views: 8520

I just found the problem and got AC. :D
For those got PE, please consider the case where the Local phone numbers with more than 10 digits.
by rickyliu
Mon Dec 18, 2006 1:16 pm
Forum: Volume 1 (100-199)
Topic: 139 - Telephone Tangles
Replies: 66
Views: 8520

139 PE

According to the problem statistics, there are 575 got PE but only 162 got AC! This problem must have a very tricky input that I cannot figure it out. I guessed it might be the locality names. I have tried zero length, leading spaces and spaces in between. I also verified with the output statements ...
by rickyliu
Mon Dec 18, 2006 1:05 pm
Forum: Volume 1 (100-199)
Topic: 139 - Telephone Tangles
Replies: 66
Views: 8520

You may have solved it. If not, try this: 0061 Australia$140 00 Los Angeles$10 000000 0061234 5 00612345 6 # My AC (though PE) program gave the following output: 0061234 Los Angeles 61234 5 0.10 0.50 00612345 Australia 2345 6 1.40 8.40 This is yours: 0061234 Unknown 5 -1.00 00612345 Australia 2345 6...
by rickyliu
Sun Oct 29, 2006 11:52 am
Forum: Volume 1 (100-199)
Topic: 108 - Maximum Sum
Replies: 233
Views: 24152

Thank you! You are very helpful. I finally got AC. :D

It runs (0.752) only slightly faster than the O(N^4) algorithm (0.891) previously accpeted. My ranking is 3,000+. I am wondering how those people ran so fast.
by rickyliu
Sat Oct 28, 2006 3:19 pm
Forum: Volume 1 (100-199)
Topic: 108 - Maximum Sum
Replies: 233
Views: 24152

Thank you for the test cases. I found my bugs. Now, my code shows 12 correctly for these cases. However, I still got WA. I am stuck. Any help, please. Here is my new code:

Code: Select all

* code removed *
by rickyliu
Wed Oct 25, 2006 2:35 pm
Forum: Volume 1 (100-199)
Topic: 109 - SCUD Busters
Replies: 96
Views: 24917

I think it may be the problem after the calling to sites.erase(). After the call, it will invalidate all iterators that refer to the following elements. So, the call should be changed as follows:

Code: Select all

iter = sites.erase(iter) - 1;
by rickyliu
Tue Oct 24, 2006 9:29 am
Forum: Volume 1 (100-199)
Topic: 108 - Maximum Sum
Replies: 233
Views: 24152

108 faster than O(N^4) but got WA

I have tried all the test inputs in this board and got the correct answers
but I got WA from the judge. Would anyone please provide more testing
cases or tell me what's wrong in my code:

Code: Select all

* code removed *
by rickyliu
Mon Oct 02, 2006 11:30 am
Forum: Volume 1 (100-199)
Topic: 103 - Stacking Boxes
Replies: 200
Views: 20982

My program outputs the correct answers for the sample input and the input from guitalover but I got a WA :cry:

Go to advanced search