Comments

a mediocre olympiad kid is gonna get nothing

ofc. that's the point, you need to become top tier and win something, then it makes sense. otherwise there is no point to do it as you said, agree.

zero ball knowledge. cp was fun, is fun and will be fun regardless of AI state. also, cp has real value once you start applying for jobs, trust me. if you are in school, just do cp and attend olympiads. it's the best way you can spend time there for your future perspectives. whether there will be jobs in the future is another question entirely :)

On PaciukZvichainyi → Busy but Master #1, 20 months ago
+23

why not?)

wrapper around btreeset (aka multiset): https://codeforces.me/contest/2046/submission/297696313

I tried not to touch that set, because HashSet and HashMap are noticeably faster at

I've never had problems with speed btw.

+3

That's basically all I did (mostly upsolving).

On PaciukZvichainyi → Busy but Master #3, 23 months ago
+2

no f way
I achieved everything I ever wanted)

On awang11 → Codeforces Round 996 (Div. 2), 23 months ago
+15

difficulty jump from D to E is insane (no complaints just a fact).
0 div2 guys solved E or F, gg.
UPD: 2 (one — former GM, two — dude who spent two hours on it)

On Cocoly1990 → Good Bye 2024: 2025 is NEAR, 23 months ago
+68
Спойлер
On Cocoly1990 → Good Bye 2024: 2025 is NEAR, 23 months ago
+3

As a tester I can finally write a hint for you guys.

Hell nah. My master dreams are ruined by this fact. I almost went crazy not understanding why my solution wasn't working.

I need to retire from cf to save my hair and eyes :)

sub-10s pb is a solid result. I also had such a goal but my best is 10.1 or something.

Do you use only f2l,oll,pll or more advanced stuff too (oll+pll combined, i forgot naming)?

I haven't yet started (only registered) but already addicted :)

Btw, I want to suggest everyone also write some notes about each problem you solve (if it teaches you something new). This will help you remember new tricks better.

The website is sooo s1mple and beautiful. Tenz1n — css god.

I really like E (although I haven't solved it). It's the kind of problem you can solve step by step.

C — super good.
D — boring in general (good for edu)

Personally, I didn't like this contest because half of the problems involve gcd, half of the problems involve combinatorics, and half of the problems involve gcd + combinatorics.

On cry → Codeforces Round 988 (Div. 3), 2 years ago
+37

KikoRiki

How these tags decided ?

Any user with a CM rating or higher can add tags.

+3

It was so close for AC :(

The feeling when you skip B and can solve D & E is indescribable, feels good.

Why such a small number of participants? Only 7k+ solved A.

Edit: contest without subtasks feels so good.

On PaciukZvichainyi → Busy but Master #3, 2 years ago
0

Oops, miscommunication.

so in general it was one of the worst round during last 3 months

I mean the worst about my performance for the last 3m, the round was good <3

On refactai → Refact.AI Matches, 2 years ago
-33

So you work for free I guess?

On m3tr0 → Codeforces Round 984 (Div. 3), 2 years ago
0

Good to know. Now I will use MLE for this purposes :)

On m3tr0 → Codeforces Round 984 (Div. 3), 2 years ago
0

I also check this condition. Waiting for open tests to confirm that I am acoustic)

On m3tr0 → Codeforces Round 984 (Div. 3), 2 years ago
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?

On m3tr0 → Codeforces Round 984 (Div. 3), 2 years ago
0

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

Spoiler

I agree that it is too much for E. But it seems to me that we have no right to complain, since this is Educ and in fact it is intended for this: you know an algorithm — 3 minutes will be enough for you, if you don't know — you are cooked for the next two hours.

On Hori → Codeforces Global Round 27, 2 years ago
+19

During this contest my mental health dropped to a new record.

On cry → Codeforces Round 979 Editorial, 2 years ago
0

Can you explain your solution a little? I don't get it)

On 1e_9 → Style of Training, 2 years ago
0

I usually do the following:

  • Solve as much as possible without editorial (sometimes hard problems for you can take 3-4 hours or more)

  • Then I read editorial for the next problem I couldn't solve without editorial. I'm trying to imagine how I would have had to think to solve this problem next time (logical steps, simplify statement, etc). This is usually where you learn new cool tricks. This is usually where you start hating your life (if you spend enough time on the first point).

On 1e_9 → Style of Training, 2 years ago
+1

This is not self-promotion (or...), but you can read how I train here: https://codeforces.me/blog/entry/134585

Fun fact: after writing 3 virtual contests, I got +210 in the next two online contests)

you can compress data and use simple prefix sums for calculation.

UPD: nevermind, it's about C.

On PaciukZvichainyi → Busy but Master #2, 2 years ago
+1

This is not good. Now I can't be top1000 and still recieve positive delta :|

I really appreciate you remembered this post. Thanks

bruh. you got me ;)

I thought about bitset too, but in 3 months of solving ~2000-2400 problems, I haven't found a problem that you can't solve without it. The same with multiset.

On PaciukZvichainyi → Busy but Master #2, 2 years ago
-6

Random comment to be in "recent actions". I forgot to mark a checkbox.

0

There is no secret pill, bro. Just solve the problems that are difficult for you to solve. 1900 is too easy for you if you solved 90+. Solve 2200 and realize that you will have to learn so many new things still.

