Matjaz's blog

By Matjaz, history, 7 years ago, In English

https://www.topcoder.com/tc?module=MatchList&sc=&sd=&nr=200&sr=1

Current numbers of match participants seem to basically be at around 20% relative to what they used to be just a couple of years ago. Any thoughts on why that has happened and whether it will ever change?

Full text and comments »

  • Vote: I like it
  • +130
  • Vote: I do not like it

By Matjaz, history, 7 years ago, In English

Suppose we have an ordered (input) queue containing 1, 2, .., n.

We also have a stack and an "output queue". We will be using this stack to try to obtain different permutations of this sequence in the "output queue".

At any time we may either 1) push the front of the input queue onto the stack or 2) pop the top of the stack and push it to the "output queue".

Which permutations of the original sequence can be obtained by such a process in the "output queue"?

(I ask because many programming puzzles seem to be built around this question).

So for example if the starting sequence is 1, 2, 3 we can obtain all permutations except 312.

But what is the answer in general?

Full text and comments »

  • Vote: I like it
  • +8
  • Vote: I do not like it

By Matjaz, history, 7 years ago, In English

http://ioi2007.hsin.hr/tasks/day2/training.pdf

I was wondering if anyone is familiar with a problem that is similar to this one or is based on related ideas.

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it

By Matjaz, history, 7 years ago, In English

There are lots of problems on Codeforces — and most of them will never be seen by most users of the site.

Share a problem you think more people should know about!

(It can be because it's fun, educational, interesting or any other reason.)

Full text and comments »

  • Vote: I like it
  • +51
  • Vote: I do not like it

By Matjaz, history, 9 years ago, In English

Suppose I have a set of intervals and for any given interval I want to know how many intervals in my set are fully contained in it.

Does anybody know of an efficient way doing this?

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it