One Point Solution

  • Subscribe to our RSS feed.
  • Twitter
  • StumbleUpon
  • Reddit
  • Facebook
  • Digg

Saturday, 26 October 2013

SRM 595

Posted on 20:40 by Unknown

I just finished the editorial for SRM 595: http://apps.topcoder.com/wiki/display/tc/SRM+595. Don't forget to vote.

It is a good moment to talk about the match.

During the match

Lately I am using the standard strategy: easy problem first, then medium, leave hard for when writing the editorial. My only twist is that I force a 5 minute break after every 25 minutes spent working on a problem (So it is the pomodoro technique applied to SRMs, giving it a try).

I opened 250, at first it seemed harder than it actually was. It turned out to be quite simple. But I did take longer than I hoped for. I actually had an unforeseen delay. I have been doing testing on the very unstable, cutting edge Greed plugin 2.0 alpha, and forgot to change it back to 1.5 before the match. I actually thought it would work all right, and it did, until I tried to submit and it was actually having issues there. Well, it was simple to change back to 1.5 but it did delay me for a bit.

I was actually lucky here because from the start I decided to use 1-indexed arrays to fill the colors. It is very rare I do this, but in this case it saved me from a potential bug because .size() in STL structures is unsigned (Which is VERY stupid, really, this is the worst good in ALL of the STL design). Apparently this issue hit many coders during the match.

I opened div1 500, and I tried to solve it. I wwas having issues because my idea of an approach was to cut the string in two, count the number of valid substrings in one half and the other and then combine the parts. This logic was more complicated than first picking the first substring and then counting the others, which I could only find later in the match. I spent all the coding phase trying to get it to work.

Challenge phase was a bit fruitless. But I was glad to find my code for 250 was one of the cleanest and not bugged.

Comments about the problems / editorial

Div2 easy: A bit harder than usual but a good pick.

Div2 medium: I don't see the need of making this a different problem than div1 easy (ok they are the same problem but with different constraints). I like to make fun of Java, and usually pick it only when I already plan to write c++ and python code and try to make the Java code as overloaded with tons of code as possible, just so that Java looks bad ^^.

Div2 hard: Ok problem, a bit too standard, but I think that's a good thing for div2 hard.

div1 easy: Ok for the slot

Div1 medium: It was a interesting one, I wish I solved it.

Div1 hard: Amazingly cool. When I first read the explanation rng_58 sent me (Which is almost exactly the same as the "short summary" in the editorial) I was a bit confused: WHAT TRIANGLES? WHAT IF THEY OVERLAP? IT DOESN'T MAKE SENSE. I had to spend all this day thinking about it and reverse-engineering his code. But once I noticed exactly what method to split by triangles is used, it is a very cool problem, refreshing, actually.

I intended to finish this editorial in 24 hours to save as much time as possible for a school assignment, I failed, as I actually took 50.5 hours, too bad.

Email ThisBlogThis!Share to XShare to Facebook
Posted in editorial, recap, topcoder | No comments
Newer Post Older Post Home

0 comments:

Post a Comment

Subscribe to: Post Comments (Atom)

