Блог пользователя Monogon

Автор Monogon, история, 5 лет назад, По-английски

I hope you enjoyed the problems! Implementations will be added soon.

UPD: Implementations are added!

1450A - Avoid Trygub

Tutorial

Implementation

1450B - Balls of Steel

Tutorial

Implementation

1450C1 - Errich-Tac-Toe (Easy Version)

Tutorial

Implementation

1450C2 - Errich-Tac-Toe (Hard Version)

Tutorial

Implementation

1450D - Rating Compression

Tutorial

Implementation

1450E - Capitalism

Tutorial

Implementation

1450F - The Struggling Contestant

Tutorial

Implementation

1450G - Communism

Tutorial

Implementation

1450H1 - Multithreading (Easy Version)

Tutorial

Implementation

1450H2 - Multithreading (Hard Version)

Tutorial

Implementation

Разбор задач Codeforces Global Round 12
  • Проголосовать: нравится
  • +382
  • Проголосовать: не нравится

»
5 лет назад, скрыть # |
 
Проголосовать: нравится +32 Проголосовать: не нравится

Thanks for superfast editorial

»
5 лет назад, скрыть # |
 
Проголосовать: нравится +77 Проголосовать: не нравится

Too difficult contest :(

»
5 лет назад, скрыть # |
 
Проголосовать: нравится +386 Проголосовать: не нравится

»
5 лет назад, скрыть # |
 
Проголосовать: нравится +54 Проголосовать: не нравится

I didn't like C1, C2

»
5 лет назад, скрыть # |
 
Проголосовать: нравится +11 Проголосовать: не нравится

This contest was not for below pupil I guess :). The questions were tough(for me at least), but the questions were good and it was a good learning experience. Thanks for the superfast editorial

»
5 лет назад, скрыть # |
 
Проголосовать: нравится +43 Проголосовать: не нравится

Problem C is quite similar to this problem: 1438C - Engineer Artem

»
5 лет назад, скрыть # |
 
Проголосовать: нравится +21 Проголосовать: не нравится

can you add who were the authors of each problem as well?

»
5 лет назад, скрыть # |
 
Проголосовать: нравится +1 Проголосовать: не нравится

C is hard this time lol

»
5 лет назад, скрыть # |
 
Проголосовать: нравится +1 Проголосовать: не нравится

Overkilled B and wasted 1 hour

»
5 лет назад, скрыть # |
 
Проголосовать: нравится +6 Проголосовать: не нравится

I was solving a complete different problem for B until the last 20 minutes, where I sadly ignored the attract all points statement. Lets say it is possible to "choose" which points to attract to itself for a point and not all. The problem being similar to the making all elements equal in a 1D array, but here in a 2d plane, with the k parameter. How would we solve such a problem?

»
5 лет назад, скрыть # |
 
Проголосовать: нравится +3 Проголосовать: не нравится

Accidentally solved C, but the proof is really hard to think out

»
5 лет назад, скрыть # |
 
Проголосовать: нравится -30 Проголосовать: не нравится

C1 is like asking for some formular. You saw that one before and can remember, or not.

»
5 лет назад, скрыть # |
Rev. 3  
Проголосовать: нравится +18 Проголосовать: не нравится

Even I don't know how I solved D. Just kept adding bunch of if's and miraculously AC'D.

Beautiful Editorials though :)

»
5 лет назад, скрыть # |
 
Проголосовать: нравится +2 Проголосовать: не нравится

I got TLE during system test for D even though my solution was O(nlog^2(n)) where n<=1e5. Feels very sad man! I hope from next time the pretest for TL would be stronger.

»
5 лет назад, скрыть # |
Rev. 2  
Проголосовать: нравится +16 Проголосовать: не нравится

The point distribution suggests that doing both C1 and C2 was as difficult as doing D, but I felt like D was muuuch easier than even C1.

»
5 лет назад, скрыть # |
Rev. 2  
Проголосовать: нравится 0 Проголосовать: не нравится

Problem C WAS confusing.

»
5 лет назад, скрыть # |
Rev. 2  
Проголосовать: нравится +3 Проголосовать: не нравится

