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

Автор m3tr0, 22 месяца назад, По-русски

Привет, Codeforces!

Хотим пригласить вас поучаствовать в Codeforces Round 984 (Div. 3), который состоится в 02.11.2024 17:35 (Московское время). Вам будет предложено 7 задач и 2 часа 15 минут для их решения. Штраф за неверную попытку будет равняться 10 минутам. В раунде могут быть интерактивные задачи.

Раунд пройдет по правилам образовательных раундов. Таким образом, во время раунда задачи будут тестироваться на предварительных тестах, а после раунда будет 12-ти часовая фаза открытых взломов, после её завершения все успешные попытки будут перетестированы на успешных взломах. Мы постарались сделать приличные тесты — так же как и вы, мы будем расстроены, если у вас будут падать решения после окончания контеста.

Напоминаем, что в таблицу официальных результатов попадут только достоверные участники третьего дивизиона. Это вынужденная мера для борьбы с неспортивным поведением. Для квалификации в качестве достоверного участника третьего дивизиона надо:

  • принять участие не менее чем в пяти рейтинговых раундах (и решить в каждом из них хотя бы одну задачу)
  • не иметь в рейтинге точку 1900 или выше.

Независимо от того являетесь вы достоверными участниками третьего дивизиона или нет, если ваш рейтинг менее 1600, то раунд для вас будет рейтинговым.

Задачи были составлены и подготовлены командой, состоящей из Seny, eugenechka.boyko.2_0-0 и меня.

Раунд основан на прошедшей недавно Липецкой командной олимпиаде школьников по программированию. Обратите внимание, что если вы являетесь участником олимпиады, вам не разрешается участвовать в этом раунде. Спасибо координатору этой олимпиады myav и составителю Small_machine, задачи которого не вошли в этот раунд из-за высокой сложности.

Мы очень благодарим:

Мы надеемся, что задачи покажутся вам интересными. Удачи!

UPD.: Разбор

  • Проголосовать: нравится
  • +75
  • Проголосовать: не нравится

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

Looking forward to Round 984. Let’s have a good contest. Good luck, everyone!

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

As a tester i almost became a tester and I am happy about it.

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

As a non-tester, I did not test it.

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

as a tester, i can assure you that these problems are, indeed, problems!

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

Even though I will be considered a trusted participant, when I'm trying to register, it says, "You are registering "out of competition" reason: rating should be between 0 and 1,599 in order to register for the contest." Why is it so?

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

as a tester, i want to sleep, i hope you enjoy the tasks

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

hope to enjoy this round

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

what is the difference between div1, div2 and div3? Is it only the level of difficulty?

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

    Yes, div1 is the hardest, div2 is slightly easier (often, div 2 contests run in conjunction with div1 contests, where the div 1 contest starts with the div 2 C problem), then div 3 is easier (I'd say div 3 E is equal to div 2 C in a lot of cases), then div 4 contests (which aren't as common) are the easiest

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

i went to daycare with testers!!!

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

Finally! An adequate round without pendochinese authors!

With love to my kittens

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

promlems❌ problems✅

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

There is a typo on the last row, it should be "problems" not "promlems".

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

As a time traveller, this round is going to be historic. Also, the replies to this comment will be filled with "this aged like milk" after the contest. Good Luck!

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

What?Interactive!Oh,my,god.I have don't konw that do this problems.

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

justlm orz

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

aiming for pupil this round

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

No interactive problems pls T_T

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

Hope to be expert soon.

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

good lucky!

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

Guys, can someone please provide me the standard template for an interactive problem, it would be of great help.

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

I am Vladosiya fan

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

Is E maximum flow problem ? :laugh: :laugh: :sob: :laugh:

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

Is E maximum flow ?

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

wish to be pupil after this round.

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

As a contestant, I hope I don't make stupid mistakes.

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

As a F1 fan I hope Norris wins the sprint race while I AC div3.

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

