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

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

Neapolis University Pafos

Привет, Codeforces!

Благодаря поддержке Neapolis University Pafos, продолжается серия образовательных раундов. Университет предлагает получение степени бакалавра в области компьютерных наук и искусственного интеллекта со стипендиями JetBrains. Получите передовые навыки в области искусственного интеллекта и машинного обучения, которые подготовят вас к востребованным техническим карьерам. Любопытно? Вот тут можно узнать больше об учебной программе. Доступно ограниченное количество стипендий. Не упустите свой шанс учиться в Европе бесплатно!

В 23.06.2025 17:35 (Московское время) состоится Educational Codeforces Round 180 (Rated for Div. 2).

Этот раунд будет рейтинговым для участников с рейтингом менее 2100. Соревнование будет проводиться по немного расширенным правилам ICPC. Штраф за каждую неверную посылку до посылки, являющейся полным решением, равен 10 минутам. После окончания раунда будет период времени длительностью в 12 часов, в течение которого вы можете попробовать взломать абсолютно любое решение (в том числе свое). Причем исходный код будет предоставлен не только для чтения, но и для копирования.

Вам будет предложено 6 или 7 задач на 2 часа. Мы надеемся, что вам они покажутся интересными.

Задачи вместе со мной придумывали и готовили Адилбек adedalic Далабаев, Иван BledDest Андросов и Максим Neon Мещеряков. Также большое спасибо Михаилу MikeMirzayanov Мирзаянову за системы Polygon и Codeforces.

Удачи в раунде! Успешных решений!

UPD: Разбор опубликован

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

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

Competitive Programming in 2025 – A Broken Race?

Two coders. Same leaderboard.

  1. One writes 200+ lines, fails test case #83, debugs, and finally ACs.
  2. The other pays ₹25 and submits instantly.

Result?

  1. Both rank above you. One earned it.
  2. The other bought it.

The problem: CP is turning into a “pay-to-win” model.

Impact:

  1. Honest coders feel demotivated
  2. Rankings lose meaning

The spirit of CP is at risk !!

The ask: Platforms like Codeforces, CodeChef, LeetCode must act fast. Cheating isn’t just breaking rules — it's breaking the community.

Let’s keep CP clean. Let’s keep it fair. Agree or disagree?

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

What a cinematic last week we had on cf, this edu will feel good

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

.

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

It would be better if the question stem could be more concise!!!

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

feels good to see an edu round, high hopes from it

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

feels good to see an edu round, high hopes

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

r1033 still makes me feel disgusted...

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

Can we please get hints in Educational Editorials?

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

As a participant, I hope the managers can exclude cheaters from the standing during the round!

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

i hope i can be a specialist and then free of this

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

As a participant, I just wanna enjoy the problem statements and wish everyone goofy luck!

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

Hope everyone moves up to a new title!

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

Good contest

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

Sadly, in Indonesia, the city level qualifiers for its CP nationals will be held the day after this contest, and this contest would be held at 9:35 PM to 11:35 PM the night before, so unless I want to mess up my performance tomorrow I can't participate :(

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

Educational Codeforces Round 180 – Quick Info

  • Date: June 23, 2025
  • Time: 20:05 IST (UTC+5.5)
  • Rated for: Participants with rating < 2100
  • Problems: 6 or 7
  • Duration: 2 hours
  • Penalty: 10 minutes per wrong submission (before full solution)
  • Hacking: Allowed for 12 hours after the contest
  • Format: ICPC-style rules
  • Sponsor: Neapolis University Pafos + JetBrains AI Scholarships
  • Problem Setters: adedalic, BledDest, Neon, MikeMirzayanov

Good luck and have fun!

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

.

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

Hope to enjoy the problemset and solve at least ABC.

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

So we are just ignoring all cheaters last round or is useage of LLM now allowed?

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

Hoping for a better round then the previous one!

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

feels good to see an edu round, high hopes

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

After a few bad contests, I hope this one makes me feel better.

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

I WANT TO PLAY DIV.1 ROUND

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

