Some work on the ICPC problems.

Discussion in 'Python' started by Jerome Lefebvre, Aug 21, 2003.

  1. 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
     
    Jerome Lefebvre, Aug 21, 2003
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    0
    Views:
    458
  2. Domino
    Replies:
    5
    Views:
    417
    dorayme
    Nov 5, 2006
  3. ciccio

    exported templates in icpc

    ciccio, Jan 7, 2008, in forum: C++
    Replies:
    20
    Views:
    805
    Pete Becker
    Jan 9, 2008
  4. Biswajyoti Pal
    Replies:
    0
    Views:
    342
    Biswajyoti Pal
    Nov 10, 2008
  5. Biswajyoti Pal
    Replies:
    0
    Views:
    346
    Biswajyoti Pal
    Nov 10, 2008
Loading...

Share This Page