Popular Posts

  • TopCoder SRM 557 - finally
    SRM 557 Explanation for division 1 Easy and match recap. Explanations for div2 easy and div2 medium. It feels like it has been ages since t...
  • SRM 589 Editorial
    I have finished writing the editorial for TopCoder SRM 589: http://apps.topcoder.com/wiki/display/tc/SRM+589 . As you most likely noticed. L...
  • SRM 590 recap and editorial
    Another week another Topcoder match. Not a great day. I had a bad flu and still do. Div1 500: The one with Xor Given a list of cards with nu...
  • SRM 546: relief
    I figured I should post something about this SRM. I've been very busy these weeks because the semester is ending and I tried to win a t-...
  • SRM 526: The killing wait for results
    While I wait for results, here is my perspective on this algorithm contest. It began with issues, it had to be postponed 15 minutes. TC has ...
  • SRM 554 div1 hard: TheBrickTowerHardDivOne
    Link to problem statement We got infinitely many bricks of dimensions 1x1x1 and C different colors. Count the number of towers of size 2x2...
  • SRM 533: Div1 500 MagicBoard explanation
    Finally solved it. It is a nice problem that is worth explaining in a post. You have a grid/board of at most 50x50 cells. Some cells contain...
  • Member SRM 505: Part 1
    So, let me explain a couple of problems from a Topcoder Member SRM that I wrote and never got an editorial. BTW, it was the last member SRM....
  • ListedLinks 2012-02-10
    Saturday Morning Breakfast Cereal comics: Grace Hopper's ghost That Oracle engineer blog post Oracle would really not like anyone to se...
  • Codeforces "Good bye 2013" round
    So it was a special round for coders of both divisions, problems ranged from the super easy problem A to the super difficult problems E,F,G....

Categories

  • acm
  • algorithm
  • answers
  • arenaplugin
  • badday
  • behindthescenes
  • bugs
  • c++
  • censorship
  • codechef
  • codeforces
  • contests
  • crocchamp
  • editorial
  • editorial.srm
  • embarrassing
  • explanation
  • gcj2013
  • gmp
  • goodday
  • google
  • googlecodejam
  • greed
  • groklaw
  • health
  • html
  • httpseverywhere
  • implementation
  • ipsc
  • ispc
  • java
  • kawigiedit
  • kindagoodday
  • lamebook
  • languages
  • lego
  • listedlinks
  • marathon
  • nasa
  • offtopic
  • ouch
  • postmortem
  • postportem
  • practical
  • probably_not_a_good_tip
  • problemsetting
  • programming
  • python
  • quora
  • rant
  • recap
  • slightlygoodday
  • snippet
  • srm
  • stl
  • strategy
  • swerc
  • tco
  • tco12
  • tco13
  • tco2012
  • tco2013
  • ternarysearch
  • topcoder
  • tricks
  • ubuntu
  • uva
  • vjass
  • vkcup
  • wc3
  • zinc

Blog Archive

  • ►  2014 (1)
    • ►  January (1)
  • ▼  2013 (141)
    • ►  December (14)
    • ►  November (8)
    • ▼  October (13)
      • Coding habits
      • SRM 595
      • Editorial for SRM 594 Div1 Hard: FoxAndAvatar
      • SRM 594 editorial (Part 1)
      • SRM 594: More slowness
      • So, TCO 2013 video contest
      • WolfDelaymasterHard editorial
      • SRM 593 Editorial (Part 1)
      • c++ and python topcoder generic testers
      • Together we can send vexorian to the TCO 2013
      • SRM 593: Meh
      • More answers to Quora questions.
      • Codeforces #204 (div 1) Recap
    • ►  September (11)
    • ►  August (14)
    • ►  July (15)
    • ►  June (13)
    • ►  May (13)
    • ►  April (12)
    • ►  March (11)
    • ►  February (11)
    • ►  January (6)
  • ►  2012 (94)
    • ►  December (5)
    • ►  October (6)
    • ►  September (8)
    • ►  August (6)
    • ►  July (3)
    • ►  June (5)
    • ►  May (8)
    • ►  April (10)
    • ►  March (20)
    • ►  February (16)
    • ►  January (7)
  • ►  2011 (51)
    • ►  December (7)
    • ►  November (12)
    • ►  October (5)
    • ►  September (1)
    • ►  August (3)
    • ►  July (4)
    • ►  June (3)
    • ►  May (7)
    • ►  April (3)
    • ►  March (2)
    • ►  February (1)
    • ►  January (3)
  • ►  2010 (9)
    • ►  December (4)
    • ►  October (1)
    • ►  June (1)
    • ►  May (1)
    • ►  January (2)
  • ►  2009 (1)
    • ►  December (1)
Powered by Blogger.

About Me

Unknown
View my complete profile