Search found 14 matches

by hewei
Tue Apr 04, 2006 2:44 pm
Forum: Volume 110 (11000-11099)
Topic: 11025 - Mr. And Mrs. Hamilton
Replies: 21
Views: 9863

11025 - Mr. And Mrs. Hamilton

From the sample input/output, I inferred that the author assumed the probability of Mr. Smith's waiting at certain intersection was totally (thus only) decided by the degree of the intersection, given that Mr. Smith had walked long enough before he stopped. However, I've got a different opinion that ...
by hewei
Sat Oct 11, 2003 4:43 pm
Forum: Volume 105 (10500-10599)
Topic: 10562 - Undraw the Trees
Replies: 18
Views: 10514

Hello, windows2k!
The bug in your code is really difficult to trace,:)
See the sample:
input:
2
A
|
---
B C
#
A
|
---
B
#

output:
(A(B()C()))
(A(B()))

instead of yours:
(A(B()C()))
(A(B()C()))


Till now, you will have got to know what is all happening to your program. You forgot to ...
by hewei
Sat Oct 11, 2003 3:45 am
Forum: Volume 105 (10500-10599)
Topic: 10566 - Crossed Ladders
Replies: 39
Views: 16252

Well, as far as I see, to find a nice formula is as difficult as to solve the equation below:

(when x is not equal to y)
(x*x - l*l) * sqrt(y*y - l*l) - (y*y - l*l) * sqrt(x*x - l*l) = c*(x*x - y*y)

but, when x equals y, the problem becomes obviously trivial:
l = sqrt(x*x - 4*c*c)
by hewei
Thu Oct 09, 2003 5:37 pm
Forum: Volume 105 (10500-10599)
Topic: 10566 - Crossed Ladders
Replies: 39
Views: 16252

Hi, Farid Ahmadov!
There was a fault in your proof:
From 6th line: a/b = a1/b1 = z
To 7th line: r/c = c/r1/ = z*z

The process 6th -> 7th requires the angle you noted in the graph to be right, i.e. 90 degrees.

That's why the formula is even not suitable for the sample, isn't it?
by hewei
Thu Oct 09, 2003 4:49 pm
Forum: Volume 105 (10500-10599)
Topic: 10562 - Undraw the Trees
Replies: 18
Views: 10514

Hello, Subeen!
You have carelessly assumed:
1. All the labels of the tree is different since it was that in the sample.
2. Total number of nodes in a tree will not exceed 210 as you have declared the array "abc" to contain only 210 elements.

Theoretically, both of the two points above will stop you ...
by hewei
Thu Oct 09, 2003 12:38 pm
Forum: Other words
Topic: Overloaded judge during contests
Replies: 21
Views: 6342

But, kuasha, how to report the result on the status page for those who fails at the "volunteer judges"? Insufficient judge data may easily lead to improper status info.
by hewei
Thu Oct 09, 2003 6:28 am
Forum: Other words
Topic: Overloaded judge during contests
Replies: 21
Views: 6342

2hewei
Actually, I used dynamic programming. The running time is O(N^4) (however the inner loop contains a few operations, so the constant is small and there is no TL), and the used memory is O(N^3) (at first I had array int [210][210][210] and that caused ML - it was quite annoying). If you want ...
by hewei
Thu Oct 09, 2003 6:12 am
Forum: Volume 105 (10500-10599)
Topic: 10562 - Undraw the Trees
Replies: 18
Views: 10514

Not at all, :)
by hewei
Wed Oct 08, 2003 5:06 pm
Forum: Volume 105 (10500-10599)
Topic: 10562 - Undraw the Trees
Replies: 18
Views: 10514

Hi, sharklu2000. I noticed that you assume that the children of a same parent node will be at least a 'space' apart. But since this is not specially mentioned in the desciption, I think there could be such situations where the children are sticked together. For example:

The input

A
|
--
BC ...
by hewei
Wed Oct 08, 2003 3:50 pm
Forum: Other words
Topic: Overloaded judge during contests
Replies: 21
Views: 6342

Hi, Alexander. I fully agree with you that the OJ should be improved with its performance. By the way, if I may ask, how do you solve problem A Blocks? Do you make use of any heuristic searching strategy like A*? Thanks.
by hewei
Wed Oct 08, 2003 3:16 pm
Forum: ACM ICPC Archive Board
Topic: Test data for problem 2516 Sly Number may be incorrect!
Replies: 7
Views: 2416

I'm sorry, sduval. I also made a mistake and I have corrected my last reply. :D
by hewei
Wed Oct 08, 2003 8:16 am
Forum: ACM ICPC Archive Board
Topic: Test data for problem 2516 Sly Number may be incorrect!
Replies: 7
Views: 2416

[quote="sduval"]Hi,

I found that output file for pb 2516 was wrong... The input/output files for
this problem seem to be the files I've found at http://www.cs.duke.edu/courses/fall02/cps149s/problems/see2002/Problems/.
I got AC with simply printing the 15 strings of the ouput file... ;-)
Actually ...
by hewei
Thu Sep 25, 2003 2:12 pm
Forum: Other words
Topic: Is this a bug?
Replies: 0
Views: 706

Is this a bug?

The memory usage of the following code shown on the OnlineJudge's status page is 64 kB! I believe there was something wrong.

Code: Select all

int A[1024][1024];

int main()
{
	int i, j;
	for (i = 0; i < 1024; i++)
	{
		for (j = 0; j < 1024; j++)
		{
			A[i][j] = i + j;
		}
	}
	return 0;
}
by hewei
Tue Jul 15, 2003 4:55 pm
Forum: ACM ICPC Archive Board
Topic: Test data for problem 2516 Sly Number may be incorrect!
Replies: 7
Views: 2416

Test data for problem 2516 Sly Number may be incorrect!

I found out that the test data for problem 2516 Sly Number might be the same as provided by the ACM/ICPC problem archive or something like that. But I think this set of test data for "Sly Number" is incorrect and the only two submitters who got AC on this problem probably printed out the "answer ...

Go to advanced search