oursaco's blog

By oursaco, 12 months ago, In English

Note the unusual time of the round.

Hello Codeforces!

lunchbox, Apple_Method, and I are pleased to invite you to participate in Codeforces Round 914 (Div. 2) on Dec/09/2023 19:05 (Moscow time). You will be given 2 hours to solve 6 problems (and one subtask).

The round will be rated for participants of Division 2 with a rating lower than 2100.

We promise the statements will be clear and concise, suitable for AdamantChicken2 to read wink wink.


Also, we would like to thank:


We hope you will enjoy the contest and receive positive delta!

Scoring distribution

$$$500 — 750 — 1000 — (1250 + 750) — 2750 — 3500$$$

UPD

The editorial has been posted!

Congratulations to our winners!

Congratulations for our first solvers!

  • Vote: I like it
  • +331
  • Vote: I do not like it

»
12 months ago, # |
  Vote: I like it +75 Vote: I do not like it

bad time for chinese programmers

»
12 months ago, # |
  Vote: I like it +4 Vote: I do not like it

Happy to know that the statements will be clear and concise. Best of luck to all contestants!

»
12 months ago, # |
Rev. 3   Vote: I like it +1 Vote: I do not like it

As a tester, I enjoyed these problems quite a bit! Hope you will too!

  • »
    »
    11 months ago, # ^ |
      Vote: I like it -8 Vote: I do not like it

    how to be a tester

    • »
      »
      »
      11 months ago, # ^ |
        Vote: I like it +1 Vote: I do not like it

      you get a private message from a contest organizer asking you if you want to test a codeforces round

»
12 months ago, # |
Rev. 2   Vote: I like it -8 Vote: I do not like it

orz

»
12 months ago, # |
  Vote: I like it 0 Vote: I do not like it

As a tester,the problemset is phenomenal!Hope you enjoy it :)

»
12 months ago, # |
  Vote: I like it +73 Vote: I do not like it

As a tester, I am not allowed to write anything about the problems which includes my opinion of the problems.

»
12 months ago, # |
  Vote: I like it +16 Vote: I do not like it

As a tester, I upvoted the blog twice.

»
12 months ago, # |
  Vote: I like it +34 Vote: I do not like it

lunchbox hard carry orz

»
12 months ago, # |
  Vote: I like it +9 Vote: I do not like it

As a tester, these were some really fun problems.

»
12 months ago, # |
  Vote: I like it +44 Vote: I do not like it

I'm a simple man, I see a lunchbox round, I register

»
12 months ago, # |
  Vote: I like it +3 Vote: I do not like it

Being a tester, I hope you enjoy the problems!

»
11 months ago, # |
  Vote: I like it +17 Vote: I do not like it

W time for PST

»
11 months ago, # |
  Vote: I like it 0 Vote: I do not like it

I really wanted to participate in this round but it's too late for my schedule :/

It would be great if the round could be held at the regular time.

»
11 months ago, # |
  Vote: I like it +40 Vote: I do not like it

The scoring seems to indicate a speedforces.

»
11 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Brooo i feel so happy when you promise us for the statements... And a nice choosing the TIME

»
11 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Upsolver's round

»
11 months ago, # |
  Vote: I like it -8 Vote: I do not like it

I'm 27th

»
11 months ago, # |
  Vote: I like it +27 Vote: I do not like it

Big score difference between D and E, speedforces vibes.

»
11 months ago, # |
  Vote: I like it +3 Vote: I do not like it

Midnight for chinese

»
11 months ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

Lovely

»
11 months ago, # |
  Vote: I like it 0 Vote: I do not like it

5 minutes after finish of LeetCode Biweekly Contest.

Gotta skip or will try to give both

  • »
    »
    11 months ago, # ^ |
    Rev. 2   Vote: I like it +55 Vote: I do not like it

    Step 1 : Give Atcoder regular round . Use 30 min break for dinner.

    Step 2 : Speedrun Leetcode biweekly .

    Step 3 : Put on Umnik's playlist and start codeforces round 914.

    Update — Afterwards,watch livestream here to see who wins Hacker cup.

»
11 months ago, # |
  Vote: I like it +3 Vote: I do not like it

Can anyone tell me what are [VIP],[upsolver+] beside the handles? I searched but couldn't find anything about it.

  • »
    »
    11 months ago, # ^ |
      Vote: I like it +8 Vote: I do not like it

    They're just a thing the authos added to the announcement, probably referencing some games.

    These probably refer to how the testers tested the contest but they don't have any deeper meaning.