I'm new to Codeforces. Is this contest useful for me?

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

specialist plssssssss codeforces

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

Where can I read editorials for the contest?

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

I've enjoyed F, cool problem, thank you.

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

nice tasks

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

implementation forces

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

What is the purpose of problems like D?

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

so much cheating today

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

implementation forces sucks..

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

liked this round :)

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

problem D description could have been better ngl I spent first 1 hour on problem reading question wrong this layer thing could be highlighted instead of writtenn in small font I though you have to traverse clockwise on every cell smh

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

I hate it when the time limit for problem F is 1 second

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

    That's cuz I guess we can do it O(1) using range xor properties.

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

      that is true!

      first of all, $$$a \oplus b = c \Rightarrow a \oplus c = b$$$, so we need to find xor on range $$$[0;\ n]$$$. let the number $$$x$$$ be $$$(i,\ k)$$$-good if $$$x \equiv k\ (\mod 2^i)$$$.

      $$$\DeclareMathOperator{\xor}{XOR}$$$ let's try to find xor of all $$$(i,\ k)$$$-good numbers from $$$[0;\ n]$$$. firstly, all numbers from $$$0$$$ to $$$n$$$ are $$$(0,\ 0)$$$-good, and finding xor of all numbers is a popular task (you can find many implementations of it). let $$$\xor(n, i, k)$$$ be xor of all $$$(i,\ k)$$$-good numbers $$$\le n$$$. then

      $$$\xor(n, 0, 0) = \begin{cases} n, &\textrm{if } n \equiv 0\ (\mod 4)\\ n \oplus (n - 1), &\textrm{if } n \equiv 1\ (\mod 4)\\ n \oplus (n - 1) \oplus (n - 2), &\textrm{if } n \equiv 2\ (\mod 4)\\ n \oplus (n - 1) \oplus (n - 2) \oplus (n - 3), &\textrm{else} \end{cases} $$$

      now, let's find xor of all $$$(i,\ 0)$$$-good numbers. one thing to notice is that $$$2^i \cdot a$$$ is the same as bitshifting $$$a$$$ to the right, so this case is equivalent to the last one with one exception. let $$$f$$$ be the biggest number, such that $$$2^i \cdot f \le n$$$. then

      $$$ \xor(n, i, 0) = \begin{cases} 2^i \cdot f, &\textrm{if } n \equiv 0\ (\mod 4)\\ (2^i \cdot f) \oplus (2^i \cdot (f - 1)), &\textrm{if } n \equiv 1\ (\mod 4)\\ (2^i \cdot f) \oplus (2^i \cdot (f - 1)) \oplus (2^i \cdot (f - 2)), &\textrm{if } n \equiv 2\ (\mod 4)\\ (2^i \cdot f) \oplus (2^i \cdot (f - 1)) \oplus (2^i \cdot (f - 2)) \oplus (2^i \cdot (f - 3)), &\textrm{else} \end{cases} $$$

      lastly, $$$0 \le k \lt 2^i$$$, so $$$k$$$ changes only $$$i$$$ last bits of a number. that is why we can deduce the following (assuming $$$f$$$ is the maximum number, such that $$$2^i \cdot f + k \le n$$$)

      $$$ \xor(n, i, k) = \begin{cases} 2^i \cdot f + k, &\textrm{if } n \equiv 0\ (\mod 4)\\ (2^i \cdot f + k) \oplus (2^i \cdot (f - 1) + k), &\textrm{if } n \equiv 1\ (\mod 4)\\ (2^i \cdot f + k) \oplus (2^i \cdot (f - 1) + k) \oplus (2^i \cdot (f - 2) + k), &\textrm{if } n \equiv 2\ (\mod 4)\\ (2^i \cdot f + k) \oplus (2^i \cdot (f - 1) + k) \oplus (2^i \cdot (f - 2) + k) \oplus (2^i \cdot (f - 3) + k), &\textrm{else} \end{cases} $$$

      now, let $$$\xor(l,\ r,\ i,\ k)$$$ be the xor of all $$$x$$$ such that $$$x$$$ is $$$(i,\ k)$$$-good and $$$l \le x \le r$$$. then $$$\xor(l,\ r,\ i,\ k) = \xor(r,\ i,\ k) \oplus \xor(l - 1,\ i,\ k)$$$. then, answer to the problem is just $$$\xor(l,\ r,\ 0,\ 0) \oplus \xor(l,\ r,\ i,\ k)$$$, cause every number is either interesting or good

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

