Search found 47 matches
- Thu Oct 07, 2004 2:08 pm
- Forum: Volume 104 (10400-10499)
- Topic: 10433 - Automorphic Numbers
- Replies: 41
- Views: 28309
- Thu Oct 07, 2004 8:37 am
- Forum: Volume 104 (10400-10499)
- Topic: 10436 - Cheapest way
- Replies: 18
- Views: 8533
- Tue Sep 28, 2004 4:56 pm
- Forum: Volume 104 (10400-10499)
- Topic: 10440 - Ferry Loading II
- Replies: 10
- Views: 8887
- Thu Aug 26, 2004 12:22 pm
- Forum: Volume 5 (500-599)
- Topic: 590 - Always on the run
- Replies: 12
- Views: 8609
I just finished it. You may not consider it as a graph problem. Just for each day calculate the min cost from paris to other cities. Surely you can get min cost from paris after first day. Then for the second day from the results we just calculate it's easy to get the min cost for every city after t...
- Wed Aug 18, 2004 12:38 pm
- Forum: Volume 106 (10600-10699)
- Topic: 10682 - Forró Party
- Replies: 14
- Views: 11333
BFS works for this problem. Better to use adjcent table than adjacent matrix. Though there is no mutiple edges between two citis in the judge's input or it doesn't effect the anwser if you use adjacent matrix You can assume that A and B are not the same city and can exist more than one road between ...
- Mon Aug 16, 2004 3:34 pm
- Forum: Volume 3 (300-399)
- Topic: 383 - Shipping Routes
- Replies: 27
- Views: 9631
- Wed Aug 11, 2004 11:40 am
- Forum: Volume 5 (500-599)
- Topic: 598 - Bundling Newspapers
- Replies: 25
- Views: 11639
- Tue Aug 10, 2004 12:42 pm
- Forum: Volume 5 (500-599)
- Topic: 587 - There's treasure everywhere!
- Replies: 37
- Views: 6151
try this input 10NW,10NE,10SW,10SE. if you use windows + VC++ you may get 0.000 but with linux + gcc you get -0.000 which causes WA. The reason is the difference between the two compiler when processing 'double' multiplication or you can just mention it precision error. solution: you may initial x, ...
- Sat Aug 07, 2004 8:18 am
- Forum: Volume 5 (500-599)
- Topic: 545 - Heads
- Replies: 67
- Views: 51870
I got tons of WAs before AC. Algorithm is just the same as 474. My friend got AC and we have the same answer for all n (1<=n<=9000) on windows XP + VC++6.0. But the judge always said WA. Then I find the special precison lost when n = 6 and n = 7 which means 2^-6 = 1.56250E-2 2^-7 = 7.81250E-3 you ha...
- Thu Aug 05, 2004 9:36 am
- Forum: Volume 5 (500-599)
- Topic: 568 - Just the Facts
- Replies: 39
- Views: 20517
Just factor 2 and factor 5 make 0s in the result and obviously factor 2 is more than factor 5 in the factorial. Think about the last digits which don't contain 2 or 5s then add num(2) - num(5) 2s to the result and get the answer. num(n) how many factor ns in the factorial. hope it can help good luck
- Wed Aug 04, 2004 2:47 pm
- Forum: Volume 5 (500-599)
- Topic: 550 - Multiplying by Rotation
- Replies: 7
- Views: 5020
There may be 0 or 1 (special cases) in the judge's test data. It may cause your program run into infinite loop. It cause my program WA for many times. :( Finally get AC and find the program run quite fast. :D D ------> last digit X ------> digits before D if X is only one digit then (X * base + D) *...
- Tue Aug 03, 2004 1:19 pm
- Forum: Volume 4 (400-499)
- Topic: 465 - Overflow
- Replies: 104
- Views: 35709
- Tue Aug 03, 2004 4:59 am
- Forum: Volume 3 (300-399)
- Topic: 332 - Rational Numbers from Repeating Fractions
- Replies: 83
- Views: 30505
- Tue Aug 03, 2004 3:47 am
- Forum: Volume 100 (10000-10099)
- Topic: 10042 - Smith Numbers
- Replies: 75
- Views: 31843
- Tue Aug 03, 2004 3:39 am
- Forum: Volume 100 (10000-10099)
- Topic: 10042 - Smith Numbers
- Replies: 75
- Views: 31843