Please give my brain cells back nvm they are already dead.

»
5 лет назад, скрыть # |
 
Проголосовать: нравится +3 Проголосовать: не нравится

Can anyone give some suggestions if my thinking come to a dead end.

In D, I spend all my time to think how to perform min on neighbor elements efficiently, like from [1,5,3,4,2] to [1,3,3,2], eagering to optimize O(n^2) to O(nlogn). I also think about some properties like increasing or decreasing sequence to speed up.

But when I saw the editorial, it is totally another way.

  • »
    »
    5 лет назад, скрыть # ^ |
     
    Проголосовать: нравится +7 Проголосовать: не нравится

    I sometimes get this problem at harder CF problems and, at least in my case, the best solution is to just try a completely different approach to the problem. If this different approach is actually correct, congrats, all is left is to implement the solution. Otherwise, you can go back to your original ideas with a fresh mindset, which means you can notice things you previously haven't thought about.

    • »
      »
      »
      5 лет назад, скрыть # ^ |
      Rev. 3  
      Проголосовать: нравится 0 Проголосовать: не нравится

      One thing I realize is that, if we want to gain more information (like simulating whole process in D, instead of just deciding whether a permutation), it usually requires a higher time complexity. So it may be a good way to rethink if we record redundent information, and what is the minimum necessary factors that matter

»
5 лет назад, скрыть # |
 
Проголосовать: нравится +9 Проголосовать: не нравится

One of the best contest.

»
5 лет назад, скрыть # |
 
Проголосовать: нравится +16 Проголосовать: не нравится

Thanks for the beautiful contest. I think I enjoyed today's contest the most out of all the one's I have attended so far.

»
5 лет назад, скрыть # |
Rev. 3  
Проголосовать: нравится -8 Проголосовать: не нравится

Deleted

»
5 лет назад, скрыть # |
 
Проголосовать: нравится +29 Проголосовать: не нравится

I couldn't solve C1 and C2 in contest but after seeing the editorial, I just loved their solution. Two of the most amazing problems I've ever seen on Codeforces. Thanks Monogon

»
5 лет назад, скрыть # |
Rev. 2  
Проголосовать: нравится 0 Проголосовать: не нравится

.

»
5 лет назад, скрыть # |
 
Проголосовать: нравится +105 Проголосовать: не нравится

My alternative solution to D:

For each element in the array, find the longest contiguous subarray containing it and surrounding elements which are no smaller than it. If that subarray has length $$$L$$$, we know that this element's value occurs as a compressed value for all $$$k \leq L$$$. Then to determine if a $$$k$$$-compressed array is a permutation, we want to know if all elements in $$$[1, N - k + 1]$$$ appear somewhere with $$$L \geq k$$$. It can be handled simply by precomputing the max $$$L$$$ for each distinct element and computing prefix mins.

»
5 лет назад, скрыть # |
 
Проголосовать: нравится +8 Проголосовать: не нравится

Alternative approach to D:

Note that if some value $$$a_i$$$ appears in a $$$k$$$-compression, it will be present in $$$(k-1)$$$-compression. Now for every $$$a_i$$$, we need to compute the greatest $$$k$$$ such that $$$a_i$$$ is present in the $$$k$$$-compression. Suppose that $$$l \lt i$$$ such that $$$l$$$ is the greatest possible and $$$a_l \lt a_i$$$. Similarly $$$r \gt i$$$ such that $$$r$$$ is the least possible and $$$a_r \lt a_i$$$. In other words, we find the closest two lower elements to the left and to the right. Then $$$a_i$$$ will appear in $$$k$$$-compressions for $$$k \in \{r - l + 1, r - l, r - l, \dots, 1\}$$$. Finding $$$l$$$ and $$$r$$$ can be done by adding indices $$$i$$$ of $$$a_i$$$ in the increasing order of values of $$$a_i$$$. We keep the indices in a set, now we can quickly find greater/lower element.

