Sign in to follow this  
Followers 0
SigFLUP

Challenge: SWAP

5 posts in this topic

This is the challenge:

swap two variables using crazy amounts of storage. Language of your choice, of course.

Contestants will be judged on cleverness and waste of data. Just mallocing off 4gb is not very clever, you have to be smart about your waste of resources.

So that people don't see other peoples' results prior to the contest ending encrypt your program using this key:


-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.4.9 (OpenBSD)

mQGiBErG3I4RBADWkGInWs8g9BcQxVt+EnqmqZfnJ0WioMcKEZ0a4ZbsjDArrZQX
UnHDEaJwVjTI+Z5N1DnnMzZ7CAMfxW1JDk/aQqc+1exwEcXxXKNkt5lR24l2UILp
pN/wn1ZlMyl29+GHdFkuTu75OvAvlO0CH8CCBRhmj4HgwycO5iwGRKdb0wCgmFBO
z0kIczlStyukaFt1f0QJWTsD/2ZwTsoKfKXHuOD030bIC+7jfXqYjo8kXfY/Q2Ar
vzCNrAJnuxvjSQKQUYZuVesiYWxQ+oOyu3JoVDClK0VbX6bzk0M5J5AcCkesn1vu
MDJrGemdngie87PSjsu3cmTRLsdJmv55nh/kVJv/tQ1WEAC4H2ZoP/OBSSTWPBO2
7asZA/9/qBOC9D8yUbzXMCea/i81XTLR63tYom9xsMPbaOCzepOgTVPz4A4xsrKF
qoRvVG1TQ2Fq2bZPD3jfHkbDS/RYyodEKKYmN9knNfa4M2v9XVkifF3+b8ExPSga
yNNQt/7aIcnP5/tSQfpPGDi6cc02sUTaTBivX9PcyDHTWJxWfLQGYmlucmV2iGAE
ExECACAFAkrG3I4CGwMGCwkIBwMCBBUCCAMEFgIDAQIeAQIXgAAKCRDVMcCN2rHt
t+/4AJ9YuC9PKRosmAczMe1nrKcI/03jlwCfYNDJYkmSNYlRVrYrtrrPuKsEa6S5
AQ0ESsbcjhAEALKWaFO3LxltcjmAnw8wZrGHehN1flcCrcivs8/my3om3Khpj/ss
bTJNU5puDXYPv89nUT5keYpDqpc/YMfQ6bdcTTB1TfrDlApZ5l30NQujXVEVouYT
q6DLXbxbBBDYOuq0tq98Li5JDtYTb7Fczm2ynH+7ojVN/wYLsRFKkaubAAMFA/9k
kuWwWA/olDQl4xQ6ZrP3RhhFbuSc2XK3beN1Wi5a6OMrhkgAF3clE3jAChFhY9LH
VFmvd/CkkdFa932PqTdRU8OtXx5PrGUlg3yxmGuzEYa63U0RCpvZkMmzVPEPqwZ5
kfcvAS/hI4gVjvNsW2cSufUL1tDvSNL5C4e4Di7QDIhJBBgRAgAJBQJKxtyOAhsM
AAoJENUxwI3ase23xFMAn1uHm4PCraGwL7e91kWHa/6z15WXAJ4ssrmG+/+1FIm5
Vf7evxRZMYHhSA==
=hgW0
-----END PGP PUBLIC KEY BLOCK-----

This challenge will be open for two weeks at which point the private encryption key will be revealed and everyone's entries will be judged.

Good luck!

0

Share this post


Link to post
Share on other sites

Here is my submission....

The language: Brainfuck

Enjoy

,> input x in position 0

>> have 0s be in next two slots

+>+>+>+>+>+>+>+>+>+>+>+>+ large ass buffer of ones

>+>+>+>+>+>+>+>+>+>+>+>+> wasting tons of unnecessary space

+>+>+>+>+>+>+>+>+>+>+>+>+ but easily traversed in this language

>+>+>+>+>+>+>+>+>+>+>+>+>

+>+>+>+>+>+>+>+>+>+>+>+>+

>+>+>+>+>+>+>+>+>+>+>+>+>

+>+>+>+>+>+>+>+>+>+>+>+>+

>+>+>+>+>+>+>+>+>+>+>+>+>

+>+>+>+>+>+>+>+>+>+>+>+>+

>+>+>+>+>+>+>+>+>+>+>+>+>

+>+>+>+>+>+>+>+>+>+>+>+>+

>+>+>+>+>+>+>+>+>+>+>+>+>

+>+>+>+>+>+>+>+>+>+>+>+>+

>+>+>+>+>+>+>+>+>+>+>+>+>