»
11 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Why the time is unusual?

  • »
    »
    11 months ago, # ^ |
      Vote: I like it -10 Vote: I do not like it

    it's not that unusual, it's just that some snowflake kids complain even if the round is 30 minutes off these days.

    there was a time when there were rounds as late as 6pm UTC and maybe that was an unusual time.

    anything between 2pm UTC and 4pm UTC is part of the historical time range of the rounds.

  • »
    »
    11 months ago, # ^ |
      Vote: I like it +3 Vote: I do not like it

    Problem writers are in PST

»
11 months ago, # |
  Vote: I like it +9 Vote: I do not like it

As a tester, I enjoyed solving the problems; they're all excellent problems! Problem [REDACTED] is very nice in particular!

»
11 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Will give the contest almost after one month.

»
11 months ago, # |
  Vote: I like it 0 Vote: I do not like it

why?

»
11 months ago, # |
Rev. 5   Vote: I like it 0 Vote: I do not like it

glhf everyone :)

»
11 months ago, # |
  Vote: I like it 0 Vote: I do not like it

what does (1250+750) mean?

»
11 months ago, # |
  Vote: I like it +12 Vote: I do not like it
»
11 months ago, # |
  Vote: I like it +8 Vote: I do not like it

the unusual time note was very helpful

»
11 months ago, # |
  Vote: I like it -83 Vote: I do not like it

feels like that's going to be a shit round

»
11 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Could anyone please explain what it mean by "(and one subtask)" , cause I don't get it

»
11 months ago, # |
  Vote: I like it +6 Vote: I do not like it

Bad time for south Asians. 4 am in the midnight awww

»
11 months ago, # |
  Vote: I like it +1 Vote: I do not like it

Can someone please confirm whether "Kotlin Heroes: Practice 9 (release 2)" has been rated or not?

  • »
    »
    11 months ago, # ^ |
      Vote: I like it +1 Vote: I do not like it

    It is not rated because all the problems are from problemset.

»
11 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Good luck for everyone!

»
11 months ago, # |
  Vote: I like it 0 Vote: I do not like it

If I have registered but not able to participate will my rating fall?

  • »
    »
    11 months ago, # ^ |
      Vote: I like it +14 Vote: I do not like it

    no it does not fall as long as you dont sumbit a solution

»
11 months ago, # |
  Vote: I like it +14 Vote: I do not like it

I hope that AdamantChicken2 participates.

»
11 months ago, # |
  Vote: I like it 0 Vote: I do not like it

I'm feeling sleepy now, maybe I should give up.

»
11 months ago, # |
  Vote: I like it 0 Vote: I do not like it

i'm a beginner can anyone give me advice

»
11 months ago, # |
  Vote: I like it -7 Vote: I do not like it

Bad Time for Bangladeshi Programmers.

»
11 months ago, # |
  Vote: I like it +6 Vote: I do not like it

Bruh without Chinese it's only 3500 people

»
11 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Is that really div.2!!

»
11 months ago, # |
  Vote: I like it 0 Vote: I do not like it

is it div 2 a, b ?

»
11 months ago, # |
  Vote: I like it +11 Vote: I do not like it

C>D

»
11 months ago, # |
  Vote: I like it +17 Vote: I do not like it

Cool problems, especially $$$C$$$(with idea that we must check only $$$K \leq 2$$$) and $$$D$$$.

»
11 months ago, # |
  Vote: I like it +3 Vote: I do not like it

Cool problems and cool starting time

»
11 months ago, # |
  Vote: I like it +6 Vote: I do not like it

A > C > B

»
11 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Found the error in D1 one second after contest ended. Nice!

»
11 months ago, # |
  Vote: I like it +3 Vote: I do not like it

Can anyone tell me if this works for F? I ran out of time to implement in contest.

First we build a directed graph $$$G$$$ whose vertices represent paths in the tree as follows:

For each vertex $$$u$$$ and number $$$0 \leq i \leq 20$$$ we construct a vertex corresponding to the path between $$$u$$$ and its $$$2^i-1$$$th ancestor along the path (LCA stuff). We draw directed edges from the "vertex" $$$[u, p^{2^i}(u))$$$ to vertices $$$[u, p^{2^{i-1}}(u))$$$ and $$$[p^{2^{i-1}}(u), p^{2^{i}-1}(u))$$$.

