Comments

What is the reason behind searching from both ends? Shouldn't starting from one end and progressing until we reach the other end be enough? or will generate a lot of intermediate states to explore?

I don't get why "In usual problems, log(state) is approximately L"?

I think that in this problem log(state) is log(L!), hence overall complexity is O(L + L*Log(L)) which explains why kien_coi_1997's method is faster or am I getting things wrong?

EDIT: ahh, I see Log(L) is pretty small Log(11) which is essentially a constant. You can ignore my comment above :)

On oversolver → Codeforces Round #276, 12 years ago
+19

Server is too busy and can't open any of the problems, is it only me?