If Java, C++ and C are the only language allowed in a programming contest which one should i or you choose? Please no "Which one your comfortable with" answer please. Lets pretend im good at these 3 which one should i choose?
If Java, C++ and C are the only language allowed in a programming contest which one should i or you choose? Please no "Which one your comfortable with" answer please. Lets pretend im good at these 3 which one should i choose?
Well if you're equally good at each language, then the problem to be solved has to be considered.
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
If those are your choices a lot depends on what the contest involves. If its something that can be done in all three then to do it in C will probably require most work and to do it in Java may well be quickest but if you can expand to another language then I'd do it in Brain.........
Free the weed!! Class B to class C is not good enough!!
And the FAQ is here :- http://faq.cprogramming.com/cgi-bin/smartfaq.cgi
Yeah but sometimes the length of your code does matter.Originally Posted by Salem
I know someone who just joined a programming contest. These guys who beat this really good C/C++ programming are not really that expert in making programs i have a feeling they won just becoz they use java. its faster and easier to compare strings. easeir to sort. etc.. etc.. Longer jobs can be solved faster.
And lets say the compiler for C or C++ are the turbo ones. Yeah the old ones hard to navigate with against notepad and command line.
Well if that's your only argument, why are you bothering with anything other than Java?
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
I have read in several sites and i was convinced that C++ is the best language for programming contest. Flexibility, Speed, Easier data manipulation... etc.. etc..
It certainly seems the popular one amongst contestants here at cprogramming
Good class architecture is not like a Swiss Army Knife; it should be more like a well balanced throwing knife.
- Mike McShaffry
also the architecture you're working on... in the ACM competition I was in, we had a choice of (almost) any language we wanted... java would have put us at a disadvantage because 1) we didn't know much of it and 2) system resources were scarce.
basically, pick the language you know best. if, like you said, you know all of them equally, it depends on the problem. in our case, we had about 9 different problems to solve, and tried all of them in C++, because that's what we knew best. (it was teams of 3)
if you're in a similar situation, where you're in a team working on a timer, you'd be better off working on a team strategy. for example, we had one person looking around and doing preliminary work on other problems, somebody else thinking up algorithms for the current problem, and the last person coding it all up. they weren't strict roles, but they were roles. essentially, we left it up to the person writing the code which language to write it in...
and one last bit of advice: if you can bring reference material, a math text can be much more helpful than a programming text.
Join is in our Unofficial Cprog IRC channel
Server: irc.phoenixradio.org
Channel: #Tech
Team Cprog Folding@Home: Team #43476
Download it Here
Detailed Stats Here
More Detailed Stats
52 Members so far, are YOU a member?
Current team score: 1223226 (ranked 374 of 45152)
The CBoard team is doing better than 99.16% of the other teams
Top 5 Members: Xterria(518175), pianorain(118517), Bennet(64957), JaWiB(55610), alphaoide(44374)
Last Updated on: Wed, 30 Aug, 2006 @ 2:30 PM EDT
I have a sneaking suspicion you might be talking about topcoder.
Even if you arnt, I would got for Java most times.
-A ton of libraries are ready and documented.
-All the libraries are readily available in the api listing at java.sun.com
-Using the libraries you can focus more on the solution then reinventing the wheel for functionality to simplify the problem
C++ might have a lot of libraries as well but seriously is there as good a resource for as many libraries as java? None that i've seen.
c++->visualc++->directx->opengl->c++;
(it should be realized my posts are all in a light hearted manner. And should not be taken offense to.)
Originally Posted by major_small
Nice to know there is someone who competed in ACM here, thats my ultimate dream to be able to compete against the best.
The truth is its not someone i know that lost to java programmers it was me and my teammates. Im really disappointed. We were inexperienced in contests like this thats why we lost. It was our first time. I realized that we could have won it if we didnt waste a lot of time. Like you said everyone should have a role. we didnt. that cos as a lot of time. I realized that in a programming contest there should be one coder and 2 problem solver and the coder should code and type fast and really proficient in whatever language he is using. Doesnt matter if your problem solvers doesnt understand much the language what matters is that they have BRAINS and theyre good in understanding problems.
you seem to have it down... the first one is always tough, but as you can see, you came away with experience and now know how to better handle competitions of these kinds...
I would join if I were you... even if you don't think you have enough experience, you'll probably do better than some of the other teams. my school was a business school, and we even beat out a handful of teams: final standings (we were known as "Westchester 1") take a look at some of the problems from that year too.
also, this may interest you:as you can see, alot of teams submitted incorrect submissions... I guess testing solutions as thoroughly as we did was also a downfall... we tried to make sure each submission was flawless, but now on reflection, we probably didn't need to (we overestimated the judges' test data)Of the 316 runs submitted in total:
2 were submitted in "Ada"
44 were written in "C"
125 were written in "Java"
153 were written in "C++"
Of the 129 correct submissions:
0 were submitted in "Ada" (0%)
13 were submitted in "C" (30% of "C" submissions)
50 were submitted in "Java" (40% of "Java" submissions)
66 were submitted in "C++" (43% of "C++" submissions)
Last edited by major_small; 08-09-2005 at 01:33 PM. Reason: closing ')'
Join is in our Unofficial Cprog IRC channel
Server: irc.phoenixradio.org
Channel: #Tech
Team Cprog Folding@Home: Team #43476
Download it Here
Detailed Stats Here
More Detailed Stats
52 Members so far, are YOU a member?
Current team score: 1223226 (ranked 374 of 45152)
The CBoard team is doing better than 99.16% of the other teams
Top 5 Members: Xterria(518175), pianorain(118517), Bennet(64957), JaWiB(55610), alphaoide(44374)
Last Updated on: Wed, 30 Aug, 2006 @ 2:30 PM EDT
Thnks for the infos bro. C++ is indeed the best for contests.
The problems are interesting ill try solve them so ill do good next time.
Id vote java. Its faster to develop with, the libraries are well documented and easy to use, and the free tools available for Java are unparalleled by any free C/C++ tools (read: eclipse).
I would go with C++, not just because i know it better, but because its faster, or so i've heard from every one and every article i've read.
And i find it to have quite some resources.
>>but because its faster,
If speed is part of the judging criteria then i'd agree. But otherwise, who cares if it takes half a second longer to run the java app. usually your timed on how long it takes you to submit your solution.