Search found 174 matches

by junbin
Sun Mar 07, 2004 9:43 am
Forum: Volume 8 (800-899)
Topic: 817 - According to Bartjens
Replies: 7
Views: 3364

-- edit -- ignore the below post.. 2000= should be impossible. :p silly one or more statemnets... anyway, I managed to get AC.. thanks to Adrian for pointing out. :p -- end edit -- I just reread the question for the 100th time and I figured that a line with only = cannot exist (since there must be 1...
by junbin
Sun Mar 07, 2004 8:29 am
Forum: Volume 8 (800-899)
Topic: 817 - According to Bartjens
Replies: 7
Views: 3364

The only special cases I can think of are: He is sure that whenever he wrote down a number (other than 0), it would not start with a zero. So 2*10*0100= could not have been one of his problems. He also knows he never wrote the number zero as anything but 0. So he would not have a problem like 2*1000...
by junbin
Sat Mar 06, 2004 10:25 pm
Forum: Volume 8 (800-899)
Topic: 817 - According to Bartjens
Replies: 7
Views: 3364

817 - According to Bartjens

I'm trying to solve q817 According to Bartjens without luck.. My algorithm uses brute force to generate all posibilities and then prints the ones that give 2000 as the answer.. but the judge gives WA. Can someone with AC please verify my output? Thank you! input: 398418986= 29961250= 268369264= 1288...
by junbin
Sat Mar 06, 2004 9:05 pm
Forum: Volume 101 (10100-10199)
Topic: 10135 - Herding Frosh
Replies: 33
Views: 12810

10135

I've been trying to solve q 10135 (Herding Frosh) without success. My method seems to be correct, and it works for all my test data, but for some weird reason, it gets WA. Can someone with AC please run the following test data through their program and give me the results? Thank you! data input: 20 ...
by junbin
Mon Mar 01, 2004 1:43 pm
Forum: Volume 1 (100-199)
Topic: 195 - Anagram
Replies: 242
Views: 26739

check these things:

1) Case.. make sure you print them as the same case as the input
2) Duplicates if you are given a string with AAA, there should only be one line of output.
by junbin
Mon Mar 01, 2004 1:40 pm
Forum: Volume 1 (100-199)
Topic: 109 - SCUD Busters
Replies: 96
Views: 24525

Check your floating point numbers..
and format your code using the tags
by junbin
Sun Feb 29, 2004 5:27 am
Forum: Volume 1 (100-199)
Topic: 148 - Anagram checker
Replies: 31
Views: 4000

Yes, please. I have several question : 1. Does a word in the dictionary can be used more than once to form an anagram ? e.g. : dictionary : A input : AA output : A A <-- is it possible ? 2. Is it possible to have 2 identic words in a dictionary ? e.g. : dictionary : A A BBB input : AA output : ????...
by junbin
Fri Feb 27, 2004 5:40 pm
Forum: Volume 101 (10100-10199)
Topic: 10135 - Herding Frosh
Replies: 33
Views: 12810

Well, I managed to find a slightly silly mistake in my code, but none in the output. :-? If anyone has a code which you think should get AC but instead gets WA, please feel free to send it (or a Win32 or Solaris executable) to me and I'll check it. I tried solving this question and this is my algor...
by junbin
Tue Feb 24, 2004 2:57 pm
Forum: Algorithms
Topic: Help to find number of swap operation need to sort data
Replies: 17
Views: 6064

Sayutee wrote:Well, I think a simple "Selection Sort" is Enough to get the minimum swaps (Someone please tell me if I am wrong!)

The Selection Sort will also solve the problem with Repeating numbers.
There's no need to sort.. just count.
by junbin
Tue Feb 24, 2004 2:19 am
Forum: Volume 1 (100-199)
Topic: 145 - Gondwanaland Telecom
Replies: 62
Views: 8121

make sure you handle the following cases:

1) Calls that go across midnight (eg: 2300 to 0200)
2) Calls that go exactly 24 hours (eg: 0400 to 0400)

Also, check your floating point numbers.
by junbin
Mon Feb 23, 2004 11:11 am
Forum: Volume 100 (10000-10099)
Topic: 10043 - Chainsaw Massacre
Replies: 18
Views: 7094

I think it should be noted that there are definitely MORE than 1000 trees. In fact, if I set my program's limit to 1000 trees, it gives WA. When I changed it to 5000 trees, I get AC.

I doubt you need 5000 trees, probably 2000 will do, but I'm too lazy to keep trying. :p
by junbin
Fri Feb 20, 2004 8:31 am
Forum: Volume 1 (100-199)
Topic: 195 - Anagram
Replies: 242
Views: 26739

harshahs wrote:Can you give me more hints on how to generate the string, without any computations.
You can just loop through all the possible combinations..

ie:

with the letters GBCFADE

the first combination is
ABCDEFG

the second is

ABCDEGF
by junbin
Fri Feb 20, 2004 3:36 am
Forum: Algorithms
Topic: finding the area of intersection of polygons
Replies: 1
Views: 996

trace the line of the polygon..
by junbin
Fri Feb 20, 2004 12:20 am
Forum: Volume 3 (300-399)
Topic: 325 - Identifying Legal Pascal Real Constants
Replies: 63
Views: 14963

Try this: k__s_jhsfdkkjsa_df__sadf_s __dsfgh_sdf_gk_dsf_ __2_2_3443_457_65 _2e3e2e2 _+e-2 _+2-1 _+2e-2 __+2e+2 __-2e-1-1_ _442 _3465374657846358634563865923569548236458263458623562835682346582364582364___ _34653746578463_5863456386592356_95482364582634586235_62835682346582364582364___ _45643856___ _...
by junbin
Fri Feb 20, 2004 12:13 am
Forum: Volume 1 (100-199)
Topic: 195 - Anagram
Replies: 242
Views: 26739

tstr ^= tstr[j] ^= tstr ^= tstr[j];
looks cool
but

t = tstr
tstr = tstr[j]
tstr = t

is faster usually


but that's not the point. :) The point is that given the string, you should be able to generate immediately without computation.. in other words, your algorithm is wrong.

Go to advanced search