Search found 34 matches

by shuniu
Fri Aug 06, 2004 11:34 pm
Forum: Volume 106 (10600-10699)
Topic: 10682 - Forró Party
Replies: 14
Views: 8942

In the third example two routes are possible: "Mossoro Paris Tokio" and "Mossoro NewYork Tokio", but because Paris appears earlier in the input than NewYork, you have to print the first route, not the second. Is the decision based on "Paris" appears before "NewYork" or "Mossoro Paris" appears befor...
by shuniu
Fri Aug 06, 2004 6:59 pm
Forum: Volume 106 (10600-10699)
Topic: 10682 - Forró Party
Replies: 14
Views: 8942

10682 - Forró Party

. If there is more than one route, print that where the cities appear first in the input (see the last input).
What does it mean?
by shuniu
Wed Jul 28, 2004 12:08 am
Forum: Volume 106 (10600-10699)
Topic: 10645 - Menu
Replies: 12
Views: 7448

My AC output: 46352.0 9 5 9 5 9 5 9 5 116619.0 26 11 26 11 26 1 26 1 26 1 26 1 26 84600.0 30 14 18 14 18 14 18 14 18 14 0.0 0.0 0.0 48910.0 17 32 17 31 17 31 17 16262.0 3 2 89081.0 13 20 13 2 13 2 13 2 13 2 0.0 68169.5 14 14 14 14 10 14 14 10 14 14 10 14 14 10 14 14 31928.5 18 18 18 18 18 18 18 18 1...
by shuniu
Tue Jul 13, 2004 7:00 pm
Forum: Volume 106 (10600-10699)
Topic: 10655 - Contemplation - Algebra
Replies: 42
Views: 10307

The fact you use "double" and "long double" to store intermediate results are quite dangerous for this prob, cause the result requires very high precision. Here are some test cases I think your program generates close but not precise results: 504 8562 7 732 3058 6 165 4604 8 854 7611 6 673 1586 6 21...
by shuniu
Mon Jul 12, 2004 7:43 pm
Forum: Volume 106 (10600-10699)
Topic: 10655 - Contemplation - Algebra
Replies: 42
Views: 10307

You should check if you are really get WA and not Runtime Error. I used to get WA for this prob when there was a stack overflow exception. Input: 83 104 2 83 104 3 83 104 4 164 26 2 164 26 3 164 26 4 33 7 2 33 7 3 33 7 4 155 32 2 155 32 3 155 32 4 11 190 2 11 190 3 11 190 4 523 75 2 523 75 3 523 75 ...
by shuniu
Fri Jul 02, 2004 9:01 pm
Forum: Volume 2 (200-299)
Topic: 202 - Repeating Decimals
Replies: 82
Views: 10457

202 - Correcting the PE

I noticed lots of people got PE on 202. Reason is that the problem left out some details in the output format. The tricky thing being, there should be an empty line FOLLOWING each test case (notice it is FOLLOWING, not "between" like most problems). The sample output looks like this: 76/25 = 3.04(0)...
by shuniu
Tue Jun 29, 2004 10:07 pm
Forum: Volume 106 (10600-10699)
Topic: 10676 - Grid Points
Replies: 4
Views: 2059

10676 - Grid Points

Can somebody clarify the phrase: The only allowed (so it "looks nice") spacings of the grid points are 1, 2, 2.5 or 5 - or any multiple/divisible by 10 of these values. I interpret it as the allowed values being 1 $ a1 $ a2 $ a3 $ a4 $ a5 $ a6 $ a7 $ a8 $ a9 $ a10 where $ is either * or /, and a1 to...
by shuniu
Thu Jun 24, 2004 8:35 pm
Forum: Volume 1 (100-199)
Topic: 198 - Peter's Calculator
Replies: 11
Views: 3626

Thank you all! I get AC now. My program was actually processing the inputs correctly, but there was a problem on reading the input. Originally I thought I would stop when I reach an empty line, but it turned out empty lines are valid inputs too! Should have continued until hitting end of file. I got...
by shuniu
Thu Jun 24, 2004 6:37 pm
Forum: Volume 1 (100-199)
Topic: 198 - Peter's Calculator
Replies: 11
Views: 3626

BTW, my WA output to these inputs are as follows. I believe DM's AC outputs all end with UNDEF for the 6 cases, but mine always ends with a number. Output 1: UNDEF -13629 -13629 -231378 Output 2: -1326 UNDEF UNDEF UNDEF UNDEF -1326 -1326 UNDEF -445472878 Output 3: -32960 74 -580944 -580944 Output 4:...
by shuniu
Thu Jun 24, 2004 6:30 pm
Forum: Volume 1 (100-199)
Topic: 198 - Peter's Calculator
Replies: 11
Views: 3626

Thanks DM. I see there are some differences in my output compared to your version. But I don't understand why mine is wrong. I extracted some parts of the input that caused the difference, could you post your AC output to these? Thanks Again! Input 1: gHW := ( -72 + 0 - -444 - 57 ) - Aco* -17 C1 := ...
by shuniu
Wed Jun 23, 2004 10:51 pm
Forum: Volume 1 (100-199)
Topic: 198 - Peter's Calculator
Replies: 11
Views: 3626

The answer to that input should be 10,UNDEF,UNDEF,UNDEF,12,UNDEF. I highly doubt we need to do symbol manipulation prior to checking them. I spend quite sometime on this problem, and im still getting WA. Could someone post an AC output for the following input, Thanks! vuuY := 60 * 20+ ( -949) Cs5c4 ...
by shuniu
Sun Jun 20, 2004 4:18 pm
Forum: Volume 1 (100-199)
Topic: 162 - Beggar My Neighbour
Replies: 31
Views: 4853

thanx angga! i get AC now. There was an problem in my input parsing routine.
by shuniu
Sun Jun 20, 2004 5:01 am
Forum: Volume 1 (100-199)
Topic: 162 - Beggar My Neighbour
Replies: 31
Views: 4853

I get WA for this prob, can somebody help me out by posting an AC output to the following input? Thanks! Input (30 randomly generated test cases): S8 D8 HQ S6 HK C8 HT D4 H2 H7 SA D5 D3 CK H5 H4 C4 D6 S2 DA ST C6 D9 D2 DQ SQ S4 DJ CA C2 H9 C5 HA DK CJ H3 S9 C3 HJ SK CT CQ SJ C9 DT S7 S5 H8 S3 C7 D7 ...
by shuniu
Fri Jun 18, 2004 5:04 pm
Forum: Volume 106 (10600-10699)
Topic: 10661 - The Perspectographer
Replies: 21
Views: 7781

Here are some random generated test cases. Input: 20 18 143 N I Q G N B J I H C B I R Q Q O L I Q M D I A H Q H K J Q E C N A E B L J R K O L C D Q O E K F G R L O G P I C D M J H G M J C N Q C R H R M F Q P O P K Q J B I H F I L K F B F J L H O C D L E I N O F Q G N D P N K D F O R A P P I A R G I ...
by shuniu
Thu Jun 17, 2004 6:36 pm
Forum: Volume 106 (10600-10699)
Topic: 10661 - The Perspectographer
Replies: 21
Views: 7781

I used backtracking for this problem. First assume one color is enough, then proceed to color each vertex with the color, each time checking whether the coloring is valid. If one color does not suffice, assume two colors. color the first vertex with color 0. color the second vertex with color 0, if ...

Go to advanced search