Codeforces celebrates 10 years! We are pleased to announce the crowdfunding-campaign. Congratulate us by the link https://codeforces.com/10years. ×

### Matjaz's blog

By Matjaz, history, 3 years ago, ,

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?

Read more »

• +130

By Matjaz, history, 3 years ago, ,

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?

Read more »

• +8

By Matjaz, history, 3 years ago, ,

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.

Read more »

• 0

By Matjaz, history, 3 years ago, ,

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.)

Read more »

• +51

By Matjaz, history, 5 years ago, ,

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?

Read more »

• 0