Now we can iterate through every $$$k$$$-compression by going from $$$n$$$ to $$$1$$$ and add each element, that now appears for the first time. We can easily check if the current $$$k$$$-compression is a permutation by keeping it as a set and checking its size, its minimum element and its maximum element.

  • »
    »
    5 лет назад, скрыть # ^ |
     
    Проголосовать: нравится 0 Проголосовать: не нравится

    can you explain me how use set to get l and r

    thank in advance

    • »
      »
      »
      5 лет назад, скрыть # ^ |
       
      Проголосовать: нравится 0 Проголосовать: не нравится

      Order input elements of the input and make sure you keep its original index. For example keep a vector<pair<int,int>>, where first is the value, second is the original index and sort this.

      Now add indices of values in increasing order to the set. To find the next greater, call upper_bound on the set. To find the next lower, you can keep a second set with reverse order. Calling upper_bound on this one finds the next lower.

      From the way you add items to the set, you know that the index you find belongs to a element with a lower value.

»
5 лет назад, скрыть # |
Rev. 5  
Проголосовать: нравится +17 Проголосовать: не нравится

I had an alternative $$$O(n)$$$ solution for D that uses the "next smaller" problem (see my submission). It turned out to be an overkill but maybe it's of interest for some :)

Consider our input array $$$A$$$. First observe that for any window size $$$k$$$, an integer $$$i$$$, $$$1 \leq i \leq n$$$, will be in the resulting array if and only if there is some subarray of $$$A$$$ with size $$$\geq k$$$ where $$$i$$$ is the minimum.

Now, we can compute the array $$$B$$$, where $$$B[i]$$$ is the maximum value of $$$k$$$ for which $$$i$$$ will appear in the resulting array. So for the example array $$$A = [1, 3, 3, 3, 2]$$$ the corresponding array $$$B$$$ is $$$B = [5, 4, 3, 0, 0]$$$. We can compute this array in $$$O(n)$$$ time by first pre-computing for every index $$$j$$$, the first index to the left and first index to the right that the number is smaller than $$$A[j]$$$ (if you don't know how to compute those indices, see this article).

Finally, for a particular $$$k$$$, notice that the array resulting from the window-min operation will be a permutation if and only if $$$B[i] \geq k$$$ for every $$$1 \leq i \leq n - k +1$$$. Why? It's clear that if it is not fulfilled, the array will not be a permutation. On the other hand, if the condition holds, we'll clearly have at least one of each integer between $$$1$$$ and $$$n - k + 1$$$. At the same time, our array will have exactly $$$n-k+1$$$ integers, therefore it'll have exactly one of each integer.

Therefore, we can compute prefix "sums" (using min instead of addition) on the array $$$B$$$ which will give us an array $$$C$$$ that allows us to quickly check whether the condition above holds in constant time--we will have: $$$k$$$ will result in a permutation $$$\iff$$$ $$$C[n - k + 1] \gt = k$$$. In our example, we'll have $$$C = [5, 4, 3, 0, 0]$$$ and checking for the condition will yield us the output $$$00111$$$.

Overall, for each step we required linear time so the time complexity is $$$O(n)$$$.

»
5 лет назад, скрыть # |
 
Проголосовать: нравится +32 Проголосовать: не нравится

The moment when you use FFT instead of trivial Vandermonde's identity (https://en.wikipedia.org/wiki/Vandermonde%27s_identity) is the moment you should realize people can be too experienced

  • »
    »
    5 лет назад, скрыть # ^ |
     
    Проголосовать: нравится 0 Проголосовать: не нравится

    How does FFT help compute what we had to compute using vandermonde? I'd love to understand

    • »
      »
      »
      5 лет назад, скрыть # ^ |
       
      Проголосовать: нравится +25 Проголосовать: не нравится

      FFT lets you do the following:

      You are given two sequences: $$$a_0, ..., a_n$$$ and $$$b_0, ..., b_m$$$. Compute sequence $$$c_0, \ldots, c_{n+m}$$$ such that $$$c_i = a_0b_i + a_1b_{i-1} + \ldots + a_{i-1}b_1 + a_ib_0$$$.

      This is exactly what I needed here, where $$$a_i = {n \choose i}$$$ and $$$b_i = {m \choose i}$$$. If I thought for a little longer I would realize that $$$c_i = {n + m \choose i}$$$ instead of computing it using FFT.

»
5 лет назад, скрыть # |
Rev. 2  
Проголосовать: нравится 0 Проголосовать: не нравится

I had another idea for D. It seems to have passed the tests but correct me if I'm wrong.

What I tried to to do is to find for each value x (1 <= x <= n) what is the maximum value of k so that there exists a segment of length k, where x is a minimum value. Let's call this maximum value k_x.

So for example for this case: 1 ? ? 2 ? ? if x = 2 and ? >= 2 then k_x = 5

Of course it is possible that there is more than 1 number equal to x in the array. In this case k_x is equal to maximum of k_x of all positions where a_i = x.

Calculating k_x for all x can be done with stack.

Then to create answer we do the following:

Let's iterate over x from 1 to n. If x was not present in array we break the loop. Otherwise let's calculate what k must be equal to if we want to create permutation from 1 to x. It is equal n - x + 1. Then let's calculate what is the greatest value of k that can be used. It is equal to min(k_j) where 1 <= j <= x. So if min(k_j) >= n - x + 1 then answer is 1 else it is 0.

Here is my code

Edit: Someone had already wrote about this approach while I was writing this comment. You can refer to this link to see it

»
5 лет назад, скрыть # |
 
Проголосовать: нравится +2 Проголосовать: не нравится

To those who don't know anything about sparse table or segment tree yet and wanted to solve D, My approach:

A set of observations to start with:

0) Kth compression array is 2nd compression of K-1th array. Try proving this by taking some sample cases :)