This directed graph $$$G$$$ has $$$\leq 20n$$$ vertices, each of which has at exactly two edges going outward. So the graph has at most $$$40n$$$ edges. Create another copy of such a graph, but now with edge directions reversed, call it $$$G'$$$. Finally consider the $$$1$$$-vertex paths in both graphs $$$G, G'$$$ and merge them (they are one single vertex now).

This new graph $$$G+G'$$$ has $$$\leq 40n$$$ vertices and $$$\leq 80n$$$ edges. Now for each of the $$$m$$$ conditions we do the following. Suppose that the condition is of the first kind, the second kind is analogous. Split the paths from $$$[a, c)$$$ and $$$(c, b]$$$ into at most $$$40$$$ vertices of $$$G$$$. Draw a directed edge from vertex $$$c$$$ to each of these $$$40$$$ vertices of $$$G$$$ (in the opposite direction if $$$G'$$$ were considered).

Now just check if the $$$G+G'$$$ graph has a topological sort. If it does, then the order of $$$1, 2, \dots, n$$$ in that is the answer, otherwise there is no answer at all. Time complexity of above is $$$\mathcal O((n+m)\log n)$$$

  • »
    »
    11 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Yes, this ought to work.

    • »
      »
      »
      11 months ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      ahghghgh thank you for confirming, after bricking C, D1, D2 I read F in last 30 min and figured this out but hands too slow ugugugughghh

»
11 months ago, # |
Rev. 2   Vote: I like it +14 Vote: I do not like it

What? D1 is actually EJOI 2020 Day 1 Task "Exam" Subtask 6.

»
11 months ago, # |
  Vote: I like it +15 Vote: I do not like it

datastructureforces

»
11 months ago, # |
  Vote: I like it +4 Vote: I do not like it

C was cool, D1, D2 were also good, crossing 1800 barrier for the 1st time after so long from being stuck and lot of demotivation.

»
11 months ago, # |
  Vote: I like it +26 Vote: I do not like it

I absolutely totally did not stare at $$$C$$$ for $$$30$$$ minutes with no ideas until I realised you can make it $$$0$$$ in $$$3$$$ trials.

  • »
    »
    11 months ago, # ^ |
    Rev. 2   Vote: I like it +4 Vote: I do not like it

    I absolutely did not spend 20 minutes staring at my solution for C without realizing that it works.

»
11 months ago, # |
  Vote: I like it 0 Vote: I do not like it

nice contest i enjoyed the problem thanks to authors. First time solved 4 problems

»
11 months ago, # |
Rev. 2   Vote: I like it +9 Vote: I do not like it

C is such a troll problem with $$$K$$$ up to $$$10^9$$$, you could have taken it a step further and not include a case with $$$K = 3$$$ in the samples. Not a bad problem though.

D was okay, just hoping I don't get FSTed.

Looks like I didn't get FSTed after all. Is there an easier way to do D2?

What I did:
  • »
    »
    11 months ago, # ^ |
      Vote: I like it +8 Vote: I do not like it

    Yes there is an easier way, Let $$$R(i,x)$$$ denote the smallest index $$$j$$$ such that $$$j \ge i$$$ and $$$a[j] = x$$$, similarly $$$L(i,x)$$$ denotes the largest index $$$j$$$ such that $$$j \le i $$$ and $$$a[j] = x$$$.

    Now, the answer is "YES" iff for every element $$$i$$$,

    1) $$$Min(b[i],b[i+1]...b[R(i,b[i])] \ge b[i]$$$

    2) $$$Max(a[i],a[i+1]...a[R(i,b[i])] \le b[i]$$$

    OR

    1) $$$Min(b[i],b[i-1]...b[L(i,b[i])] \ge b[i]$$$

    2) $$$Max(a[i],a[i-1]...a[L(i,b[i])] \le b[i]$$$

    • »
      »
      »
      11 months ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      Yeah, this looks like a more concise way to do it. Basically, in my solution I'm checking the same conditions, just in a more roundabout way (it was heavily influenced by my brute force solution of D1)

      I'm curious what is the authors intended solution (it might as well be the same as the one that you have proposed)

  • »
    »
    11 months ago, # ^ |
      Vote: I like it +3 Vote: I do not like it

    236555393 Though I'm not sure about the time complexity.

    • »
      »
      »
      11 months ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      Hacked. But I think you can optimized it a bit and pass.

      • »
        »
        »
        »
        11 months ago, # ^ |
          Vote: I like it 0 Vote: I do not like it

        I was thinking it's time complexity to be $$$O(n^{2})$$$ in worst case.

        • »
          »
          »
          »
          »
          11 months ago, # ^ |
            Vote: I like it 0 Vote: I do not like it

          Your solution solved my test case in about 6 seconds while most of the N^2 solution takes more than 1 minutes.

          That's why I think your solution might pass if you can somehow optimized it.

  • »
    »
    11 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    I did something similar for D2. It barely passed in time lol

»
11 months ago, # |
  Vote: I like it +11 Vote: I do not like it

Was that for only me initially the diagram for problem A was incorrect?

»
11 months ago, # |
  Vote: I like it 0 Vote: I do not like it

couldn't solve c

even though found case work k >= 3, k == 1, k == 2

too unfortunate

»
11 months ago, # |
  Vote: I like it 0 Vote: I do not like it

A is miles harder than B and C for me lol (and maybe even D1 but i didnt have enough time)

»
11 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Wow A was unusually difficult to understand and implement.

»
11 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Weak pretest on A

»
11 months ago, # |
Rev. 2   Vote: I like it +4 Vote: I do not like it

Congratulations to the authors for this great round :))

