Comments
On Medo.Topcoder SRM 724, 8 years ago
+17

Is it me, or Web Arena has some issues with 64-bit integers in input in 250? For me, the 5th (1-based) sample is ["261208776456074180", ...], ["333333333333333300", ...] when I run it in the batch test panel, and produces other answer than expected. It was extremely confusing, but I decided to submit the solution anyway, and it passed.

On wilcotGrand Prix of Ukraine, 8 years ago
+79

That should be logarithm overflow.

On wilcotGrand Prix of Ukraine, 8 years ago
+54

You may want to check out our short descriptions of the solutions.

On ZloboberVK Cup Round 2 online mirror, 11 years ago
+8

You are right. I was just not completely clearing some array. Seems that everyone has it's own bug, and the 35-th test is just a good one.

On ZloboberVK Cup Round 2 online mirror, 11 years ago
+6

Is there anything special about test case #35 in problem F? Seems like quite a lot of people failed on it.

On viktorkZeptoLab Code Rush 2015, 11 years ago
+8

Because you can divide the group and the answer will increase by one.

On viktorkZeptoLab Code Rush 2015, 11 years ago
+16

Another solution with the same complexity:

If the answer for a query is equal to R, then if you start with the first element and do greedy, your answer will be at most R+1. So lets try to start with the first element and get some answer R', and after that check if R'-1 is also possible.

To check that, you can build an oriented tree with edges (P[i], i), where P[i] is largest position such that group [i, P[i]-1] fits. Now you have to find a path in this tree of some fixed length such that the difference between indices of the first and the last vertices of the path is at least N. Since the number of paths in O(N), you can easily check that using dfs.

On sophisticated1March cook off problem, 11 years ago
+5

In fact, you don't need dp in this problem.

Let's count the following thing (just using a loop over bitmasks): how many there are strings of length L than consist only of A and B and are good (not hated, i. e., don't contain any hated subword).

Now let's iterate over all possible positions of non-AB characters (again as a loop over bitmasks). Obviously, if there is any hated word, it will be between two two consecutive non-AB characters. So we can use the thing we calculated earlier to fill all characters between non-AB ones.

I made the first problem this time even easier than last time (in Augut 2014) and it didn't really help. I guess I should just keep trying.

-8

There you go. I have been expecting this reply.

+47

I hope he was not looking at section "Success: true" which I was looking the first time I used the batch test.

+18

Well it looks almost impossible to me to write two or three wrong solution to this one. I think it was more like wrong last minute change in primary solution or something like that. Although it's definitely not the reason of bad statements.

Or there was indeed no testing.

+139

God save topcoder

On riadwawChallenge24 EC, 11 years ago
+115

Looks like the organizers had too much fun counting popcorn and forgot to prepare the rest.

+83

Just wrote a contest on dev C today. It's shit. Do not write a contest on dev C.

On riadwawTopCoder SRM 645, 11 years ago
+8

No, it was a surprise for me, as well as (and even more) the statistic for d1 easy / d2 med. For some problems (mostly when they are pretty unusual) it's hard to predict how people will solve it. But I agree that such numbers are too low.

Usually we add a couple of non-trivial samples to a problem. Sometimes we add a single huge testcase, which is good when it is not easy to test time limits on your own.

For the problem you mentioned, adding a huge random test would have probably changed the statistic radically.

Anyway it's not correct to say that nobody cares about tests content.

On riadwawTopCoder SRM 645, 11 years ago
+10

Also, my short experience as TC problemsetter includes: nobody cares about the content of tests.

My less short experience as TC problemsetter: everyone cares about the content of tests (especially samples).

On savinovCodeforces Round #285, 11 years ago
0

You forgot about the American Hustle.

+7

Actually 10^6 is enought for that. The reason is in the fact that there cannot be more than 2 divisors that are greater than 10^6.

If there is one such divisor — it either will be in the given list, or will be left after all the divisions.

In case there are two such divisors, they will be next to each other in the list, so exactly one of them will be given to you. The second one will be left after all the divisions.

P. S. Too late.

+1

Another common mistake in d1 250 was to iterate up to N^1/2 after dividing N by all given primes, which is slow for cases N = 2*P, P — huge prime.

On dthreatzHow do Russians learn math?, 11 years ago
+50

Well, then I guess Mexico should become a part of Russia as well :D