1) We find the lowest number which has been repeated in the array. To do this, just sort the array and check whether a[i]==i for 1<=i<=n. If its not, break at that i. Benefit: the integers above this can never form a permutation, since this number is duplicate and smaller than them. Store 0's in the answer string

2)If we have an integer a[i] such a[i-1] > a[i] and a[i] < a[i+1], it will make a duplicate of itself when we compress it, so we need to find the smallest integer and above that integer, any array wont be a permutation since it would have duplicates. Store 0's in answer string upto this integer.

3) Now we have an array left which has a[i]=i for 1<=i<=n and the array is free of an a[i] such that a[i-1]> a[i] and a[i]<a[i+1]. The number of elements left in the array is the number of 1's you would have in your answer string.

  • Also do check that if the array is free of duplicates at the start, the first compression array wd be a permutation regardless of the 2nd observation.

Feel free to check my code as well here

»
5 лет назад, скрыть # |
Rev. 2  
Проголосовать: нравится +6 Проголосовать: не нравится

So many alternate ideas to D in the last few comments

»
5 лет назад, скрыть # |
 
Проголосовать: нравится +10 Проголосовать: не нравится

Can somebody please explain the editorial version of problem D

for the test case n = 3, array = [2,2,1] as per my interpretation: 1-compression is [2,2,1] -- not happy , 2-compression is [2,1] -- happy, 3-compression is [1] — happy.

But as per editorial we will fix l = 1,r = 3 initially and we iterate over i = 1,2,3:

so for i = 1 , as arr[3] is 1 ,so we decrement r to 2 and min(a[1],a[2]) is 2 which is i+1

and next for i = 2 ,as arr[1] is 2 , so we increment l to 2 but min(a[2]) which is 2 != i+1 , so we are failing at this i,

so as per editorial k>2 are happy and rest are unhappy, but we know 2 compression is happy , did I misunderstood somewhere please help me out

Thanks in advance :)

  • »
    »
    5 лет назад, скрыть # ^ |
     
    Проголосовать: нравится +3 Проголосовать: не нравится

    I did the same thing using two pointers — $$$O(n)$$$.

    Idea
    Code
»
5 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится
why this code is giving wrong ans for D

its same as explained in editorial

»
5 лет назад, скрыть # |
 
Проголосовать: нравится +3 Проголосовать: не нравится

Too difficult contest.I spend lot of time on c1. But it's solution is very nice :).

»
5 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

I expected some text art in some of the test cases in either C1 or C2. Alas!

»
5 лет назад, скрыть # |
Rev. 2  
Проголосовать: нравится +2 Проголосовать: не нравится