As usual, here is my advice about the problems (not correlated to my performance)

A
B
C
D
E
F

I think the only downside of this round is that the gap between D2 and E was quite high but I don't know if that's a really big deal as usually E don't get that many ACs anyway.

Looking forward to compete in another of your rounds :)

»
11 months ago, # |
  Vote: I like it +8 Vote: I do not like it

I couldn't do problem A, what a shame.

  • »
    »
    11 months ago, # ^ |
      Vote: I like it +8 Vote: I do not like it

    ‘Think of rising higher. Let it be your only thought. Even if your object be not attained, the thought itself will have raised you.’ — Thirukural

  • »
    »
    11 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    in last div-3 I couldn't solve $$$C$$$ sometimes these things happen

»
11 months ago, # |
  Vote: I like it +8 Vote: I do not like it

Not sure you feel the same. But for me, B > A and C > D. lol

  • »
    »
    11 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Can you give me an edge case for this solution why it is not working B

    • »
      »
      »
      11 months ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      In general, I will write a data generator and a brutal force baseline solution to test it. I did that sometimes in the contest (like for the C today), not a good way but the last resort to self-debug.

»
11 months ago, # |
  Vote: I like it 0 Vote: I do not like it

how to solve c when k = 2?

i tried to take every element of a with the nearest abs(a[i] — a[j]) but it gave wa

  • »
    »
    11 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Just check all pairs. if you have $$$f = abs(a[i] - b[j])$$$, you current answer must be $$$answer = min(answer, f, \text{first_el_greater}(f) - f, f - \text{last_el_less}(f))$$$. The last two can be calculated using binary_search = std::lower_bound. So $$$O(n^2 \log n)$$$

    • »
      »
      »
      11 months ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      oh thanks alot i tried to do this in one of my submissions but i was only looking for the adj elements thanks

  • »
    »
    11 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    maybe you can get a zero if any difference already exists

    • »
      »
      »
      11 months ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      i already handled this by setting the default answer to be min absolute value

  • »
    »
    11 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    make a binary search back in array for that (a[i]-a[j]) to find best move in next run.

  • »
    »
    11 months ago, # ^ |
    Rev. 2   Vote: I like it 0 Vote: I do not like it

    before it, sort(a),then try every s=(a[i]-a[j]), after it, look for minimize(a[i]-s). every step should update answer.

  • »
    »
    11 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    brute force every possible |Ai — Aj| think of bs

»
11 months ago, # |
  Vote: I like it +8 Vote: I do not like it

AdamantChicken2 didn't participate :(

»
11 months ago, # |
  Vote: I like it 0 Vote: I do not like it

I have to say it is a little late for me, but I outdo myself. Unbelievable!!!!

»
11 months ago, # |
Rev. 2   Vote: I like it +20 Vote: I do not like it