Codeforces should publish cheaters list after every contest and ban them. This may create fear among potential cheaters.

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

I hope there won't be many cheaters in today's competition.

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

Am I the only one that has tendency to lose rating on Edu rounds?
Therefore I am registering unrated.

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

This is going to be my first contest. Some of my students recommended me to try this website, after I failed to convert them to the atcoder side.

Just clarifying that I am not a beginner and if I'm violating any rules by participating today I sincerely apologize. Make sure to have fun today :)

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

Good luck to all participants!

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

Educational CodeForces Rounds haven't disappointed me for a long long time..!

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

how to solve D? I was root->child<-grandchild->xxx<-yyy...... kind of thing it was producing n-1 good pairs then was trying to change direction of any one leaf node whose depth is greater than 2

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

How to do B?

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

    You can perform at most 1 operation if it's possible.

    I got stuck in this problem for about an hour, too :(

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

    If the array is either monotonically increasing or monotonically decreasing, and no pair of adjacent elements has an absolute difference ≤ 1, then it's impossible to make the array beautiful.

    If at least one adjacent pair has an absolute difference ≤ 1, the array is already beautiful, and the number of operations required is 0.

    If the array is neither strictly increasing nor decreasing, then exactly one operation is sufficient to make it beautiful.

    This is because, in a non-monotonic sequence, there must be a point where the direction changes from increasing to decreasing or vice versa. At this turning point, at least one of the surrounding elements will fall within the range defined by the other two.

    Example: Consider the array [1, 4, 6, 2] The first three elements are increasing with no adjacent differences ≤ 1. But at the turning point from 6 to 2, observe that 2 lies within the range [4, 6] This ensures that applying one operation is sufficient to make the array beautiful. In general, any such directional change guarantees that at least one element from either side of the turn will lie within the other's range [min, max].

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

I hate constructives.

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

What was the solution to $$$D$$$? I thought that you had to have a leaf node with a parent with degree $$$= 2$$$ in order for the situation to be $$$YES$$$ (and then switch around that edge) but that didn't seem to work.

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

The scoreboard of this contest is way more normal than the last one standings. I guess it wasn't the ChatGPT's fault yesterday, something smells fishy...

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

overall a good contest. was only able to solve a , b ,

was working on problem c , but not able to pass on the case.

6

2 3 3 4 5 5

mine was giving 14. I used sorting, two pointers , + maths. to count the valid triplets.

Please let me know, if you guys have followed any other approach. not submitted out of fear

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

Cool E. At first glance, the statement seems intimidating, but after some thought, the solution turns out to be surprisingly simple.

My Solution:

Observation 1
Observation 2
Observation 3
Observation 4
Observation 5
solution

Code:325789361

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

The leader board in this contest is much normal now !

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

Why N is freaking low in B :)

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

UNABLE to open test cases for C problem. Only first test case is visible.

Note : awesome problems. Getting Huge negative delta, but still, awesome the problems.

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

My C almost TLE, my D was 5 minutes too late... sad performance again.

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

Problem B is really funny. First, check if it is "beautiful". If yes, output 0. Otherwise, if there is a maximum or minimum value, output 1. Otherwise, output -1.

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

Could anyone explain why this code ran a tle https://codeforces.me/contest/2112/submission/325747110

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

I misread the Problem B and realized my mistake after wondering about 10 minutes,

but out of curiosity, if we change the condition of a beautiful array from:

there exists 2 consequtive elements with difference <= 1

to:

all consequtive elements has difference <= 1, and the length of the final array >= 2

at what time complexity is this question solvable?

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

Cheaters again. Take a look at this submissions by Yagnik_Dhameliya, lakha_luffy, AbdullahIshfaq: 325754179, 325788858, 325771032

Notice anything strange with those solutions? They have the same "implementation" for generating divisors.

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

where does this approach for C overcount? in some cases its overcounting, 27 32 35 37 45 57 65 65 71 87 96.

