View topic - ThisIsNotAMoon-Competition



All times are UTC + 1 hour


Post new topic Reply to topic  [ 10 posts ] 
Author Message
PostPosted: 02 May 2012, 20:15 
Journeywar Developer & Mapper
User avatar

Joined: 24 Jan 2006, 21:12
Location: There is no god - and reality is his prophetess
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?


Attachments:
thisIsNoLua.jpg
thisIsNoLua.jpg [ 170.79 KiB | Viewed 332 times ]
Top
 Offline Profile  
 
PostPosted: 02 May 2012, 20:36 
Content Developer
User avatar

Joined: 13 Jan 2005, 00:46
Location: ModalitÃ
Image


Top
 Offline Profile  
 
PostPosted: 02 May 2012, 20:37 
Moderator

Joined: 05 Aug 2009, 19:42
wrong subforum


Top
 Offline Profile  
 
PostPosted: 02 May 2012, 20:42 

Joined: 13 Aug 2006, 17:55
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:
/* 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:
int mul(int m,int n){return m-n;}


Top
 Offline Profile  
 
PostPosted: 03 May 2012, 16:40 
Moderator

Joined: 12 Oct 2007, 08:24
I use GPU. It's super effective.

(btw how do you plan to judge performance?)


Top
 Offline Profile  
 
PostPosted: 03 May 2012, 18:57 
Cursed Zero-K Developer
User avatar

Joined: 07 Nov 2007, 21:48
Location: Horse
So java is allowed but it's forbidden.


Top
 Offline Profile  
 
PostPosted: 03 May 2012, 20:06 
Journeywar Developer & Mapper
User avatar

Joined: 24 Jan 2006, 21:12
Location: There is no god - and reality is his prophetess
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


Top
 Offline Profile  
 
PostPosted: 03 May 2012, 20:13 
Content Developer
User avatar

Joined: 13 Jan 2005, 00:46
Location: ModalitÃ
linux vs windows GO GO GO


Top
 Offline Profile  
 
PostPosted: 03 May 2012, 20:42 
Cursed Zero-K Developer
User avatar

Joined: 07 Nov 2007, 21:48
Location: Horse
CarRepairer wrote:
So java is allowed but it's forbidden.


Top
 Offline Profile  
 
PostPosted: 03 May 2012, 21:32 
Journeywar Developer & Mapper
User avatar

Joined: 24 Jan 2006, 21:12
Location: There is no god - and reality is his prophetess
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..


Top
 Offline Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group

Site layout created by Roflcopter et al.