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

Автор maroonrk, история, 7 месяцев назад, По-английски

We will hold AtCoder Grand Contest 073. This contest counts for GP30 scores.

The point values will be 700-1000-1400-1700.

We are looking forward to your participation!

UPD and announcement about the AI usage in this contest

First of all, I'm terribly sorry for what happened today; Problem C was solved by an AI. It is legal to use AI in AGC contests. However, this rule was adopted under the assumption that we would not provide problems that are solvable solely by AI. What makes the situation worse is that, as far as I know, only paid plans are able to solve this problem. This is especially serious, and I fully accept your frustration.

Of course, I tested this problem (and other problems) with GPT5-Pro until I reached the query limit, and it didn't succeed. I should also note that the initial version of C was asking for a slightly different thing, and I tested the current statement only twice, but I don't think that's the root cause of this incident.

I should have paid more attention to the development of AI. I knew that some hard CF/IOI/ICPC/PE/etc. problems were solved by AI. Many people asked me about whether (or when) to ban AI in AGC. I had several chances to reconsider the rules. However, I was overconfident and thought, "Hmm, there do exist good problems that aren't solvable by AI, so I can just choose them." As you know, I didn't have the ability to identify such problems.

As I said, the current rules of AGC don't restrict the use of AI, so making the contest unrated would feel like applying an ex post facto law. Therefore, my current plan is as follows:

  • Keep this contest rated (and count GP30 scores).
  • Ban AI for future AGC contests.
  • Hold more AGCs to mitigate the effects of this incident.

To realize the third point, I have to reconsider the style of AGC. I'm not exactly sure about what changes to make, but one possible idea is to make a contest that is somewhere between ARC Div.1 and the current AGC.

Again, this is entirely my mistake and I sincerely apologize to all participants. I would also like to express my deepest gratitude to everyone who participated in this contest under such circumstances.

AGC admin, maroonrk

original post on AtCoder

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

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

Auto comment: topic has been updated by maroonrk (previous revision, new revision, compare).

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

    I would recommend to keep AGC with AI support, but make the problems even harder.

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

      Then there may be ~100 people in the world who may solve at least one problem...

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

      I wonder what motivates your opinion, it surely couldn't have anything to do with you having cheated in the last global round, right? right?

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

        I understand your concern. To clarify, I did not use significant AI assistance to solve G in that contest. Most of my boilerplate and some brute-force scaffolding were generated with AI autocomplete by GitHub Copilot, and I occasionally use Pari/GP for quick number theory calculations. It has already been a week since the contest, so I don’t recall every dead end I tried, but I certainly did not paste the problem into an AI to obtain the solution directly. My approach was to brute-force small cases, observe patterns, and then reconstruct the denominator and numerator structure. My solution is outlined here: https://mirror.codeforces.com/blog/entry/146775

        Over 100 participants had already solved the problem before I began that problem btw, so simulation and pattern-spotting felt like the most practical route.

        I admit my use of AI might have been on the borderline intense for G, which is why I have no strong motivation to appeal my skipped score. In future I plan to be more careful.

        On a related note, I am actually in favor of in-person contests without/limited internet access and and or GPT-proof problems (example F from the same contest); while my performance would drop without AI for boilerplate (segment trees, SCC, KMP, centroid decomposition, etc.), I think it would be more fun. On a related note, I was in fact more disappointed at not solving Problem E during the round than pleased about solving G, as E was a simple greedy-on-bits problem with more practical relevance (was able to solve right after the contest ended before the sys tests).

        Thanks for your comment. But I don’t plan to reply here again. We can chat in private or through other means — happy to give more inputs.

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