You changed the order of picture of problem A and didn't send a notification. Is it because it's not statement?

  • »
    »
    11 months ago, # ^ |
      Vote: I like it +11 Vote: I do not like it

    Additionally, I feel that the description of the new way of movement of the knight in statement A is inappropriate.

    I think we should write statement even someone who doesn't know how the knight in the original chess moves can understand how the knight moves with that statement alone.

    I think the current statement is open to misunderstanding.

  • »
    »
    11 months ago, # ^ |
      Vote: I like it +8 Vote: I do not like it

    I left the contest for this reason.. After some min i refreshed and saw the change (:

»
11 months ago, # |
  Vote: I like it +24 Vote: I do not like it
»
11 months ago, # |
  Vote: I like it +8 Vote: I do not like it

amazing problems! but E and F is too hard for div. 2 (

»
11 months ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

Nice problemset

»
11 months ago, # |
  Vote: I like it 0 Vote: I do not like it

is there a hack phase ?

»
11 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Solved D1+D2 just 5 seconds after final :'(((

»
11 months ago, # |
  Vote: I like it 0 Vote: I do not like it

E is a really standard problem

  • »
    »
    11 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Can you give a slight hint?

    • »
      »
      »
      11 months ago, # ^ |
        Vote: I like it +23 Vote: I do not like it

      Solve it offline and do a dfs.

      When you are in vertex v try to have a segment tree maintaining the distances of other vertices from v.

»
11 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Anyone plz give the idea of A

»
11 months ago, # |
  Vote: I like it 0 Vote: I do not like it
»
11 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Couldn’t solve A pajn. Nice problemset tho

»
11 months ago, # |
  Vote: I like it +11 Vote: I do not like it

Can someone hack this $$$O(n^2)$$$ solution for D2? https://mirror.codeforces.com/contest/1904/submission/236575342

I feel like it shouldn't work.

»
11 months ago, # |
  Vote: I like it +8 Vote: I do not like it
Spoiler
»
11 months ago, # |
  Vote: I like it 0 Vote: I do not like it

This failed on system testing Submission can anyone tell me what is the mistake? n^2logn solutions were not meant to pass for this problem or something else ?

  • »
    »
    11 months ago, # ^ |
      Vote: I like it +4 Vote: I do not like it

    just changing $$$j$$$ from $$$i+1$$$ to $$$n$$$ instead of $$$0$$$ to $$$n$$$ in case $$$k=2$$$. your code runs in 1400 ms. 236577461

    • »
      »
      »
      11 months ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      Bruh :) this small mistake took me from Rank 1700 to 2800, Thanks!!

»
11 months ago, # |
  Vote: I like it 0 Vote: I do not like it

System testing completed for this contest? Any idea anyone?

»
11 months ago, # |
  Vote: I like it 0 Vote: I do not like it

236573136 I believe that my D1 solution shouldn't work in D2 (tl) on max test like this:

1

10

10 9 8 7 6 5 4 3 2 1

10 10 10 10 10 10 10 10 10 10

But it gets accepted with 187/4000ms

can someone try to hack it with

1

200000

200000 199999...

200000 200000... pls? I have some kind of problem with hacking.

»
11 months ago, # |
  Vote: I like it -6 Vote: I do not like it

why problem A is so hard

  • »
    »
    11 months ago, # ^ |
      Vote: I like it +3 Vote: I do not like it

    I think the given picture made it so hard

  • »
    »
    11 months ago, # ^ |
    Rev. 2   Vote: I like it 0 Vote: I do not like it

    I don't think it was that hard but I really started lauging when I understood I have fallen into the well set airhead trap...

»
11 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Didnt particularly like the contest, too structure heavy for me. A-D were easy and E was annoying. C also had a stupid corner that wasnt in the samples and A had the wrong picture. F also looks annoying but ill check edi to see if its cool.

  • »
    »
    11 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Why do you look at pictures?)

    I usually don't look at samples.

    • »
      »
      »
      11 months ago, # ^ |
        Vote: I like it +23 Vote: I do not like it

      My sol was bugged so i thought i misunderstood the problem, it ended up making me understand the problem less.

  • »
    »
    11 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    what was the corner case on C?

»
11 months ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

Can someone hack my D1? 236559856

Pretests were damn weak it seems.

Testcase —

1
5
4 3 2 1 1
3 3 3 2 2
»
11 months ago, # |
  Vote: I like it 0 Vote: I do not like it

5 solves for the first time in a div 2

»
11 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Why doesnt work? C

    if (k == 2)
    {
        sort(fullrng(arr));
        i64 m = numeric_limits<i64>::max();
        
        update_min(m, *std::min_element(fullrng(arr)));

        for (int i = 1; i < arr.size(); ++i)
            update_min(m, arr[i] - arr[i - 1]);

        for (int i = 0; i < arr.size(); ++i)
        {
            for (int j = i + 1; j < arr.size(); ++j)
            {
                auto d = arr[j] - arr[i];
                auto lbnd = lower_bound(fullrng(arr), d);
                update_min(m, abs(d - *lbnd));
                if (++lbnd < arr.end())
                    update_min(m, abs(d - *lbnd));
            }
        }

        solved(m);
    }
  • »
    »
    11 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    got it, if element not present lower bound returns element that greater

