Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Competitive programming

Competitive programming

Code from the talk, the live-coded part as well as my original C++ solution to the problem solution explained in depth. All feedback on this talk appreciated on Twitter @Sirupsen.

https://gist.github.com/3914233

Simon Hørup Eskildsen

October 18, 2012
Tweet

More Decks by Simon Hørup Eskildsen

Other Decks in Programming

Transcript

  1. In a sequence of numbers, determine the number of triplets,

    for which: ai > aj > ak for i < j < k Thursday, October 18, 12
  2. 5 3 4 2 1 3 2 0 0 1

    Thursday, October 18, 12
  3. 5 3 4 2 1 3 2 0 0 1

    0 Thursday, October 18, 12
  4. 5 3 4 2 1 3 2 0 0 1

    0 1 Thursday, October 18, 12
  5. 5 3 4 2 1 3 2 2 0 1

    0 1 4 Thursday, October 18, 12
  6. 5 3 4 2 1 3 2 3 0 1

    0 1 4 3 Thursday, October 18, 12
  7. 5 3 4 2 1 3 2 12 0 1

    0 1 4 3 6 Thursday, October 18, 12