On I_love_tigersugarTopCoder SRM 631, 12 years ago
+3

No, by checkData I mean a method that checks whether a test case matches the constraints from the statement (i. e., validates challenges).

They have already rejudged solutions, but it looks like the statistics are still wrong.

You can contact admins in the thread on topcoder forums that I mentioned above.

On I_love_tigersugarTopCoder SRM 631, 12 years ago
0

Yes, there was a problem with the tests. They have already been fixed and, according to this thread everything should be ok now.

It hasn't affected the round because the checkData (the validator for this problem) and the statement are correct.

On MadiyarTopcoder SRM 630, 12 years ago
+16

If you don't — you can always try some DP :)

We actually can make DP on prefix. Let R[i] be the answer for prefix i. We should try for the positions SA[i], SA[i+1], ..., SA[j] assign some next letter. The only thing that we should do is to check whether it's possible or not.

So, you have to compare strings of type like "x<>x>...", "xx>>x<..." and so on. Here 'x' denotes the current character, '<' donotes some previous character, and '>' denotes some future character. There's no problem in comparing 'x' and '<', '<' and '>', and others. The problem is to compare one '<' and with another '<', or '>' with '>'. But actually it is easy to compare them because they are already compared in the input :)

The code is pretty short and simple, but I guess the other idea is quite better.

On mirobPsychology for programmers I, 12 years ago
+67

Oh my goodness.

Anyway, it's not really good to write such things when you search for teammates. :)

On CROCVladTopCoder SRM 601, 12 years ago
+51

Topcoder SRM 601 had passed 2 days ago.

Seems like this post will be on top forever :)

0

What do you mean by his mouse? ;)

There is some known way how to calculate diameter. Find the most distant vertex from root (denote it v), and than the most distant from v. That distance will be the diameter.

Using this fact you can easily keep track on diameters. When you add vertex i, if it's parent is one of the most distant vertices from root (by the moment), then you say that the current result is increased by 1 and there is new most distant vertex from root. If not, than the answer can only be increased by the path from current most distant vertex (from root) and vertex i. You can calculate that path using LCA.

Why modulo was required in problem RRGAME?

On SeregaCodeforces Round #193 (Div. 2), 13 years ago
+9

Forgot to mark one flag in solution to problem E, and hence I was outputting the correct string, but not lexicographically smallest, but just the one with the maximal number of '1's. Failed on test #169 (last test case). It seems that my luck was a little bit less strong than test cases this time.

+14

Is there something special about test #24 in D? Can't find my mistake.

0

You are right.

Just do res[i] *= (n-i)!, where res[i] is a result with i good position without some position (such that, as you say, "we haven't taken"). Now res[i] may contain some permutations with more than i good positions. But consider that you have correctly caclulated res[i+1], res[i+2], ..., res[n]. Then each of res[i+1] permutations was overcounted in res[i] exactly С(i+1, i) times, each of res[i+2] — C(i+2, i) times and so on. After that you will also have res[i] caclulated correctly.

On MikeMirzayanovHappy New Year!, 13 years ago
+178

In 2013 the authors' fees is...

Yeah, so nice to be the last div1 author in 2012.

+4

Consider that the party of LE has number with c lucky digits. Than there are 6 more paries left. No you have only numbers with 0, 1, .., c - 1 lucky digits, each group is intependent. Hence the state of DP is [current number of lucky digits (gropus that we consider)][current sum of lucky digits][current number of free (such that no number is assigned yet) parties]. Let it be [d][sum][cnt]. On such state you can iterate number k (0 ≤ k ≤ cnt) — the number of parties that would have number with exactly d lucky digits. You should place that k numbers among cnt that are left. This gives you a multiplier C(cnt, k). The number of assignment is (as in the statement) cd * (cd - 1) * ... * (cd - k + 1). Hance you go from [d][sum][cnt] into [d-1][sum + k*d][cnt  -  k] with multiplier C(cnt, k) * cd * (cd - 1) * ... * (cd - k + 1).

IOI? R'ly?

+3

\texttt was a tag, now it's fixed.

[2, 4] is the set of distances in right part, i. e. distance from 1 in sifted B to 1 in A (it is equal to 4) and distance from 2 in shifted B to 1 in A (it is 2).

On wituaCodeforces Round #136, 14 years ago
+12

