Search found 17 matches

by Shih-Chia Cheng
Tue Sep 17, 2002 4:07 am
Forum: Volume 101 (10100-10199)
Topic: 10170 - The Hotel with Infinite Rooms
Replies: 20
Views: 9776

Since you have found the equation and you can solve it using little mathematics. You need only one line to produce the correct answer, don't you?
yatsen wrote:Can you post your solution?
Thanks! :D
by Shih-Chia Cheng
Tue Sep 17, 2002 3:58 am
Forum: Volume 103 (10300-10399)
Topic: 10331 - The Flyover Construction
Replies: 19
Views: 4942

He is referring to another problem "Power Transmission."
Not this one.
by Shih-Chia Cheng
Tue Sep 10, 2002 5:41 pm
Forum: Volume 103 (10300-10399)
Topic: 10349 - Antenna Placement
Replies: 16
Views: 7513

Thanks Yarin! I've solved it today using this different approach: Greed Algorithm: at each step choose the point of interest not covered which is adjacent to the biggest amount of points of interests which are not yet covered. If there is more than one point of interest with the same minimum, choos...
by Shih-Chia Cheng
Wed Aug 14, 2002 6:39 am
Forum: Volume 103 (10300-10399)
Topic: 10328 - Coin Toss
Replies: 19
Views: 7659

How do you send your program to the judge?
This may be a problem.
by Shih-Chia Cheng
Wed Aug 14, 2002 6:34 am
Forum: Volume 103 (10300-10399)
Topic: 10301 - Rings and Glue
Replies: 50
Views: 16277

Output "0 rings" instead of "0 ring". This is a matter of English grammar.
by Shih-Chia Cheng
Thu Aug 08, 2002 4:14 pm
Forum: Volume 101 (10100-10199)
Topic: 10165 - Stone Game
Replies: 6
Views: 2885

Re: 10165 - Stone Game

Hi, Can someone explain the solution to this problem ? it looks similar to the NIM-game. Thank you. Convert all numbers into binary sequences and list them all one in a row. Then you may think what the best strategy is for playing the game. If this is still obscure, consider the special case when t...
by Shih-Chia Cheng
Tue Aug 06, 2002 11:52 am
Forum: Volume 103 (10300-10399)
Topic: 10337 - Flight Planner
Replies: 20
Views: 8920

The airplane must land on arrival, the altitude of it thus must be zero at the destination.
by Shih-Chia Cheng
Fri Jul 26, 2002 3:05 am
Forum: Volume 102 (10200-10299)
Topic: 10240 - The n-Dimensional Cities
Replies: 10
Views: 5814

Finally I got AC!
Thanks for your great help! :D
Adrian Kuegel wrote:Yes, I think you misunderstood the description. The 50% is 50% of the number of roads, not of the length.
Try this input:
29 10 10
Output:
225 2303
by Shih-Chia Cheng
Fri Jul 26, 2002 2:24 am
Forum: Volume 102 (10200-10299)
Topic: 10240 - The n-Dimensional Cities
Replies: 10
Views: 5814

The problem says "there can be at most 50% circular roads and the number of them will be no more than straight ones." So let the number of circular roads be x and the length of a circular road be cl, I have the following formula: x*cl/(x*cl+(e-x)*dist) <= 0.5 after some algebra, we can get x <= (e*d...
by Shih-Chia Cheng
Thu Jul 25, 2002 3:55 pm
Forum: Volume 102 (10200-10299)
Topic: 10240 - The n-Dimensional Cities
Replies: 10
Views: 5814

I fixed my codes, but still wrong answer......
by Shih-Chia Cheng
Thu Jul 25, 2002 3:32 pm
Forum: Volume 102 (10200-10299)
Topic: 10240 - The n-Dimensional Cities
Replies: 10
Views: 5814

What's wrong with my codes???
Is my formula wrong???
Or another precision error???
by Shih-Chia Cheng
Sun Jul 21, 2002 6:24 pm
Forum: Volume 102 (10200-10299)
Topic: 10237 - Bishops
Replies: 7
Views: 4929

If you consider the problem ,which is about Root instead of Bishop, maybe it is easy. now ,you could rotate the board by 45 degrees , then youn could consider the Bishop like a Root. Good lucK!! hmm...I rotate the board by 45 degrees and then don't know what to do next... Can you explain how to use...
by Shih-Chia Cheng
Sun Jul 21, 2002 5:16 pm
Forum: Volume 103 (10300-10399)
Topic: 10327 - Flip Sort
Replies: 81
Views: 22681

Your algorithm is wrong, check your inner loop.
And there is no need to use big numbers.
by Shih-Chia Cheng
Sun Jul 07, 2002 1:12 am
Forum: Volume 103 (10300-10399)
Topic: 10319 - Manhattan
Replies: 9
Views: 5744

Yeah! I think you are right.
This problem can be formulated as a 2-SAT problem
and use dynamic programming to solve it. Thanx :D
by Shih-Chia Cheng
Sat Jul 06, 2002 2:39 pm
Forum: Volume 103 (10300-10399)
Topic: 10319 - Manhattan
Replies: 9
Views: 5744

10319 - Manhattan

I try to formulate this problem as a two-coloring problem. My idea is that I treat each pair of input point as a single node. And for each pair of node, if their desired paths may conflict, they are joined by an edge. Then I just check this graph to see if it is two-colorable. But this idea seems no...

Go to advanced search