In problem D, wasn't sample output were big hint . In my case i got hint that except for k=1 , sequence for 1 will be contiguous .Thus i separately solved for k=1 and did binary search for rest and it got accepted .

In codeforces i find that many times sample's give a lot of hint compared to CodeChef short contests . That's why accuracy of most people on CodeChef is less compared to CF.

»
5 лет назад, скрыть # |
 
Проголосовать: нравится +8 Проголосовать: не нравится

I solved D using Binary Search.

»
5 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

For C, what if the direction of the color diagonals are to the other way? So it goes from top left to bottom right, shouldn't there be a check for that case as well?

»
5 лет назад, скрыть # |
Rev. 2  
Проголосовать: нравится 0 Проголосовать: не нравится

Can someone provide an example for which greedy in C1 fails. Greedy being swapping 'X' which is contained in most triples of 'X' with 'O' until there are no more triples of 'X'?100579257 this is how I tried to solve the problem.

»
5 лет назад, скрыть # |
Rev. 2  
Проголосовать: нравится -46 Проголосовать: не нравится

.

»
5 лет назад, скрыть # |
Rev. 2  
Проголосовать: нравится 0 Проголосовать: не нравится

.

»
5 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

can someone explain problem D

»
5 лет назад, скрыть # |
 
Проголосовать: нравится +1 Проголосовать: не нравится

I solved D using binary search. Take k=1 as special case and binary search from 2 to n. Anyone else did this? It passed but is it a correct solution ?

»
5 лет назад, скрыть # |
 
Проголосовать: нравится +1 Проголосовать: не нравится

For problem D, if the check fails on index i, then shouldn't the answer be 1 for n-i+1 <= k <= n ? Consider 1 5 3 4 2. Check fails for i=3 and k=3 gives a permutation.

»
5 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Thank You Monogon for such a nice contest, really loved the problems

»
5 лет назад, скрыть # |
 
Проголосовать: нравится +10 Проголосовать: не нравится

Errichto did't intimidate Monogon from taking his top contributor spot on Codeforces!

»
5 лет назад, скрыть # |
 
Проголосовать: нравится +2 Проголосовать: не нравится

Even though I didn't do well in this contest, I'd like to say that the problems were of great quality.

Kudos to all the authors!

»
5 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

lbyyds

»
5 лет назад, скрыть # |
Rev. 5  
Проголосовать: нравится 0 Проголосовать: не нравится

.

»
5 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Hello! I found this testcase of problem F

1
13
1 1 3 1 1 2 3 2 3 2 3 1 1

The correct answer is 6, but i can't get how to reach it. Can anybody help?

»
5 лет назад, скрыть # |
Rev. 2  
Проголосовать: нравится 0 Проголосовать: не нравится

I can't understand the tutorial for E. I thought if there's a cycle with positive weight also give a contradiction. For ex :

u1 -> u2 -> .. -> uk -> u1

Suppose each edge in cylce above is 1, then the weight of this cycle is positive. In other words, i can say : u1 > u2 > ... uk > u1 (?)

I think any cycle that exist must be 0-weight. Can anybody explain what was wrong with me T.T

»
5 лет назад, скрыть # |
 
Проголосовать: нравится -18 Проголосовать: не нравится

Monogon Same problem as C1 in Hackerearth Contest 2 days back. Link

»
5 лет назад, скрыть # |
 
Проголосовать: нравится +1 Проголосовать: не нравится

it's too hard to wait for 12 days without a contest :(

»
5 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Can anyone explain why, in 1450H1, the final equation has a factor of 1/(2^F) instead of 1/2? I would suppose that since each appropriate parity subset of F is a bijection to a valid colouring with f(c) = 1/2 * |x-{size of subset}|, the constant factor is 1/2.

»
5 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

How to approach this slightly modified problem b,

Instead of attracting all the balls (in the original problem) what if we can deselect any number of balls to attract in any operation.

»
5 лет назад, скрыть # |
 
Проголосовать: нравится +1 Проголосовать: не нравится

Can anyone help how does one get the idea of (i+j)%3 for the problems C1, C2?