// rep(i, a, b) = for(int i = a; i < b; i++)
Solution(){
    int n;
    cin >> n;
    vector<int> ar(n);
    CIN(ar);

    int mx = ar.back();
    ll count = 0;

    rep(i, 0, n-2){
        rep(j, i+1, n-1){
            // k = first element after j such that sum(i, j) > k
            int k = lower_bound(ar.begin() + j + 1, ar.end(), ar[i] + ar[j]) - ar.begin() - 1;
            if(ar[i] + ar[j] + ar[k] - mx <= 0) continue;
            count += k - j; // if k == j, 0 added, so no worries
        }
    }

    cout << count << endl;
}
  • »
    »
    17 месяцев назад, скрыть # ^ |
    ← Rev. 4  
    Проголосовать: нравится 0 Проголосовать: не нравится

    You have made exactly same mistake that I did. and here is your answer.

    [30 , 40 , 57, 69 , 138 ]

    so, when your a[i] = 30 , a[j] = 40 , your k will point at 69, so you will simply add indexof(69) — j = 2. Which is wrong. You can't take (30,40,57). that's an overcount.

    You also need to find lower bound of (a[n] — a[i] — a[j] + 1) and find its index. (lets call that ind2 ) .

    Than your addition to the answer will be k - ind2.

    Look at this code : https://codeforces.me/contest/2112/submission/325822074

    By god's grace, if we both would have GOTTEN AC. somebody would suspect we plagiarised... LOL

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

someone please explain why does O(n^2 * logn) works for C? its almost 3e8 operations and time limit is 2.5sec

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

Expected Rating for D?

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

Why for problem E is a tree (root)g — b — g invalid?

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

in c how n^2 is working isnt it around 1e8 .?

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

In 'B' statement, whoever decided not to put the "sum of n over all test-cases won't exceed 1000" is absolutely genius, lol

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

Was able to solve the first 4

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

Hii

I'm new to hacking. If I do hacking now, and my attempt is unsuccessful, is it going to affect my rank in contest??

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

For Problem B,, for this input:

1

5

1 5 9 13 1

the author's answer is 1,, why not 3??

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

Feels good to see GMs at the top of the standings again

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

Why 325802678 does this fail ? I believe it is (n^2)*(log(n^2))?

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

    st doesn't have all required pair sums at the moment you're doing the query Worse, insertions are repeated — the same a[i] + a[j] is inserted multiple times unnecessarily for different is And since st is not cleared, its size keeps growing → order_of_key() becomes slower → TLE

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

I have a different solution for $$$C$$$ : instead of doing binary search, you can use an cumulative array / prefix array of length $$$10^5$$$ that represents the $$$a_i$$$, and then get the number of $$$a_i$$$ from $$$l$$$ to $$$r$$$ by doing $$$cum_r - cum_{l_1}$$$. So the original $$$O(n^2 log(n))$$$ becomes a $$$O(n^2 + 10^5)$$$ per testcase, so it gives at most $$$10^3 \cdot 10^5 + 25 \cdot 10^6$$$ operations, which is faster than the $$$O(n^2 log(n))$$$ !

325733800

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

finally a good contest with classic CF style problems

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

Can anyone provide me failing testcase for my submission 325842292.

Or point out my mistake. I first generate output for graph like ...->child<-parent->child<-grandchild->... and then flip one edge between degree-2 vertex and leaf node.

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

The logic for qs B was much at the easier side , only we need to check if the number is b/w the two adjacent number or not so that the condition can be satisfied and there is just 4-6 lines of code needed , but indulge in much longer code. And surprisingly it was not me only during the contest many other top coder does the same.

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

Has profile ratings updated?

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

Please, please, don't go down again!

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

Why was CF down for so many hours? @MikeMirzayanov Was there any specific reason?

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

Why was CF down for so many hours? @MikeMirzayanov Was there any specific reason?

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

Can I ask for help? I don't have a rating for this competition because I'm not a trusted participant. I admit that I once participated in div1, and div2 is not my level, but I really forgot my previous account and email because I haven't used them for many years.

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