For Problem-E, how to reduce the time complexity?
My current Implementation gives me TLE

Each Query * Each Country * Each Region (q*n*k)

CODE

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

How is this even possible in problem G?

submission

    assert!(first != second && second != third && first != third);
    assert!(ask(io, first, first) != 0);
    assert!(ask(io, second, second) != 0);
    assert!(ask(io, third, third) != 0);
    assert!(first <= n && second <= n && third <= n);
    assert!(first >= 1 && second >= 1 && third >= 1);

Basically I check that my answer satisfies all condition, but I still got WA2. In rust asserts work in release code too, so I'd expect RE if my answer is wrong. Am i dumb?

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

Tried so hard,

Got so Far,

But in the End,

got 6k rank .....

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

Problem D is kind of an extension of the Leetcode problem spiral-matrix.

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

Absolutely absurd.

Wasted so much time on C and btw Java's substring is O(N). How on earth is that even possible! Could've solved even D if it wasn't for this retarded language.

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

For problem C can anyone please tell what is wrong with this solution: Submisssion

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

F was very good about the idea I wonder if there any other solutions

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

    This is my solution — https://pastebin.com/BCxvvJH8, my idea was to basically first find the XOR of all the numbers in the range [L,R], and then find the first & last occurrence of number of type x , in the range [L,R]. Then observe if the count (number of such numbers in the range) is odd then k contributes to XOR, else not. And the XOR of such numbers can be proved to be the rangeXOR(firstcount, lastcount). The answer would be the XOR of all these i.e. (XOR of numbers from L to R)^(XOR of numbers from countofx_morethan_L to countofx_till_R)^(k)).

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

implementation forces lol

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

pD and pC are exactly the same problem with annoying implement. No skill on pD, just implement, really bad problem.

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

I'm a happy man now after all the practice is actually paid off, result is yielded (I peaked my performance). Thanks for the div 3 contest.

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

interesting F

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

Is G a can be a ternary search problem, or it is necessarily a bit problem?

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

G is interesting and difficult tbh.. G2. Ruler (hard version) didn't help me to come up with some useful thoughts..

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

D was extremely annoying. It shouldn't have been a part of this contest, especially when spiral matrix (on leetcode) is such a well-known problem.

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

Bitwise-Forces :D

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