»
5 лет назад, скрыть # |
Rev. 2  
Проголосовать: нравится +25 Проголосовать: не нравится

I took a different approach to problem E.

I start by assigning a $$$a_{src}=0$$$ to a "source" node. According to this, all remaining nodes $$$i$$$ are associated with a set of possible values for $$$a_i$$$. For example, consider the example of the following graph:

4 3
1 2 0
2 3 0
3 4 1

Taking node 1 as the source, the set of possible values of $$$a$$$ associated with node 1 = {$$$0$$$}, node 2 = {$$$-1,1$$$}, node 3 = {$$$-2,0,2$$$}, node 4 = {$$$-1,1,3$$$}.

In fact, I can prove (using induction) that all such sets will be either continuous odd numbers or continuous even numbers. So, I can conveniently represent them as a pair $$$[i,j]$$$ denoting the range of the associated set {$$$i,i+2,i+4,...,j$$$}, which are stored in the vector $$$range$$$.

Now I start a dfs at the source, for an edge between nodes $$$u$$$ and $$$v$$$, set:

  1. $$$range[v]=[range[u].first-1, range[u].second+1]$$$ if the edge is undirected
  2. $$$range[v]=[range[u].first+1, range[v].second+1]$$$ if the edge is directed from $$$u$$$ to $$$v$$$
  3. $$$range[v]=[range[u].first-1, range[v].second-1]$$$ if the edge is directed from $$$v$$$ to $$$u$$$

If there is already some value of $$$range$$$ associated with $$$v$$$, take the intersection of the new value with the original value. If this intersection is $$$\phi$$$, the society cannot be capitalist. If the intersection is not the same as the original value, update $$$range[v]$$$ and call dfs on $$$v$$$, since the $$$range$$$ of other nodes may also need updating.

Repeating this process by keeping each node as the source iteratively, there will be at least one such source which gives the maximum income inequality as $$$\max\limits_{1 \leq i \leq n} (range[i].second)$$$. In such a case, setting $$$a_i=range[i].second$$$ for all $$$i$$$ gives a valid construction of the answer.

My submission: 100720392

EDIT: I have now concluded that the complexity of dfs is $$$O(nm)$$$.

For any node, the maximum range that can be assigned to it is $$$[-n,n]$$$. Every single time this range is updated, it must decrease by at least 2, since we always take the intersection of the original range and new range. Thus, each node can be updated at most $$$O(n)$$$ times.

Furthermore, every single time we update a node, we iterate over all its adjacent edges. If the degree of a node is $$$d_u$$$, the dfs will perform at most $$$n*d_u$$$ steps for node $$$u$$$. Summing over all nodes, $$$\sum n*d_u = 2nm = O(nm)$$$.

Thus, the solution runs in overall $$$O(n^2m)$$$ time which is just enough (for me, a privileged C++ user) to pass the time limits. But if you disagree, please feel free to hack the solution if you can. :P

»
5 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Nice Problem C!

»
5 лет назад, скрыть # |
Rev. 2  
Проголосовать: нравится 0 Проголосовать: не нравится

In the non-optimized ver. of problem G, how did 3^C come out? Had trouble with bitmasks complexities.

»
5 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Also I would like to ask about the memory limit of G which is unusual, what kind of solutions did the author want to block?

»
5 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

For problem B(Balls of Steel) how the answer can only be 1 and -1. Could any one please explain this to me.

»
4 года назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

I have a solution for problem D. I used segment trees to find the largest length where a[i] is the minimum, and I did this for all i from 1 to n. Then I maintained the largest length for each number from 1 to n such that the number is the minimum in its range using the previous information. Finally, I used a range prefix sum technique: I knew that if value k has a maximum length of a, then it will only be able to be used in a 1, 2, 3, . . . , min(a, n — k + 1)-compressions. So I will have a prefix sum array where I increase ps[1] by 1 and ps[min(a, n — k + 1)] by -1. Then in O(n), I compute my prefix sum array. Now for each i, all I need to do is make sure that ps[i] = n — i + 1 in order to have a 1 in the string at the ith position. Otherwise, there's a 0 at the ith position.

153769266

»
7 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

341421758

Kind of a unique solution for D