## Search found 9 matches

Mon Feb 23, 2004 8:21 pm
Forum: Algorithms
Topic: Help to find number of swap operation need to sort data
Replies: 17
Views: 6156
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.
Thu Feb 19, 2004 6:47 am
Forum: Volume 1 (100-199)
Topic: 102 - Ecological Bin Packing
Replies: 485
Views: 54579
Not at all - it is always a pleasure to be able to help anyone! I have run your code - you have two major faults! First - you have to store the configurations ("BCG" etc) in a 4 element character array. When I run the code, i got this output BCGA 30. Remember, in C or C++, you have to use one extra ...
Wed Feb 18, 2004 6:43 pm
Forum: Volume 1 (100-199)
Topic: 102 - Ecological Bin Packing
Replies: 485
Views: 54579
I cant spend much time to understand your code online(charge for using internet is a little high here) but one small thing - u have used a 3 element array to store the combination. But shouldn't it be that "BCG" needs a 4 element array to store its terminating NULL? Your English is not too bad - the...
Tue Feb 17, 2004 8:57 pm
Forum: Volume 1 (100-199)
Topic: 113 - Power of Cryptography
Replies: 163
Views: 17876
Your code is too much complex i think- the problem is not so much complex.

I got WA with double but AC with Long Double.

I used natural log instead of base 10.

k = exp(log(p)/n) is enough to solve it.

best of luck
Tue Feb 17, 2004 8:52 pm
Forum: Volume 1 (100-199)
Topic: 102 - Ecological Bin Packing
Replies: 485
Views: 54579
Okay I just found another of your request. You have asked for code. Do you really need the code? if so, tell me, i will give you mine.(I got an AC)
Tue Feb 17, 2004 8:48 pm
Forum: Volume 1 (100-199)
Topic: 102 - Ecological Bin Packing
Replies: 485
Views: 54579

### Only two traps can be here

I think you have made a very much simple thing much complex. trying to simplify the code will do better. Scanf returns the number of elements it scans - but sometimes i had it not working as i expected. though i am not sure, but your input-taking style may cause the problem. When scanf tries to read...
Fri Jun 06, 2003 3:41 pm
Forum: Volume 4 (400-499)
Topic: 412 - Pi
Replies: 104
Views: 18873

### 412 Is there any special case

Is there any special case in 412?
Fri Jun 06, 2003 7:28 am
Forum: Volume 4 (400-499)
Topic: 446 - Kibbles "n" Bits "n" Bits "n" Bits
Replies: 50
Views: 5200
I think the same as "Little John". the problem is itoa(). It is not supported in Linux/Unix.

Besides, you have to print exactly 13 digits for each binary number.

It will be better if you compile your programme usibg unix/linux before submission.

with best wishes
Wed Jun 04, 2003 7:58 am
Forum: Other words
Topic: Anyone else have problems with AOL?
Replies: 1
Views: 663

### I Faced the Same Problem

I have faced the same problem when I made my first submission to ACM. You have placed @BEGIN_OF_SOURCE_CODE and @END_OF_SOURCE_CODE inside comments. Remove the comment markers and let them stay as a line. the first lines will be like /*@JUDGE_ID: ****** 000 "Whatever"*/ @BEGIN_OF_SOURCE_CODE #includ...