You have to suffer to see progress.

Another list of activities commonly seen on blogs with advices:

  • Solve more atcoder.
  • Practice virtual contests.
  • Improve your mental health — exercise, meditation, etc.

P.S. I'm also an expert, so you have every right to ignore my "low-skill" opinion, but I'm just tired of the "give me advice".

Sure. Here’s how I came up with the optimization:

  1. Notice that if n > 2^10, we have duplicates.
  2. Q: What properties does the XOR operation have that can help with duplicates? A: If we have an even number of duplicates, XOR = 0. If we have an odd number of duplicates, XOR = the number.
  3. We need to precompute two values for each unique number (less than 2^10): pdp[i][0] — the probability of getting value i an even number of times. pdp[i][1] — the probability of getting it an odd number of times.
    Dp base for each number = {1, 0} (100% chance of getting zero times).
  4. How do we calculate these values? Iterate over all values, and for value i (with prob pi), we have two transitions: pdp[i] = { pdp[i][0] * (1-pi) + pdp[i][1] * pi, pdp[i][0] * pi + pdp[i][1] * (1-pi) }. I hope these transitions are clear to understand.
  5. Then, we can reuse the previous solution O(n * 1024), but instead of iterating over all a[i], we will iterate only over unique a[i]. Instead of p[i], use previously calculated probability dp prob_dp[a[i]] for calculating the new dp. Two transitions: if we take an even number of a[i] or an odd number of a[i].

My solution (rust): https://codeforces.me/contest/2020/submission/283652607 In my case cnt array is pdp precalculations.

my O(n * 1024) solution passed (4000ms), so I optimized to O(min(n, 1024) * 1024) and it passed 2500ms.

he really has the last name "ferrari", impossible.

On PaciukZvichainyi → Busy but Master #1, 2 years ago
0

I hope I won't leave after this post. That would be so funny.

0

I believe my first solution for H is hackable. I imagine O(n^2) in the worst case, but it's hard to analyze the complexity.

If someone is interested in hacking, take it)

Basically instead of doing a binary search I'm trying to calculate current result as +1/-1 from the prev result (in the loop). So if we have tests where the result sequence is 0->n->0... then my solution is quadratic.

https://codeforces.me/contest/2008/submission/279227245

+42

coaches don't play

Sorry for the necroposting but this shit(proof) is so beautiful.

I suggest you also run a profiler on your solution to know exactly what you can optimize. Sometimes things take longer than you expect, even when asymptotics is ok.

I used samply several times, for example.

E2 editorial is impossible to understand even if you've already solved the problem before. (or it's just me being weak)

UPD: nah, it's ok.

0

I checked your stat on Codeforces Visualizer 4fun. Why on earth you solved 213 800-rated problems and only 9 1900-rated :)

no blame or something, just curious.

0

In fact, it is very similar to editorial solutions.

For each pair of nodes i and j that are not currently in the same component (I used DSU for this, but a simple visited array will also suffice), we do the following recursion (v1=i, v2=j on the beginning):

  • Find the closest node using the ? query.

  • If it returns one of our nodes, then we can union the two components together since they are directly related.

  • Otherwise, we know some node that is in the middle of our nodes, so we can call the recursion with (v1, mid) and (v2, mid). So at the end of such a recursion (v1, v2) will be in one component (v1 in the same component with mid; v2 in the same component with mid => v1 and v2 in the same component).

I didn't think much about the count of used queries, but I assume it's O(n).

0

I didn't use binary search at all.

Simple recursion with DSU: https://codeforces.me/contest/2001/submission/277397822

Damn, my programming skill is so bad that I couldn't implement C. The first test cases in problems are weak and doesn't help to find even some edge cases. E has no explanation for how Bob wins in the third case. Next year will be our year.

megaspazz

This website is goat, I always wanted to see a timeline as well. But, unfortunately, there are no recent contests.

Wondering how you get the standings for a specific minute using api? Are you just sending standings api request every minute in live?

(from, to) ? longer but readable.

I have a way out — to delete accounts with a rating of less than 1800. (❁´◡`❁)

BledDest!
Aho-Corasick is new algo for me and and read about this in cp-algorithms. They said if you need to find all strings from a given set in text, you need to use "exit links" to make code faster:

storing the nearest leaf vertex that is reachable using suffix links (this is sometimes called the exit link).
Link

As I see, you don't use this links or ncost array does this job?

Thx, never heard about relocation, because never worked with pointers in such way.

wow. I remember old dannyboy20031204 post about his fast level up in cp. And now he is problemsetter. Not Bad.

I don't know exactly but I think you must practise to become a CM.

You are absolutely right. But I have looked for reason why I was bad in this CF. I have already released my emotions.

I can agree with you. After reading D I immediately go to E1. This intuition problems really rage me.

Check my simple solution

-16

D is a bulshit. It's all my words about this contest. Sorryyyyyyy

On Neilish → I am going on a journey, 6 years ago
+5

There are many videos on YouTube you can watch about starting in CP. For example, Errichto or William Lin. The last one has won the IOI 2020. As for me, firsty you must become Red on Codeforces or Atcoder.

Errichto

I think I must become master to get more upvotes and respects from newbies. XD lol kek wtf omg