Comments
0

A bit less I suppose, since that's 11 rounds from 2 to 12 and in the beginning there were only 500 valid entries. But yeah, have to wait a couple of more rounds to call myself very unlucky.

0

I participated in all from Episode 2, if I remember correctly. Bad luck I guess. :) Also, never catched top 50 either.

On BledDestKotlin Heroes 11 Announcement, 20 months ago
0

You can but there is not much reason to I think. Kotlin data structures are more convenient, e.g.:

    val xs = listOf(1, 2, 3)
    val mxs = mutableListOf(1, 2, 3)
    val kotlin_map = mapOf('A' to 1, 'B' to 2)

Since you have immutable data structures you can also do reliable hashing, etc.

I think that's a separate library. When I used it I had to install it separately because it is part of an extension library.

I tried generating random 1000 digits numbers and checking whether they are greater than k... It went well for about k < 20000

On a2bmeHello , 5 years ago
0

That was solved the most times, so when new people sort problems by difficulty that will be the first, so even more people solve it :D Watermelon to the moon

I participated in Kotlin Heroes 2,3,4,5, and don't remember getting a certificate, so I don't think you get it automatically.

I guess on 30th February by pigeon post, but don't take that for granted.

On sshwyRCodeforces Round #664, 6 years ago
0

Is this difficult div2A? Then what about the contest, which was for Russian elementary school students, with a 1700 rating problem A. (it was like 10 contests before) :D

0

Why does this contest have so many downvotes? The problems are quite interesting.

On DevilCodeforces Round #659, 6 years ago
0

I don't know what these div2 rounds are, but definitely not the same as they used to be. In the past D or E was of the same difficulty as this round's B ...
And div2B was more difficult than div1A, so it is tecnically a div1 round for div2 participants. Let's delete divisions, at least then someone would know what to expect.

On DevilCodeforces Round #659, 6 years ago
+1

I guess that was the first real test with many test cases. Test 2 contained some corner cases I think

div -2147483648

I'm really surprised you don't have 420, that's not that far away.

I was thinking about that too, because there were many contests with this many participants, and they ran smoothly. Also now the site is very slow even without a contest.

+11

I like how A is "nothing" :D

I bumped into the same problem. The following does also work for any $$$N$$$ (up to $$$N=9-10$$$ due to its complexity):

Let's get a list of all permutations of $$$( 0,1, ... ,n-1 )$$$. (there is std::next_permutation for that)
In each iteration get a pair of $$$( i,j )$$$ where the difference of the number of permutations containing $$$i$$$ before $$$j$$$, and the number of them containing $$$j$$$ before $$$i$$$ is minimal.
Check the ordering of $$$( v[i],v[j] )$$$, then remove all permutations, where $$$( i,j )$$$ are in the wrong order.

If there is only one permutation left, we stop and that permutation is the sorted order of $$$v$$$.

That's understandable. Although one must be careful with sample test cases. In many problems they are intentionally misleading, as I realized, especially in geometry problems.

I'm just curious how people arrive to solutions like that when they don't have an idea whether it is correct or not.

On AriCodeforces Global Round 9, 6 years ago
+139

But man, by the time I understand 9 problem statements, 2,5 hour is already gone, and I already forgot 8 of them...

In gcc under Linux RAND_MAX is INT_MAX, so one should always be cautious even with that.

Good to know, I have participated in a few educationals but did not know this one. :O What I noticed about them is that they tend to be harder than normal Div2 rounds.

The sentence about god was the irrelevant in the announcement. If it was not there, no one would have started this.

but he is not cyan

On JetBrainsKotlin Heroes: Episode 2, 7 years ago
0

Quick sort can be $$$O(n^2)$$$ , make sure you use Kotlin's sorting algorithms. For example, after reading the variables into array,or list $$$a$$$, use $$$a.sorted()$$$ to get a sorted copy of it.

On JetBrainsKotlin Heroes: Episode 2, 7 years ago
+25

This is advertised in other sites as well, so it is possible that some Kotlin developers registered just for this. Let's hope, that there aren't many people who will "compete" with multiple accounts...

We have at most $$$n=2*10^5$$$ numbers. Each number will contribute to $$$O(\log_{2}(2*10^5))$$$ arrays, when we divide it by $$$2$$$ until $$$0$$$. So, at worst case we have $$$O(n*\log_{2}(2*10^5))$$$ numbers in the arrays in total. So we never have to sort, and sum more numbers than that, no matter what $$$k$$$ is.

551C is what i bumped into last time.

You should check, whether the number of sticks of the same length is even, and in for(ll i=1;i<(n/2)-1;i++) , you should write i<=(n/2)-1, because you would miss a pair. This way, your solution works.

Proof for F1: Take array of the projects with negative $$$b_i$$$ (sorted as given in the tutorial). Let’s complete the projects in this order. If we get stuck at index $$$k$$$ , then:

$$$ r + \sum_{i \lt k}b_i \lt a_k $$$

Let’s assume we have a good order of projects in range $$$[0,k]$$$ so that all of them can be completed. Let the project completed last of this set , the one with index $$$p$$$. ($$$p ≠ k$$$ because of the starting inequality).

$$$a_p+b_p ≥a_k+b_k $$$ ,so $$$ a_p+b_p-b_k≥a_k$$$ (because we ordered them so).

Then after we complete everything except the $$$p^{th}:$$$ $$$r+\sum_{i \lt k}b_i-b_p+b_k ≥a_p$$$.

After reorder: $$$r+\sum_{i \lt k}b_i ≥a_p+b_p-b_k≥a_k$$$. That is in contradiction to the one in the beginning.