topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Wednesday April 24, 2024, 11:35 pm
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - bobkart [ switch to compact view ]

Pages: [1]
1
A coworker mentioned these puzzles to me last week, I took on 'liarliar' in C++, spent half an hour coming up with a sub-50-line program that solved it (conciseness was my goal), submitted it, got back a response that it passed all their tests, taking 1610.652ms on the longest test case.

I then tried to see how well that time compared to other solutions.  There is a discussion about just that here:

http://www.facebook....4266&topic=14834

and seeing some impressive times for 'liarliar' there I set out to code a more optimized solution (in C this time).  After a few hours of work, spread out over a few evenings, I got one I was satisfied with, it ran nearly 15X faster than my C++ version on some very large programmatically-generated test cases.  Submitted that last night and got back this morning that it passed all their tests and took 423.313ms on the longest test case.  Not the 15X I was hoping for but I'll take it . . . but it leaves me wondering how the times claimed to be around 110ms were achieved.

Anybody else have any times to share?

Pages: [1]