»
11 months ago, # |
  Vote: I like it +9 Vote: I do not like it

Surprisingly good contest! Good job!

»
11 months ago, # |
  Vote: I like it +4 Vote: I do not like it

Not sure why everyone thought B was that easy, I solved it but it took longer than A and C.

if they didn't mess up the photos in A I would have solved it faster, I stared at the wrong picture for 10 minutes wondering if I became so stupid to not understand an A problem after not solving problems for more than 2 months

  • »
    »
    11 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Maybe B wasn't that easy but you just needed one observation to solve it

    • »
      »
      »
      11 months ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      Can you give me an edge case for this solution why it is not working B

»
11 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Great contest! Lost some ratings tho...

»
11 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Why does my submission https://mirror.codeforces.com/contest/1904/submission/236601220 pass tests? It fails when the difference between two elements is exactly an element in the array. Example:

Input:

1
2 2
1 2

Output:

troll

Expected Output:

0
  • »
    »
    11 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Seems like missing test cases.

    If k is 2 and there exist three elements a, b, c in the list such that a + b = c, the answer should be 0.

    • »
      »
      »
      11 months ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      Exactly ...

      BTW, how did hack it? I tried to but couldn't find an option anywhere.

      • »
        »
        »
        »
        11 months ago, # ^ |
          Vote: I like it +5 Vote: I do not like it

        I heard that it is only open to people with rating 1900+

        • »
          »
          »
          »
          »
          11 months ago, # ^ |
            Vote: I like it 0 Vote: I do not like it

          Can you give me an edge case for this solution why it is not working B

          • »
            »
            »
            »
            »
            »
            11 months ago, # ^ |
            Rev. 2   Vote: I like it 0 Vote: I do not like it

            You can try this case

            1
            6
            1 1 1 1 3 6
            

            The correct answer will be

            5 5 5 5 5 5
            
            • »
              »
              »
              »
              »
              »
              »
              11 months ago, # ^ |
                Vote: I like it 0 Vote: I do not like it

              thanks for the testcase

»
11 months ago, # |
  Vote: I like it +3 Vote: I do not like it

Its over boyos !!

»
11 months ago, # |
  Vote: I like it +4 Vote: I do not like it

[Rant] Instead of submitting the code for D2, by mistake, I resubmitted the code in D1, getting my first skipped verdict.

When people see "Skipped", resubmission is not the first thing that comes to their mind. So it would be better if there is a "Resubmitted" verdict.

»
11 months ago, # |
  Vote: I like it 0 Vote: I do not like it

I often observe that I am not able to solve problems like B which involve the use of an algorithm in which the answer of a next element is either dependent or is made equal to the answer of the previous element by some means...

is this literally a type of problems ? Like after doing problems of which rating range I'll be comfortable in doing such problems ?

I remember some more times when I was not able to solve div 2 B just because of this..

»
11 months ago, # |
Rev. 2   Vote: I like it -12 Vote: I do not like it

@MikeMirzayanov I have been recently alleged for copying the code as my code was found coinciding to ER_HORIZON_XACS/236530851 and mine was spacedate_xacs/236532464. I know copying code or such coincidence are violation of rules and I have also read the terms and conditions before registering for the round. I am really sorry for such coincidence but this has happened because the account ER_HORIZON_XACS is my cousin brother and we both used same code snippet(made before the contest) for our practice and while round we mistakenly used same snippet too for solving the round questions. I assure you we have made the code differently for the contest round we have only shared the snippet. We are sorry for not caring about the snippet. If possible please return our ratings. I assure we will never do this type of violation again. I also assure we will also use different snippet for solving problems. Please if possible return our ratings.

  • »
    »
    11 months ago, # ^ |
      Vote: I like it -12 Vote: I do not like it

    Yeah we both have shared the code snippet for coding practice and mistakenly used it while contest. We are sorry for that we will not do it again. Please return our ratings.

  • »
    »
    11 months ago, # ^ |
    Rev. 2   Vote: I like it +17 Vote: I do not like it

    Bruh both codes are basically the same, the only thing you change are variables. And I think that this account is clearly your alt.

»
11 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Can anyone help me in a OA? I'll pay

»
11 months ago, # |
  Vote: I like it 0 Vote: I do not like it

good problem C and D :D

»
11 months ago, # |
  Vote: I like it 0 Vote: I do not like it

hmm