I have to bring you the bad news that it solved both A and C :(

It is unfortunate that we lost our last AI-allowed contest.

Anyways, thanks for the contest and thank you for updating the rules so quickly.

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

Is there an easier/more intuitive solution to A (other than the editorial)?

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

    How coloring works: you start with a white circle, then for every segment you flip the colors of all the regions in the smaller part. Therefore, for a fixed set of segments, we want regions that are "inside" odd number of segments, but that region must actually exist. Handwavy statement: regions exist if and only if those segments have non-empty intersection and it is a (meta)segment of segments.

    We will consider two separate options: the set is just one segment or it is at least 3 segments. For the first case we must choose this segment and can do whatever with other segments — add $$$n 2^{n-1}$$$ to answer. Otherwise, there will be leftmost and rightmost segment in our set, let's fix that pair. We have to choose them, and also odd number of segments between them (and whatever outside). If there are no segments between, there are 0 choice, but in the other case exactly half of all subsets are good — add $$$2^{n-3}$$$ for each pair of intersecting but not consecutive segments.

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

    We can sum up the contribution of each line individually.

    If we fix the remaining subset of lines and then introduce this line then we get the following segments for this line: $$$L_{c1}, L_{c1-1}, ..., center, R_{1}, ..., R_{c2}$$$ where the "center" is the segment containing the center of the circle. The "center" region is white above the line therefore the introduction of the line creates a new black region below it. $$$R_{1}$$$ was already black before so this line didn't give you anything new.

    For a given line if we have N1 relevant "left" lines (i.e. starting after this line and intersecting it) and N2 relevant "right" lines then as c2 goes from 0 to N2 you get $$$\lfloor c2/2 \rfloor + 1$$$ black regions. You can treat the left and right half independently to get the contribution of a line as $$$2^{N1} * f(N2) + 2^{N2} * f(N1) - 2^{N1 + N2}$$$.

    Here $$$f(x) = \sum {x \choose 0} \cdot 1 + {x \choose 1} \cdot 1 + {x \choose 2} \cdot 2 + ... + {x \choose x} \cdot \lfloor x/2 \rfloor + 1$$$ and the final subtraction is to account for the double counting of the center region. $$$f(x)$$$ has a nice closed form solution. The whole thing needs to be multiplied by $$$2^{|irrelevant\ lines|}$$$ to allow all subsets of the irrelevant lines.

    Finally, each black region other than the "center" has been double counted here for each of the two lines which creates it. To fix this we also double count the center so that every black region is double counted and finally divide by 2.

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

I’ve always hoped that humans would remain stronger than AI on creative problems, and I saw AGC as one of the last contests where problems felt truly new and unconventional. It would be sad if AIs were officially banned from AGC, because to me that would mean:

  1. We’re admitting humans are already worse than AI, and
  2. No one in the community will even try to design AI-proof problems anymore.

That possibility makes me feel a kind of existential crisis ...

(As an aside: I actually think it’s fine if problems can’t be solved directly by AI. For example, take GPT-5 Pro, feed the problem to it in four separate threads, with one query each. If it doesn’t solve it in any thread, I’d consider that acceptable. The current instances of AI-solvable problems won't pass this test. )

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

    We’re admitting humans are already worse than AI

    I think the existential despair you feel has more to do with AI becoming irreversibly stronger than you, rather than humanity in its entirety (analogous to how LGMs demoralize hard-stuck pupils by merely existing). Really smart people haven't ever had to deal with the knowledge that no matter how hard they work, there will always be a sizeable group of people somewhere out there, who could beat them (at whatever intellectual activity one considers) with very little effort (acknowledging this deprives one of a lot of the motivation that competitiveness provides).

    I suppose the experience of having to look at the scoreboard and see hundreds of gloating cheaters (who would obviously be far weaker than you) above would also be deeply humiliating for people who are used to being in the top 20.

    Before AI kills us all, we're probably going to see a lot of highly capable people plunged into similar existential despair due to its "equalizing" nature (for any cognitive task, AI will soon be so much better than the best human in an absolute quantitative manner, that any difference between the 10th percentile human and 99th percentile human at that task would become meaningless (For eg. if the 10th percentile human solves a problem in 100 minutes, it doesn't really matter if the 99th percentile human can solve it in 15 minutes, if superintelligence can solve it in 5 seconds. Both humans will be to AI as ants are to humans. An ant that collects food 20% faster than another member of its species due to some arbitary mixture of genetic and environmental advantages is still an ant in comparison to us.)).

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

      Thank you for your thoughts!

      Until AI systems can propose problems on their own, I don’t believe they will surpass the human community. For example, if you train RL on all CP problems before the segment tree was introduced, it won’t invent segment trees—yet the human community somehow does. Similarly, there'll be ideas where all existing CP problems haven't covered. I think this innovative spirit is essential to CP, making it different from chess / Go.

      Whether someone codes 20% faster or is 50% more familiar with common concepts doesn’t really matter; I agree those advantages will be equalized by AI. What I hope is that we’ll compete on something beyond that: a setting where everyone has access to AI tools and a shared foundation of common techniques, while the real challenge is in developing new out-of-distribution ideas. That’s why I like AGC—the problems are always so innovative.

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

        I think CP had always been about in-sample knowledge. The more I improve, the more I can move things that used to look like novelty into a somewhat predictable framework. If a problem is to be solved quick enough (<= 30 minutes), it is almost always a combination of existing ideas, executed in the correct order or with the correct parameters.

        About innovations, well there still are, but I do think simple, widely applicable innovations (e.g. segment tree, FFT, Linear Algebra) had all been found, maybe except one or two. There are harder innovations but they have proven to been too difficult (implemention-wise) to be included in actual contest for humans: say full dynamic connectivity, or fully dynamic convex hulls. Even proper uses of BBST seems to be out of the question for Codeforces. There are some innovations that are generally knowledge based, but I don't think people generally appreciate them too much as a problem (e.g. segment tree double descends, segment tree beats).

        A competition of this kind roughly exist, it can somewhat be found in academia that seeks to answer unsolved (but generally not the extremely well known) mathematical/ algorithmic problem. There are two issues, (1) is due to the true innovative nature the natural "contest duration" would be months and in some case years, and (2) most solutoins to non-obvious problems generally exceed 30 pages, which I think is already beyond what humans can easily digest.

        • The above discussion relies on my opinion that for example, problem B today, is still very much standard -- it doesn't use anything unimaginable. And I think as long as every step is imaginable, the whole process is still not very creative.