Is this contest being shown as unrated for all of you or only me?

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

what happened to this contest, guys ?

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

Why my B AC became In Queue??? And also why can't submit problems?

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

When do we expect our ratings?

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

when will the rating publish?

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

In problem D, how to calculate the number of good pairs in a given directed tree? UPD: Got it

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

    good pairs starting from node n = sum(good pairs starting from every child for node n + 1)

    calculate the above recursively for all n, but tbh we dont need to do this in the solution

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

    Use dfs on node have no edge in, if a dead end is reached then res += depth*(depth+1)>>1

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

    What I did was: Create a chain of nodes A->B->C (B must have degree 2 ) Now I have is 3 nodes and 3 pairs Now for each node added to above structure should give 1 new pair We can do this if a node has only out going edges or incoming edges I.e A-> k or k->c because A has outgoing edge and C has incoming edge Keep adding nodes until u have used all the nodes

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

Drop editorial please. I want to know D and E approaches ;)

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

    In D, find a node with degree 2 and make the directions as A->B->C (B is the 2-degree node). Now do dfs from A and C alternating the edge directions as we go. this ensures the ABC triplet contribute 3 good pairs and rest n-3 nodes contribute 1 good pair each making the total good pair count 3 + (n-3) = n

    If there is no node with 2 degree, it is impossible to do this arrangement

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

Hello, this is my 1st comment.

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

can anyone be kind enough to share where can I find problems like E where we work around tree structures to count answers, really facing hard time around these problems.

thanks a lot

think combinatorics + tree filter works ?

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

Do update rating fast... we are all waiting desperately

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

When u have a bad contest, rating gets out next min.__ When u have a good contest, it feels like rating will take eternity to get updated.

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

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

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

Still no rating changes? Has been 2 days.

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

I came here to see the updated ratings. Its weird that they are still not there.

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

Does anyone know why my rating hasn't been updated yet due to the competition?

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

Why hasn't the rating been updated yet?

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

It seems the ratings have not been updated yet after the contest. I’ve never encountered such a delay before — perhaps system testing is still ongoing or there’s a temporary issue on the server side. Hoping it gets resolved soon.

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

when will the rating publish?

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

Why hasn't the rating been released yet?

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

Does this contest became unrated?

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

Why hasn't the rating been updated on Codeforces? Is this contest going to be unrated? Can someone share any information?

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

My code is failing for 2nd question 2112B - 11 - Shrinking Array. Can Anyone help me ? My submisson : 325964066

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

    in your code, it is this part that might be the problem:

    for(int i =1 ; i<res.size() ; i++){
        if(abs(res[i]+res[i-1])<=1){
            cout<<1<<endl;
            return;
        }
    }
    

    when N >= 3 and the array is not originally beautiful, you have to check if the array is sorted in decreasing or increasing order. if it is, then it doesn't work. if the array is not sorted in decreasing or increasing order, then it does work (check the tutorial for the explanation). so you gotta change that part

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

    The bug is from if(abs(res[i]+res[i-1])<=1), try (-4, 4, 2), that is, abs(8 + (-2)) > 1 and the branch gets false, but actually it should be true. The key to this problem is to find a peak or a valley value, that is, a local maximum or a local minimum value. You may replace the branch judgment with if (abs(1LL * res[i] * res[i - 1]) < 0), it works.

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

when the rating will be given

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

rating .

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

When is the rating going to come?****

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

How long does it take to update the ratings? After the disasterous previous weeks contest, why so long updating this constests ratings?

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

When will the rating changes roll out?

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

my rating was not added

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

why's the rating not being updated?

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

Prabhu woh thodi rating aa jati toh sahi rehta..

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

why my rating is not added?

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

Me waiting for rating to update!

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

Please update the rating Can't wait more

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

When will the ratings come?

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

unrated???

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

Bro even Jesus woke up on the 3rd day. Plzzzz do the rating changes.

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

3 days and still no rating change. They should publicly announce if there would be any delay.

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

