Page 1 of 1

ThisIsNotAMoon-Competition

Posted: 02 May 2012, 21:15
by PicassoCT
Well.. as Eximius suggested it, but quite contrary not only in c_|__|_, here is a little Code-competition. First the rules.

Allowed languages?
C, C++, Java, Lua

Forbidden Languages: Java, C#, everything that basically a librarycall in disguise and therefore cheating.

The task?

Alway setup by the winner of the round. He might be utterly ignored, if he asks people to produce big things for the bin. The Challenge is to produce something neat, something fast, something elegant, bonus if it has comments in it (would help some who dont know all the C-trickery of old). Remember that people dont read code because it is such fun, so if you wanna handle all the exceptions thats nice for you, but do it elsewhere - and cut.

If the winner doesent come up with a task, the second place gets the call.

The vote. After everyone who has delivered, delivered, everyone is allowed to vote, on one post (OPviciously not on yourself). Only votes of people who deliverd count. The winner is named. He gets it all.

Image
The Prick.. ahem.. the price is handed over (which consists of a trophy.jpg and a e-penis that long, that local firemen will lend it for practicing purposes (you are the owner of that endless pink waterhose in the garden?)


The Task is to write a function that multiplies two mxn-matrices as efficient as possible.
Two Weeks time.
Competition ends on the 16 March, at 21:00 o clock. May the better performer succeed, and all the others forever fall silent in his presence.

I know, that You know.. its a waste of time, and all the others will tell you the same- but if this really gets going, and they all show up with something- so what bad can it do to sharpen the knife, and show everyone what a bleeding edge is?

Re: ThisIsNotAMoon-Competition

Posted: 02 May 2012, 21:36
by smoth
Image

Re: ThisIsNotAMoon-Competition

Posted: 02 May 2012, 21:37
by gajop
wrong subforum

Re: ThisIsNotAMoon-Competition

Posted: 02 May 2012, 21:42
by Andrej
Ok let me try.
Two mxn matrices can be multiplied only when m=n.
This is a special case so we don't need to handle it.

Code: Select all

/* Return zero if exception happened.
 * Return nonzero if matrices can't be multiplied. */
int mul(int m, int n) {
  return (m == n) ? 0 : 1;
}
Asymptotic time complexity: O(1)
Asymptotic space complexity: O(1)

Might be optimized by using:

Code: Select all

int mul(int m,int n){return m-n;}

Re: ThisIsNotAMoon-Competition

Posted: 03 May 2012, 17:40
by Google_Frog
I use GPU. It's super effective.

(btw how do you plan to judge performance?)

Re: ThisIsNotAMoon-Competition

Posted: 03 May 2012, 19:57
by CarRepairer
So java is allowed but it's forbidden.

Re: ThisIsNotAMoon-Competition

Posted: 03 May 2012, 21:06
by PicassoCT
Google_Frog wrote:I use GPU. It's super effective.

(btw how do you plan to judge performance?)
celsius vs fahrenheit of the resulting flamewar.

I know you could push it all into the openglpipeline.. still some matrices remain to be done

Re: ThisIsNotAMoon-Competition

Posted: 03 May 2012, 21:13
by smoth
linux vs windows GO GO GO

Re: ThisIsNotAMoon-Competition

Posted: 03 May 2012, 21:42
by CarRepairer
CarRepairer wrote:So java is allowed but it's forbidden.

Re: ThisIsNotAMoon-Competition

Posted: 03 May 2012, 22:32
by PicassoCT
Everything that is too heavily dependent upon work not done by you. Is not impyling that you cant be a lazy copycat in c++ or any other language, but the idea of this competition is to overcome this golden age syndrom (everything good has done by the forefathers, just need to include <library.all>
and call a relique.(made.Of.(The.Toe.OfDR(noRealArguments)));
)

You get the spirit, and while you argue, the others are thinking, doing stuff.. so you fall behind..