»
7 месяцев назад, скрыть # |
 
Проголосовать: нравится +77 Проголосовать: не нравится

Welcome to post AI era! I am so pessimistic about the future of online programming contest. Rating is just a meaningless number from now on.

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

AI may be a problem but man oh man the problems from atcoder are next level. Top notch alchemy of mathematics and algorithms.

I bet AI will even help create the most mind numbing problems even if it might not invent new algorithms.

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

Problem B shares very similar ideas to HugeGraph from topcoder SRM 600.5. Jiangly wrote a solution for it which is extendable to the AGC problem: https://www.luogu.com/article/qacbujm3

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

In the Problem B, how to prove it's always exist a $$$f(A_1, A_2, \dots, A_n)$$$ jump that corresponds the optimal jump of $$$f(A_1, A_2 - A_1, \dots, A_n - A_1) + A_1$$$ without violating the third condition(Never jump consecutively the same distance in different directions.)?

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

    Edit: sry, i think i misunderstand your question, please ignore this answer.

    Edit: i prove some conclusions, you can see here

    It feels like you first replace each $$$A_x$$$ with $$$A_1 + (A_x - A_1)$$$, and then the new plan will definitely violate the third condition, right? After that, you just merge the adjacent $$$+A_x$$$ and $$$-A_x$$$ moves together.

    This matches exactly what’s described in the fourth paragraph of the editorial.

    And at last, you will find that max right endpoint is smaller by $$$A_1$$$ than before, so just add it.

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

I think there's an approach for Problem B with a time complexity of $$$O(n\log n + \log\max(A)\log n)$$$.

Let's continue using the definition of $$$f$$$ from this editorial. Then, the process of calculating $$$f$$$ is similar to the Euclidean algorithm.

Each time we calculate, except for $$$a_1$$$, all the other numbers are subtracted by the same value $$$x$$$. It's similar to adding $$$x$$$ to $$$a_1$$$ and then subtracting $$$x$$$ uniformly. The relative order of $$$a_2$$$ to $$$a_n$$$ remains unchanged. We just need to restore the $$$a$$$ values to be used before the calculation.

I use a priority queue to maintain $$$a$$$. Initially, inserting elements takes $$$n\log n$$$ time. The number of calculation rounds is $$$O(\log\max(A))$$$. In each round, we only insert and delete $$$O(1)$$$ numbers in the priority queue. The time complexity of the operations is $$$O(\log\max(A)\log n)$$$.

Therefore, the total time complexity is $$$O(n\log n+\log\max(A)\log n)$$$. (There should only be a constant-level difference in the implementation.)

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

I tried to prove some conclusions of problem B. (maybe) helps when reading the editorial (?)

Keyword: first consider how to handle $$$n=2$$$; reduce the size of the original problem.

First consider how to handle $$$n=2$$$: Let the answer be $$$F(a,b)$$$. When $$$a=b$$$, $$$F(a,a)=a$$$; when $$$a \lt b$$$, we can write $$$b=qa+r$$$ using division. We move once with distance $$$b$$$, then we can move $$$a$$$ a total of $$$q$$$ times, reaching position $$$r$$$. If $$$r=0$$$, the answer is $$$b$$$; if $$$r\neq 0$$$, we can convert to a subproblem $$$F(r,a)$$$. But note that when we implement $$$F(r,a)$$$, the actual maximum right endpoint needs to move right by $$$qa$$$, because the step length $$$r$$$ is obtained by first moving right by $$$b$$$ and then moving left by $$$qa$$$.