Can someone please explain what is expected in Problem F. (I didn't quite get that expression itself). Thanks in advance.

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

    If you know python, I give you my naive code that express the F problem (of course this is just naive approach)

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

ImplementationForces

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

Problem F sucked.

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

respects to the authors but my honest review is that the contest was 'senseless' and of less quality. I gave up when I saw C and D and realised you just need to write a bunch of code and waste lots of time debugging (you could say I have implementation skill issue). D was also soo similar to spiral matrix on leetcode. I just felt demotivated moving forward.

Maybe I have to work on my implementation but traversing a grid in some beautiful way does not improve my thinking.

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

BS forces

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

BITWISE-forces :D

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

I appreciate the effort of the authors of this contest, But the problems were not that good, I feel like I didn't learn new things in this contest or even have fun while solving the problems as they were just implementation, and other problems were very standard problems.

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

How to solve C ? what is the best complexity ?

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

In Problem G, why is this (https://codeforces.me/contest/2036/submission/289601805) code giving Idleness limit exceeded error?

I am flushing after each cout. Besides on my local compiler it is working fine (can it be possible an interactive problem messing up in submission verdict but working fine in local?)

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

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

Thank you very much for the contest.

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

Can someone please help me why my submission for problem E isn't working. I spent a lot of time but wasn't able to figure it out.

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

Nice problem F.(only problem which required thinking in A-F).

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

In Problem F, could someone please clarify the meaning of $$$x \not\equiv k \pmod{2^i}$$$?

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

I think this is a very good contest given that it targets participants with rating < 1600.
I solved problems A-E which didn't really require a lot of thinking to find the main idea but these problems did need some thinking to find the most effective way to implement solutions as well as some skill and focus to write the code and test it.

For me, I didn't consider alternatives to implement the main idea and that's why I suffered and never have a chance to even look at problems F and G.
If problem F and G requires some thinking, like a Div 2 D, then this is a very good contest for Div 3.

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

Can anyone help me figure out why the response from judge in my submission is negative?

submission

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

Someone please hack this https://codeforces.me/contest/2036/submission/289514229 string parameter of check() function isn't passed by reference , so it took 2.5seconds. Later i corrected it and submitted again and it ran in 100 ms. So i suppose passing by value should result in TLE for certain test cases??

»
22 месяца назад, скрыть # |
Rev. 3  
Проголосовать: нравится +18 Проголосовать: не нравится
A Python script to test solution on problem G
»
22 месяца назад, скрыть # |
Rev. 2  
Проголосовать: нравится 0 Проголосовать: не нравится

in problem D layer is defined as closed strip
also there is defined no defined start point so this means that layer is circular
so why this solution 289520489 is incorrect

Polycarp became curious about how many times the number 1543 would appear in all layers∗ of the carpet when traversed clockwise

Edit : the layer is circular, my code fails on some other issue

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

some one please tell me why this python solution 289486115 gives TL

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

i did ABCD in contest, read E, and couldnt bother writing the code after getting the idea in 5 seconds, and after that i just didnt bother doing the rest of the contest, and i wont bother to read F and G, since ABCDE are just boring, unoriginal and implementation based problems. this is probably the worst div 3 i participated in, and was actually probably the first contest i actually just quit doing in the middle of the contest due to how boring it was, even though i knew the solution to the problem. im sorry if its harsh, but i think being honest and giving genuine feedback is the most important thing, and I hope you improve in your problemsetting skills.

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

As a hacker I hacked 50 solutions

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

THIS IS THE MOST TERRIBLE CONTEST EVER. weak tests for E, implementation for ABCE, and almost no algorithms involved. My solution had an obvious error in it and it passed the tests for E.

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

I don't seem to understand the expectation people have with Div.3 and why they didn't like the problemset. It seemed that the problemset was balanced. Only thing I can add is that the language could've been better, Apart from it I don't see any other negatives. I liked writing the binary search code for problem E. and other problem seemed good as well for Div.3.

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

    Thank you for support!)

    Many participants did not like that in some tasks it is much more difficult to realize the idea than to solve the problem. I understand them and agree that this is wrong

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

    The authors promised that tests would be decent. But pretests turned out to very weak tests... So, people blame the authors.

  • »
    »
    22 месяца назад, скрыть # ^ |
    Rev. 2  
    Проголосовать: нравится +1 Проголосовать: не нравится

    General problem with div.3 and ABCs is that they have several problems in the beginning that are basically a waste of time. I'm not saying this is a bad problemset design, but what happens is that ABCs and div.3 mainly teach people how to code fast without thinking that much and when they start solving ARCs and div.2 completely different skillset is required and there is no gradual transition between those contest types.

    The only real solution that works for me in div.3\ABCs now is changing the order: instead of ABCDEF doing something like DEFABC or EFABCD, so that I can enjoy harder problems first and then solve easy ones if there's time left, which makes contest experience much better.

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

I thought the problems were alright, A-E are mostly implementation, but you can make them relatively simple with the right approaches. F was nice, I tried to figure out the xor properties on ranges for a O(1) answer, but just got a headache instead

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

Overall this contest wasn't good, I disliked that D was purely implementation, and E had a rather wordy statement. I heard that F and G were actually fun, so I will upsolve those and hope to feel the same way, however for the first 60% of the contest, it was quite bad. Tasks should, even if educational, have some observations. Not only was D lacking observations, it wasn't even educational, anyone could mindsolve in a very short amount of time, and it would fully depend on whether they could implement well or not. While that is still skill dependent to some extent, tasks should be educational imo, as that is the true value this site provides in the first place. E was ok, however it could have been written more clearly. While I know I've said some harsh things here, its because I'd like to see improvement from the authors in the future if they decide to continue setting rounds. If they read this, please note it is constructive criticism, not an insult, even if its worded harshly. Thanks for the contest either way.

(also after seeing someone not check l>r and still pass for E, please make pretests better (this ones more funny than depressing though lol)

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

I think G is a good problem, but I don't know how to solve it until now. :(

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

    This is what the content part of my solution for G looks like. Try to understand why it is correct (and why naive binary search isn't correct)

    l n, num1, num2;
    
    l req(l le, l ri, l num) {
        if (le > n) return 0;
        if (ri > n) ri = n;
        
        printf("xor %lld %lld\n", le, ri); fflush(stdout);
        l res; scanf("%lld", &res);
        
        if (num > 1 && le <= num1 && num1 <= ri) res ^= num1;
        if (num > 2 && le <= num2 && num2 <= ri) res ^= num2;
        return res;
    }
    
    void solve() {
        scanf("%lld", &n); num1 = 0; num2 = 0;
        l start = 1LL << (63 - __builtin_clzll(n));
    
        for (l i = start; i > 0; i >>= 1) {
            l res = req(num1 | i, num1 | (i * 2 - 1), 1);
            if (res) num1 |= i;
        }
    
        for (l i = start; i > 0; i >>= 1) {
            l res = req(num2 | i, num2 | (i * 2 - 1), 2);
            if (res) num2 |= i;
        }
        
        printf("ans %lld %lld %lld\n", num1, num2, req(1, n, 3));
        fflush(stdout);
    }
    
  • »
    »
    22 месяца назад, скрыть # ^ |
     
    Проголосовать: нравится +1 Проголосовать: не нравится

    I usually dislike XOR problems in general, but I should say this one was very fun to solve for me. It requires only a few but nice observations while it doesn't involve any complicated formula.

    Interestingly, problem F was the exact opposite style of this, and I had a very painful time and wrote a very terrible implementation for it :(

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

I want to go to sleep and I'm already out of energy to respond to all the comments/feedback/accusations that I really want to respond to) But I'll read and consider every comment anyway

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

I tried F and G. F was nice, and I can't solve G yet. Nice problems.

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

does anyone know where is editorial(i am new i don't know where to get editorial)

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

I have participate in it. It was really good contest.

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

Really enjoyed F and G :D

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

I personally don't understand why there's so much complaining. As someone who is actually Div. 3 level, the actual intended audience of the problem set, I don't see how it's significantly different from many other contests I have participated in. Perhaps D needed to be swapped with something else, but even that seemingly simple problem took me a while to write the solution. Meanwhile top competitors implemented this quite easily, which shows I have a lot of work to do to improve even the implementation of solution after understanding what is required.

On another note, it is very disappointing how many cheaters compete on CodeForces. It becomes evident if trying to have a go at hacking that a large amount of contestants are blatantly copy and pasting code directly from ChatGPT and/or copying solutions from others. There was such a blatant group of cheaters for Problem E that I had to post here for documentation purposes. It will be interesting to see how many out of this group of 79 cheaters with essentially identical code (ignoring their attempts at obfuscation) get caught by the plagiarizing detection system.

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

My rating was 781 before i give this contest . In this contest i solved 2 problems . But my rating did not increases. I do not know why this occur. In this blog i read that less than 1600 rating will be rated. But my rating did not increase. Can any one help me with a answer?

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

in problem E some people use

int i= lower_bound(a[r].begin(),a[r].end(),c)-a[r].begin();

high=min(high,i); // tourist

and some use

high=min(high,i-1) // abc864197532

and both work

why not

int i= lower_bound(a[r].begin(),a[r].end(),**c-1**)-a[r].begin();

high=min(high,i);

plz some explain

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

    In Tourist's solution the valid range at the end is [low, high), for the other it's [low, high]. Finding c-1 may not work because of how lower bound works: it finds the suitable position for c-1, that position can have the value c as well. So you'll have to take extra steps to make sure you are avoiding a bad high index with c. Unfortunatly, I made a silly mistake somewhat similar to this. Inspecting my submissions may help understand this better.

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

Is there a way to check the code for plagiarism in contests?

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

I tried problem C using Segment Tree, where each node contains the substring in the interval [l,r], and a boolean value that stores the truth value of whether "1100" is present in the substring in range [l,r]. This can be implemented in O(|s|+q*log|s|). Submission Link: https://codeforces.me/contest/2036/submission/289723009. Why do I get a TLE?

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

    Building your segtree takes O(n^2) time because you are storing the whole strings in the node and combining two nodes takes O(n) time for the string concatenation. To solve this, try only storing the ranges [l,r] of the original string in each node. I think you can also implement it in a way that doesn't need to store the ranges.

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

Is a recalculation still ongoing? I hope I didn’t pick Unrated participation. :(

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

Where is the editorial ?

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

Good problems, maybe too much of implementation. I was close to solving F didn't have time left.

Nice work AUTHORS.

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

Worst contest ever.. like wth.. u accepted the solution during contest but after the contest u declared it wrong..!!!!!!!!!!

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

Hi all, i participated in the contest, and solved 3 problems, but here it is only showing that I did 1? What could have happened? They were all accepted in the contest...

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

Does anyone have working solution for problem B in python. Mine got hacked.

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

first time FST TLE in test 41, bingo cell crossed rofl (painful af)

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

Congrats on having the shittiest pretests so far.

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

Can anyone point out the edge case I might be missing ?

My solution My approach is to see the difference corresponding value is making , change , before and after . Intially I am counting how many "1100" are possible then based on query I am checking all different scenarios .

Four for each (0 & 1).

Suppose for '0' , cases we loose a "1100" . If we place at first '1' or second '1' .

We gain if we have string like "1110" or "1101" where jth index is correspond to not un necessary 1s.

I am unable to figure what I missed .

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

Judging by the speed of system tests, it seems Mike himself is validating every submission by hand

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

Thanks for the contest, loved it.

I just wanted to leave this here xD

best-meme-templates-16-copy

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

i have submitted solutions and they were accepted but why am i not still rated

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

Where is editorial

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

289515042

The time complexity is O(t(q+n)), right(ignoring the map queries). Then why is it taking 2999ms to run ? The time limit was 3s, so somehow managed to pass. How do I optimise it further ?

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

when rating upd?

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

My submission is 289489137.Why can not use find function? Why can't we use the find function? Isn't find O(n)? I see a lot of people are O(n).

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

Why are the rates not coming?

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

Why is the rating still not updated?

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

The worst problem statement award must goes to problem D

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

The worst problem statement award must goes to problem D

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

Can Anybody explain me the F solution pls? I really cannot get it. Thankiu :'))

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

I submitted my solution for problem 2036E in the recent Div3 contest held on November 2, 2024. My solution was flagged for violating Codeforces’ plagiarism policies. I am writing this comment to explain to the organizers that it was purely coincidental that, out of 32,995 participants, my solution was similar to that of 30 other participants — a similarity rate of just 0.09%. This minor probability of similarity can occur, as the approach to the problem was straightforward; while the logic might resemble other solutions, the variable names and their handling in my code differ significantly.

All participants with similar solutions, including myself, used C++ to submit the answer, as the problem required an approach that naturally aligns with a deque-style method using specific variables like n and k, as outlined in the prompt. While the overall approach may seem similar, the specific handling of elements within my code is distinct.

This situation reflects poorly on the sponsoring team, as it discourages participants who invest their time in the contest only to receive a plagiarism penalty for such a negligible similarity of less than 0.1%. I am sharing both my code and that of another user to show that, although we followed a similar approach, the variable naming and output methods in my code are unique. My variable naming style remains consistent across contests, demonstrating my approach to problem-solving. Additionally, given that solutions often follow a linear sequence, many steps inevitably look similar across languages, contributing further to these coincidences.

My code: Submission link: https://codeforces.me/contest/2036/submission/289574722 Second code: Submission link: https://codeforces.me/contest/2036/submission/289549723

Msg I received from team : "Attention!

Your solution 289574722 for the problem 2036E significantly coincides with solutions kanose7734/289549723, Sana_Azeem5/289550646, Yasin_MalekAlaie/289551343, yaduvanshi_23/289552002, adityavermanov/289552027, hkm_12345/289552059, priyajgangwar1/289552369, competitivecoder96/289553096, TheFatCoder/289553363, WrongAnswerAtTest1/289554884, gopi2005/289555485, tsundere_/289556958, meetanupam/289557228, Coderv55/289557451, addme/289557594, sanhayu546/289557896, Barun34/289558238, faruk_kk/289558267, king2008/289559182, Thavar/289559273, Surgeon_of_Hell/289560879, Devendra_19/289561369, chandan_7499/289562386, java_unfriendme_/289563028, Nooooooooooooooobbxhj/289563164, rito_b/289564867, Aman6523/289565402, tleTauhid/289565714, Ashwinikumar23/289565761, viveksahus9368646191/289565963, Hitler_10/289566931, Proff_Shawn/289567180, hassan.masry1979/289567442, flamingo123/289568361, rohangarg1446/289568731, thecodereal55/289569272, i.ravi.pratap/289569547, Abhishek_Das_003/289569975, code_100m_amgf/289571326, yuv5120/289571633, anjali_4876/289571788, ayushisharma04/289572399, ashrafbhai005/289572862, -333/289572907, garvit27/289574722, Satyam8932/289575263, ashrafulalam005/289576543, purvk/289577280, akshar_bansal/289578363, Parthavinolover/289587465, Er/289588574, SinC_Nohara/289589042, ill.soul/289589212, 015-Daniil-M-2027/289589305, im_subhash/289589644, sanskardhyani98/289591022, yerwxzq/289591708, Tanishq_codegrandmaster2/289592436, Om3466/289594176, Jayesh_02/289594259, Tah1rTheT1ger/289594506, kaido7/289594658, Mubtasim_92/289595881. Such a coincidence is a clear rules violation. Note that unintentional leakage is also a violation. For example, do not use ideone.com with the default settings (public access to your code). If you have conclusive evidence that a coincidence has occurred due to the use of a common source published before the competition, write a comment to post about the round with all the details. More information can be found at http://codeforces.me/blog/entry/8790. Such violation of the rules may be the reason for blocking your account or other penalties. In case of repeated violations, your account may be blocked."

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

i got an email signifying how my solution https://codeforces.me/contest/2036/submission/289553791 matched with these solution https://codeforces.me/contest/2036/submission/289555438 which are written in c++ and mine solutions are written in java? how are they matching??? m3tr0 look at this and my solution is also sent before these solutions.

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

    Hi. Neither I nor the other setters have anything to do with bans for plagiarism. That is done by the Codeforces administration. I do not belong to them and I cannot consider such appeals in any way — I am a user like you

    I'll pass on that there are yours and other such appeals in the comments of the announcement, but I'm sure they're already aware of them