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.
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: 7516
- Thu Feb 19, 2004 6:47 am
- Forum: Volume 1 (100-199)
- Topic: 102 - Ecological Bin Packing
- Replies: 485
- Views: 116609
- Wed Feb 18, 2004 6:43 pm
- Forum: Volume 1 (100-199)
- Topic: 102 - Ecological Bin Packing
- Replies: 485
- Views: 116609
- Tue Feb 17, 2004 8:57 pm
- Forum: Volume 1 (100-199)
- Topic: 113 - Power of Cryptography
- Replies: 163
- Views: 50271
- Tue Feb 17, 2004 8:52 pm
- Forum: Volume 1 (100-199)
- Topic: 102 - Ecological Bin Packing
- Replies: 485
- Views: 116609
- Tue Feb 17, 2004 8:48 pm
- Forum: Volume 1 (100-199)
- Topic: 102 - Ecological Bin Packing
- Replies: 485
- Views: 116609
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 ...
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 ...
- Fri Jun 06, 2003 3:41 pm
- Forum: Volume 4 (400-499)
- Topic: 412 - Pi
- Replies: 104
- Views: 30241
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: 11466
- Wed Jun 04, 2003 7:58 am
- Forum: Other words
- Topic: Anyone else have problems with AOL?
- Replies: 1
- Views: 899
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 ...
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 ...