In question B test like : 4 1 1000 10000 1 I think the answer here will be 2 if we take 1 with 1000 and replace them with 1 the array will be [1, 10000, 1] again take 1 with 10000 and put 1 the array now [1, 1] so the answer is 2

is that right or I misunderstand something

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

    в данном тесте ответ будет все же равен 1, ведь ты можешь взять 3 и 4 число, то есть 10000 и 1, и заменить их на 1000 и тогда массив будет выглядеть так: 1 1000 1000 и разница между 2 и 3 элементом будет равна 0

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

Why is it taking so long for ratings to be displayed ???

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

I can accept that the rating updates are slow, but I don't understand why there hasn't been an announcement explaining this issue.

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

been rapidly checking to see the rating changes, WTF are they doing bro

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

    How did you, as a 1000+ rated, solved 3 problems during the contest and also later upsolved D? why do your submissions have comments, and why are you using big variable names? Pretty suspicious, isn't it?

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

      what the hell maybe you should stop going around accusing basically everyone of cheating! and yeah thats exactly how i code because it gets confusing without comments and proper names it's not like im grandmaster or sth. and as of AI i only use it when i encounter problems with the syntax not for generating the entire code!

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

Will the round be unrated or what? Because there has been 48 hours and the rating changes still hasn't been released.

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

Will the round be unrated or what? Because there has been 48 hours and the rating changes still hasn't been released.

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

At least make an announcement about the expected time for the rates to be updated or if it's gonna be unrated since there are an unusual delay

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

not(Hardworkworking and competent). 3 days no rating changed.

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

hello everyone, I just wanna know that was this contest unrated like I haven't get rating so but I see there was written that rated for div 2

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

Sorry

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

I think this round is unrated.

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

I think this round is unrated.

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

I am a cheater but for a purpose

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

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

is this a unrated round?

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

I guess they forgot that this contest is rated.. I don't mind tbh

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

Hi, I participated in Educational Round 180 (handle: ombelose1304), registered before start, solved 2 problems during the contest, but my rating hasn't updated yet even after 36+ hours. Can someone look into it?

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

Ain't no way we are getting GTA-6 before the rating update of this round.

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

I'm going to sleep now. Hopefully, the rating gets updated by the time I wake up.

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

How it feels waiting for the rating changes

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

Hopefully they’re doing a thorough investigation and purging all the AI cheats. The hacking round needs to be extended to contain a cheater catching phase

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

.

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

Why it's taking too much time to show rating??

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

At least they should make an announcement to clear everyone's confusion.

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

Why have the rating changes not rolled out yet?

Been 3 days :(

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

The hell is going on?... atleast admins should clarify what's going on... we all r waiting from 3 days yet don't have any clue ...

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

I think there are many cheaters

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

What a facinating problem the E is!!!

Besides, why the editorial is not connected to the competition page?

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

I solved first 4 probs why is my rating 581 only @organisers

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

Hello Codeforces team,

Handle: khanna_dhruv
Submission ID: 325731757

Hello, I received a system message saying my solution to problem 2112B in Educational Round 180 coincided with another user's submission.
I want to clarify that I wrote my code entirely on my own using Sublime Text on Ubuntu, without using any online IDE like Ideone or sharing it with anyone.

If the match is real, it may be a coincidence — or perhaps the result of using a similar idea for the problem. I'm happy to provide evidence that helps verify this.

Please let me know how I can assist further.
Thank you for your time.

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

Dear Codeforces Team I don't know why you skipped my submission of probelm C of this contest, and messaged me that my solution coincides with other people solution, even though I did that problem myself and used standard technique of two pointers to select first two no and iterated in a loop for selecting 3rd number. I also viewed submission of other people whom you said it coincided and they were also using it. But there was no fault of mine for using a standard technique used by many other. I hope you see into this matter and resolve this.

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

Ban all these cheaters ^^^

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

Hello CODEFORCES, I just got message that my submission match with another guy I have added comments to explain the way I think and I just resubmit them please check them

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

.

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

.

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

.