Some work on the ICPC problems.

J

Jerome Lefebvre

Hello,

Hope this will interest a few. I been working with a friend on the
problems given out during the "International Collegiate Programming Contest"
(ICPC) http://icpc.baylor.edu/icpc/ . Started out just trying to find the
solutions and then moving on, to "aggressively" trying to find the best
solution for each problems. First started to work on the problems using
C++ and then moved on to using Python, mostly since it was much easier to
play around with different implementations that way. Don't have huge amount
of experience using python, so did my best so far using a lot of dir() and
my Safari account (http://safari.oreilly.com/) but wouldn't mind having some
help from more experience programmers now.. Any kind of help would be good;
pointing out some libraries, showing how some built in type might be more
appropriate then what I was using or simply pointing out that I'd be much
smarter if I would simply put more/any comments..

Anyway, here it is:
http://www.ledward.org/jelefebvre/icpc/

One thing I do know I could be doing better is using testcases to test
those solutions out. Just not sure how I could go about it. Most of the
problems follow simple case of:
main: reads from a file, does some formatting on the input and sends it to
a function called process.
process: just goes through the data, and prints out things as it goes.
then goes back to main to get some more data.

Nothing to spectacular, but not to easy to test. The solution I came with
was: redirect print to a file 'test.output' and then compare it with an
other file of expected output. Takes a while to set up, but not many other
options around. What I'm hoping is that others have worked on the problems,
and fleshed out other sample input for their solutions, those could easily be
swapped around. As oppose to re-writting my code to use smaller functions and
testing those out.. Any ideas?

Thank you for reading and any help you can bring,
Jerome Lefebvre
(e-mail address removed)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top