Search found 13 matches

by SDiZ
Tue Jan 10, 2012 10:37 am
Forum: Volume 4 (400-499)
Topic: 462 - Bridge Hand Evaluator
Replies: 32
Views: 9710

Re: 462 Problem

Just FYI,

When you have two suit with same card number, pick it according to the order S-H-D-C.
I have tried picking D over S and got a WA.
by SDiZ
Tue Mar 01, 2011 10:16 am
Forum: Volume 2 (200-299)
Topic: 256 - Quirksome Squares
Replies: 30
Views: 4513

256, malformed judge input?

The test data is okay if I use

Code: Select all

while ((cin >> n)) {
 ...
}
but not

Code: Select all

while (1) {
   cin >> n;
   if (cin.eof()) break;

   ...
}
is this expected?
by SDiZ
Thu Jul 13, 2006 11:11 am
Forum: Volume 3 (300-399)
Topic: 315 - Network
Replies: 68
Views: 20962

I can't understand the test-cases posted above..... Can any one tell me why the test case: 5 3 2 1 3 1 2 4 5 3 5 3 4 0 have the output 1 3 Number of Articulaion point=1 I think there is no articulaion points ! see : http://www.sdiz.net/temp/315.png After removing point 3, the graph is still connecte...
by SDiZ
Mon Sep 12, 2005 2:01 am
Forum: Volume 102 (10200-10299)
Topic: 10278 - Fire Station
Replies: 59
Views: 20453

N|N0 wrote:What did you use instead of Floyd?
Did you try placing a firestation on every empty intersection and running special-Dijkstra?
Or just used some other all-pairs algorithm and then doing the job...

I just use Dijkstra on every feasible sol'n
by SDiZ
Fri Aug 26, 2005 12:03 pm
Forum: Other words
Topic: compiler version and how judges compile codes
Replies: 1
Views: 1040

It's using gcc-2.95, a very old version of gcc.
by SDiZ
Fri Aug 19, 2005 5:46 pm
Forum: Volume 102 (10200-10299)
Topic: 10278 - Fire Station
Replies: 59
Views: 20453

okay, i get A.C. eventally.
I didn't knew Floyd is that slow..
by SDiZ
Thu Aug 18, 2005 2:03 pm
Forum: Volume 102 (10200-10299)
Topic: 10278 - Fire Station
Replies: 59
Views: 20453

Observer wrote:Seems that you don't understand what I mean......

Floyd's certainly NOT the only way to compute all-pair shortest paths.
Floyd is the only all-pair shortest paths i know how to code. Or did you means useing a single-source, all destination algorithm and repeat N times?
by SDiZ
Wed Aug 17, 2005 6:36 pm
Forum: Volume 102 (10200-10299)
Topic: 10278 - Fire Station
Replies: 59
Views: 20453

I use an all-pair shortest path algorithm here, because i can update the new maximum distance in O(n) time. ( using the relation NewNearestDistanceFromCity = MIN( OldNearestDistanceFromCity , Distanace[ NewFireStation, i ] ) ) I have seen some post saying putting all firestation to a heap, and run d...
by SDiZ
Mon Aug 15, 2005 12:13 pm
Forum: Volume 102 (10200-10299)
Topic: 10278 - Fire Station
Replies: 59
Views: 20453

10278 - clarification needed.

I guess I may have misunderstood something on 10278 My understand 10278 is : Minimizing the maximum distance from all intersetion to it's nearest firestation. For example, Case 1: * = with firestation Assume all path are equal length [ 1 ] ------ [ 2 ] ------ [ 3* ] ------ [ 4 ] ------ [ 5 ] No matt...
by SDiZ
Fri Aug 12, 2005 7:29 pm
Forum: Volume 100 (10000-10099)
Topic: 10029 - Edit Step Ladders
Replies: 70
Views: 20495

AC

my program get AC after change from STL map to hash_map.

STL map in gcc use rb_tree, which is slow in inserting.
by SDiZ
Thu Aug 11, 2005 6:17 pm
Forum: Volume 100 (10000-10099)
Topic: 10029 - Edit Step Ladders
Replies: 70
Views: 20495

TLE

I get a TLE using any algorithm I have on mind, anyone can give me some hints?
I suspect my string ops are too slow, but i have no ide how to improve it.
by SDiZ
Thu Aug 11, 2005 2:09 pm
Forum: Volume 100 (10000-10099)
Topic: 10029 - Edit Step Ladders
Replies: 70
Views: 20495

editing step with Hash?

May anyone explain the "hash" method you use?

How do you check if two hash is an editing step?

or do you generate all possible editing steps? (i think this would be very large&slow)
by SDiZ
Fri Aug 05, 2005 12:22 pm
Forum: Volume 101 (10100-10199)
Topic: 10167 - Birthday Cake
Replies: 16
Views: 7219

10167 Birthday Cake

I got WA..
any one have good test case for this question?

Go to advanced search