Comments

As one of their lecturers I strongly recommend you to participate in round! Hope you like it!

It's a big problem, I want to become gray with negative rating!

On vitosevskiEJOI 2023 Teams, 3 years ago
+9

Will participants from Belarus and Russia officially participate in EJOI this year?

As a cheater catcher, I would like to say it is funny

+3

When will the results be published?

Unfortunately, I can't. There is no such setting here

I will be happy, if you teach me dynamic grinding, opPO!

On DrunkMasterUkraine, 5 years ago
0

Konotop has fallen?

It is happy to hear that they stopped

On DrunkMasterUkraine, 5 years ago
0

What the horror... Hold on!

18-th test is 1100 ($$$cnt_0 = cnt_1$$$).

Your program prints 0 (if (zeros == ones) amount[i] = 0;), but the answer is 1. Why?

It is all because we can choose $$$[l; r]$$$ for deleting $$$l$$$ = 0, $$$r$$$ = 2. 110, we delete one zero.

ordered multiset

I have ordered multiset, because in using orset I have comp $$$\textbf{less_eqaul \lt \gt }$$$

std::map

Yes, it gains AC: 130194814

I think he has TLE because of mss.count(). He should use std::map. I think his code will be like:

    int n;
    cin >> n;
    int arr[n];
    for (int i = 0; i < n; i++) cin >> arr[i];
    op_set s;
    ll ans = 0;
    map<int, int> mss;
    for (int i = 0; i < n; i++) {
        if (i == 0) {
            s.insert(arr[i]);
            mss[arr[i]]++;
        }
        else {
            int pos = s.order_of_key(arr[i]);
            ll ans1 = pos;
            ll ans2 = s.size() - pos - mss[arr[i]];
            //cout << ans1 << " " << ans2 << endl;
            ans += min(ans1, ans2);
            s.insert(arr[i]);
            mss[arr[i]]++;
        }
    }
    cout << ans << endl;

Time complexity of mss.count() is logarithmic in size and $$$\textbf{linear}$$$ in the number of matches. So I think your solution is $$$O(n^2)$$$

Yes

0

Yes, I did the same and it worked

Thank you, fixed

+1

I had the same problem. I fixed it by simply writing prime factorization (I counted all prime numbers from $$$2$$$ to $$$ \sqrt {10 ^ 9} $$$))

TL6: https://codeforces.me/contest/1538/submission/119027345

AC: https://codeforces.me/contest/1538/submission/119038949

One day before the contest!

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

no problem

Ok, I will post it

You're welcome

I think 900-2300

On jaber-c.n.mStill unrated!!, 5 years ago
0

You can see it in the announcement of the contest

Yes, you do. It's cf. I can do nothing(

You must register for contest to write it. You can do it until the end of the round.

On AmShZCodeforces Round #722, 5 years ago
0

Because it has O($$$n^2$$$) time complexity

Sory, I'm too late. Only russian in my blog

lucky lucky

Delay is new tradition on codeforces

Well, it's delayed. Here we go again)

I am using CLion and these mistakes are highlighted)

Maybe he is sad because he is red? I think, if you were red, you would be sad because of this situation

All right, I got it

Your submission is $$$O(n^3)$$$

30000! Congratulations!!!!

here: mi = (int)(mi/x)+1;

I think you have overflow

My O(nlogn) solution works without optimizations)

(long long)ceil((double)a / b)

cout<<(ll)ceil((sum * 1.0) / x)<<" "<<sum2<<endl; it gives you OK

Hello! Can you please predict my rating? DrunkMaster

+11

done

Thank u very much!

Done!

Yes

You 're welcome

Thank u!

Register in contest

Done!

Yes

I'm sorry if you can not understand sth. I want sleep:)

I won't do such mistakes later

Yes, you're right!

Ok! Thank u very much!

I will do editorial on russian lenguage then

You can public it in your blog, I will add link

Hello! How you did these opening triangles?

Okay, I will do it too) there would be 2 editorials)

I will public solves later

It may be. I will correct it in blog

why?

UTC+3

Binsearch should return ll, but in your code it returns nothing

Try to find formule. It can be solved with easy formule

0

It can be a good idea! And in addition Div 2.5

+3

Let's find ans with binary search

0

Ok. I think it is good argument

-9

It's my life) lol

+75

Regardless of whether you are a trusted participant of the ten's division or not, if your rating is less than 0, then the round will be rated for you. Lol

-6

Yes, of course)

0

30 minutes is max)

-8

I wish it was not only test)

-15

.

+13

Why not all? It will be not too hard) I wish you luck!)