+>+>+>+>+>+>+>+>+>+>+>+>+

>+>+>+>+>+>+>+>+>+>+>+>+>

+>+>+>+>+>+>+>+>+>+>+>+>+

>+>+>+>+>+>+>+>+>+>+>+>+>

+>+>+>+>+>+>+>+>+>+>+>+>+

>+>+>+>+>+>+>+>+>+>+>+>+>

+>+>+>+>+>+>+>+>+>+>+>+>+

>+>+>+>+>+>+>+>+>+>+>+>+>

+>+>+>+>+>+>+>+>+>+>+>+>+

>+>+>+>+>+>+>+>+>+>+>+>+>

+>+>+>+>+>+>+>+>+>+>+>+>+

>+>+>+>+>+>+>+>+>+>+>+>+>

+>+>+>+>+>+>+>+>+>+>+>+>+

>+>+>+>+>+>+>+>+>+>+>+>+>

+>+>+>+>+>+>+>+>+>+>+>+>+

>+>+>+>+>+>+>+>+>+>+>+>+>

+>+>+>+>+>+>+>+>+>+>+>+>+

>+>+>+>+>+>+>+>+>+>+>+>+>

+>+>+>+>+>+>+>+>+>+>+>+>+

>>, have another buffer of 2 0s and input y

[-<<[<]<+>>[>]>>] this puts the newly inputed Y into position 1

<<[<]<< put pointer on X's position

[->>[>]>>+<<[<]<<] Put X in Y's starting postition

<<[<]< Go to position 1

[-<+>] Move Y to X's starting postion.... BOOM

Sry op for not encrypting, a bit of a time crunch at the end.

Edited by N0PSLED
0

Share this post


Link to post
Share on other sites

Here is my submission....

The language: Brainfuck

Enjoy

,> input x in position 0

>> have 0s be in next two slots

+>+>+>+>+>+>+>+>+>+>+>+>+ large ass buffer of ones

>+>+>+>+>+>+>+>+>+>+>+>+> wasting tons of unnecessary space

+>+>+>+>+>+>+>+>+>+>+>+>+ but easily traversed in this language

>+>+>+>+>+>+>+>+>+>+>+>+>

+>+>+>+>+>+>+>+>+>+>+>+>+

>+>+>+>+>+>+>+>+>+>+>+>+>

+>+>+>+>+>+>+>+>+>+>+>+>+

>+>+>+>+>+>+>+>+>+>+>+>+>

+>+>+>+>+>+>+>+>+>+>+>+>+

>+>+>+>+>+>+>+>+>+>+>+>+>

+>+>+>+>+>+>+>+>+>+>+>+>+

>+>+>+>+>+>+>+>+>+>+>+>+>

+>+>+>+>+>+>+>+>+>+>+>+>+

>+>+>+>+>+>+>+>+>+>+>+>+>

+>+>+>+>+>+>+>+>+>+>+>+>+

>+>+>+>+>+>+>+>+>+>+>+>+>

+>+>+>+>+>+>+>+>+>+>+>+>+

>+>+>+>+>+>+>+>+>+>+>+>+>

+>+>+>+>+>+>+>+>+>+>+>+>+

>+>+>+>+>+>+>+>+>+>+>+>+>

+>+>+>+>+>+>+>+>+>+>+>+>+

>+>+>+>+>+>+>+>+>+>+>+>+>

+>+>+>+>+>+>+>+>+>+>+>+>+

>+>+>+>+>+>+>+>+>+>+>+>+>

+>+>+>+>+>+>+>+>+>+>+>+>+

>+>+>+>+>+>+>+>+>+>+>+>+>

+>+>+>+>+>+>+>+>+>+>+>+>+

>+>+>+>+>+>+>+>+>+>+>+>+>

+>+>+>+>+>+>+>+>+>+>+>+>+

>+>+>+>+>+>+>+>+>+>+>+>+>

+>+>+>+>+>+>+>+>+>+>+>+>+

>+>+>+>+>+>+>+>+>+>+>+>+>

+>+>+>+>+>+>+>+>+>+>+>+>+

>>, have another buffer of 2 0s and input y

[-<<[<]<+>>[>]>>] this puts the newly inputed Y into position 1

<<[<]<< put pointer on X's position

[->>[>]>>+<<[<]<<] Put X in Y's starting postition

<<[<]< Go to position 1

[-<+>] Move Y to X's starting postion.... BOOM

Sry op for not encrypting, a bit of a time crunch at the end.

Sweet! YOU'RE THE WINNER!!!! YAY!!!!

0

Share this post


Link to post
Share on other sites

I wonder how that one tree got in second....

0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0