Arranging this, we get:

$$$ F(a,b)=\begin{cases} 0&r=0\\ qa+F(r, a) & r\neq 0 \end{cases} $$$

We record $$$r$$$ and $$$q$$$ during the whole process. Let $$$r_{-1}=b,r_0=a$$$. For $$$i\ge 1$$$ we obviously have:

$$$ q_ir_{i-1}+r_{i}=r_{i-2} $$$

Suppose $$$F$$$ recurses $$$m$$$ times (including the final return to $$$0$$$), obviously $$$r_m=0,r_{m-1}=g=\gcd(a,b)$$$.

We record the summation process of $$$F$$$:

$$$ F(a,b)=\sum_{i=1}^m q_ir_{i-1}=\sum_{i=1}^m(r_{i-2}-r_i) $$$

The latter has many repetitions. After cancellation we can easily derive the formula for the answer:

$$$ \sum_{i=1}^m(r_{i-2}-r_i)=r_{-1}+r_0-r_{m-1}-r_m=a+b-\gcd(a,b) $$$

Warm up complete. At the same time we obtain an important conclusion: the answer does not exceed $$$a_1+a_2-\gcd(a_1,a_2)$$$ ($$$a$$$ is sorted). In fact we can view it as the answer cannot be greater than or equal to $$$a_1+a_2$$$, which also explains why the problem does not require taking modulo. It is easy to see the above process resembles the Euclidean algorithm; try to derive it to the full solution.

Because the Euclidean algorithm requires recursion, let’s try to reduce the size of the original problem. Let $$$f(a_1,a_2,\cdots,a_n)$$$ be the answer for array $$$a$$$. Give the conclusion first: $$$f(a_1,a_2,\cdots,a_n)=a_1+f(a_1,a_2-a_1,\cdots,a_n-a_1)$$$. Next we try to prove it.

First prove $$$f(a_1,a_2,\cdots,a_n)\ge a_1+f(a_1,a_2-a_1,\cdots,a_n-a_1)$$$, i.e. given a construction of the original problem, derive a construction of the new problem.

We can merge multiple moves in the same direction into a set $$$S$$$, since the answer cannot be greater than or equal to $$$a_1+a_2$$$, so obviously $$$S={a_1,a_2,\cdots,a_n,2a_1,3a_1,4a_1,\cdots}$$$.

Now we choose a value from $$$S$$$ and move that much, and we cannot move in the same direction twice in a row. Because we cannot move in the same direction twice in a row, the moves must be: R L R L R L … R L R L(more clearly: R | L R | L … R | L R | L). It is easy to see that after each R operation, our position is at least $$$a_1$$$.

For the first “R”, suppose it is $$$+a_x$$$, express it in the new problem as $$$+(a_x-a_1)$$$; for the last “L”, suppose it is $$$-a_y$$$, express it in the subproblem as $$$-(a_y-a_1)$$$. Obviously the subproblem’s answer decreases by $$$a_1$$$, so we add it back. But we find that during the middle “R L” operations, after executing “L” in the original problem, the position may be less than $$$a_1$$$, which corresponds to $$$ \lt 0$$$ in the new problem, violating the second rule. Such a middle “R L” operation is written as $$$-a_x +a_y$$$, we can view it as $$$-(a_x-a_1)+(a_y-a_1)$$$. Because in the original problem all positions are $$$\ge 0$$$, after this simplification it is valid.

Then note that we still keep $$$a_1$$$ in the new problem, because the original problem may contain operations of several $$$a_1$$$, so we must keep it in the new problem. But don’t worry about violating the third rule, because the original problem did not violate the third rule, meaning $$$a_1$$$ was used in only one direction, so the new problem will not violate it.

Next prove $$$f(a_1,a_2,\cdots,a_n)\le a_1+f(a_1,a_2-a_1,\cdots,a_n-a_1)$$$, i.e. given a construction of the new problem, derive a construction of the original problem. From the above analysis, similarly we can get that the moves must be “R | L R | L … R | L R | L”, add $$$a_1$$$ to the leftmost “L”, also add $$$a_1$$$ to the rightmost “L” operation, and also add $$$a_1$$$ in the middle "L R", we can likewise reconstruct the original problem without violating the conditions. QED.

In summary, according to the editorial, using the Euclidean algorithm we can achieve $$$O(n\log A)$$$, or use data structures for an even better result.