Unfortunately, it was scheduled before I was setted as an author. Sorry for disappointing you.

Hm, according to the schedule, it seems that contest will start at xx:00, not xx:10 as usual. Or maybe it's error.

UPD. Not, it is xx:10, it was error.

On wituaCodeforces Round #129, 14 years ago
0

The ratings are not updated yet.

On wituaCodeforces Round #129, 14 years ago
0

Well, that test was not added by me and it was added during the contest, so I haven't noticed it. I also think it is a bit bad :(

On sdryapkoSRM 549, 14 years ago
0

Yep, I had the same problem two days ago and I solved it in the same way.

On ZloboberCEOI 2012, 14 years ago
0

12 for a single problem or for all?

+11

А+В

On wituaThe May Cook-off 2012, 14 years ago
+5

You can read the editorials here.

+6

ти дебіл і не розумієш того

+7

до тебе?

+14

лох ти а не українець

On piloopCodeforces Round #119, 14 years ago
+30

The problems were great, thanks!

On Aksenov239Codeforces Round #118, 14 years ago
0

Your joke is not very funny, as well as this little statistic:

Using 1 (one) iteration my solutions is getting WA 44; solution

Using 47 iterations my solutions is getting WA 49, as well as with 10024 (or 7474 or 7744 like you said).

Sad :(

On Aksenov239Codeforces Round #118, 14 years ago
+66

You know what? It seems like the best solution is mine. It's a coded in last minute and submitted for fun random solution, which got WA 49 (the same test as mentioned above). xD

And here is the star: solution.

But it is possible to hack it, of course :)

там в условии ведь написано все, в разделе Scoring

what is going on with problem Substring of Large String? I can't submit.

There is an announcement here.

0
exactly, I forgot to write that in editorial )
thanks
sure
In my opinion it is too much for rounds like Codeforces. It is better to give less number of problems rather than more problems (and more coding/less thinking), even for div2 users.

But, of course, as experiment it was great.
I don't like 6-problems Codeforces round.
Yes, you can use segment tree. A lot f information is on e-maxx.ru/algo, but that is in Russian language. You can use Google to find about somthing like "Range modifications with segment tree".
On wituaCodeforces Beta Round #91, 14 years ago
+12
Your test will be added to testset in practice. We are sorry for that. Of course, every test case can not be considered, and it is impossible to rejudge accepted solutions after the end of the contest.
On wituaCodeforces Beta Round #91, 14 years ago
+16

This is tradition from Lviv, Ukraine.

On wituaCodeforces Beta Round #84, 15 years ago
0
WA on first pretest does not matter for score.
On wituaCodeforces Beta Round #84, 15 years ago
0
Editorial is here.
On wituaCodeforces Beta Round #84, 15 years ago
0
Thanks! =)
On wituaCodeforces Beta Round #84, 15 years ago
0
thank you!
On RipattiCodeforces Beta Round #81, 15 years ago
0
Places in profiles does not match with real places.
On RipattiCodeforces Beta Round #81, 15 years ago
+3
I hope that all things will not affect on system work.
On amirali1374Unknown Language Round #3, 15 years ago
+1
is nice for most of the participants

but not for all.

Look, if we have C[i] components of A[i] vertex, cost of each of this C[i] things (in standart knapsack algo)  is 1 (we need one new edge). In this case we decompose each C[i] in 1 + 2 + 4 + ... 2^k and costs are now 1, 2, 4 ... , respectively.
Number of test cases.
On wituaCodeforces Beta Round #77, 15 years ago
+3
There is English translation here.
On wituaCodeforces Beta Round #77, 15 years ago
0
Try this. =)
On wituaCodeforces Beta Round #77, 15 years ago
0

Yes, I am sure. 

P.S. There is no super lucky number in this case, only lucky.

On wituaCodeforces Beta Round #77, 15 years ago
0
Tag was only thing why you guessed that?
On wituaCodeforces Beta Round #77, 15 years ago
0
Thanks!
On wituaCodeforces Beta Round #77, 15 years ago
+1
It's a lucky number with 100000 digits.
go sleep! =)
On wituaCodeforces Beta Round #77, 15 years ago
+1
Thanks!
On wituaCodeforces Beta Round #77, 15 years ago
+4
Thanks!
In my opinion, good examples of good problems, which have funny and not long storie, are TC problems about John and Brus, aren't they?