Mitpro's blog

By Mitpro, 3 weeks ago, In English

My team and I are making a contest, we intend to do a Div. 3, but what do you guys want?

Div. 3

Div. 4

Full text and comments »

  • Vote: I like it
  • -18
  • Vote: I do not like it

By Mitpro, 7 weeks ago, In English

Friends from around the world. Today, I have assembled you here for a mission unlike any before. A mission that will go down in history.

For centuries, humanity has built civilizations, crossed oceans, landed on the Moon, and invented the internet. Yet one challenge remains unconquered.

We haved't rickrolled greateric enough!

We are aiming for so many Rickrolls that he starts questioning EVERYTHING he sees.

For too long, greateric has lived a peaceful life, clicking links without being rickrolled. That ends today.

I ask everyone to work together. Think of every possible way to Rickroll him!

Together, we will begin a new era. Operation Rickroll starts now.

Full text and comments »

  • Vote: I like it
  • -17
  • Vote: I do not like it

By Mitpro, 2 months ago, In English

This is a cool problem I thought of, I challenge you to solve it (please put the solution in spoiler in the comments):

This is an interactive problem

There is a hidden array $$$a$$$ of size $$$n$$$.

You can ask at most $$$2n$$$ queries of type:

  • $$$?$$$ $$$i$$$ $$$j$$$ ($$$1 \le i \le j \le n$$$) — the jury will answer $$$a_i$$$ $$$\oplus$$$ $$$a_j$$$. Where $$$\oplus$$$ denotes the bitwise XOR operation.

After done asking the jury, you should output "$$$!$$$" to mark as finished. Then you need to handle a total of $$$q$$$ queries of type:

  • $$$l$$$ $$$r$$$ — compute $$$a_l$$$ $$$\oplus$$$ $$$a_r$$$

Output the answer for each query.

You can't be slick and ask all the queries at first because you don't know the queries yet, you have to ask, then the jury will give you the queries

Input:

  • The first line contains $$$2$$$ integers $$$n, q$$$ ($$$1 \le n, q \le 2 \cdot 10^5$$$) — the size of array $$$a$$$ and the number of queries

What is your stratergy to solving this?

Can you solve with strictly less than n queries to the jury and not using a temporary element?

gkos, Hyder1102, nik_exists, zeyd1234, SrabonGitikar, srvntofthejudge (sorry for pinging, just wanted to know how you would solve this)

Full text and comments »

  • Vote: I like it
  • +26
  • Vote: I do not like it

By Mitpro, 3 months ago, In English

Everyone's solved problem count has decreased due to an issue, Mike will fix it soon.

Can please we stop making blogs about it! I am too tired of reading them T-T.

Full text and comments »

  • Vote: I like it
  • +15
  • Vote: I do not like it

By Mitpro, 4 months ago, In English

Lately, my contest rankings have not been great, I keep doing worse and worse, and now I feel stuck in Specialist. :(

When I first got to expert, I genuinely thought I improved, I thought I could keep climbing higher. But ever since then, it’s just been a cycle of dropping, recovering a little, then dropping again. Now I’m starting to feel like I was never really an Expert at all, I am just a Specialist who got lucky for a few contests.

The worst part is that I feel unable to improve. It feels like the contests I did well in were based more on luck than actual skill, and every bad contest makes that feeling stronger.

I just don’t know anymore, was I reaching Expert with actual skill, or was it just all luck?

Full text and comments »

  • Vote: I like it
  • +22
  • Vote: I do not like it

By Mitpro, 5 months ago, In English

Idea:

We can access HTML pages like https://codeforces.me/contestRegistrants/*/page/*, it has registrants and the rating. We can loop all the registrant pages, exclude out of competition users and store them to cache. After done, we can predict the expected rank, from it, we can predict delta from our rank! That can reduce API access and improve speed

I tried to implement it but couldn't, it would be very helpful if any of you are able to implement the idea :)

Full text and comments »

  • Vote: I like it
  • +14
  • Vote: I do not like it

By Mitpro, 8 months ago, In English

Guys... Please

Full text and comments »

  • Vote: I like it
  • +145
  • Vote: I do not like it

By Mitpro, 8 months ago, In English

I am very sorry for problem F, and M, solution for them are wrong, F is fixed, but M is not

I hope you enjoyed the contest! Thank you for participating! This is my first round on Codeforces, so there might be many mistakes, I would be happy to hear your feedback in the comments.

663295A — Jack and time

Approach: Mitpro

Hint
Editorial
Solution(C++)
Rate the problem!

663295B — Palindromic Subsequence

Approach: Mitpro

Hint
Editorial
Solution(C++)
Rate the problem!

663295C — Palindromic Substring

Approach: Mitpro

Hint
Editorial O(n^3)
Code (C++)
Editorial O(n)
Solution (Python 3)
Rate the problem!

663295D — Dino and Game

Approach: Mitpro

Hint
Editorial
Solution(C++)
Rate the problem!

663295E — Sum Digital Root

Approach: Mitpro

Hint
Editorial
Solution(C++)
Rate the problem!

663295F — Elevator

Approach: Mitpro

Editorial
Solution(C++)
Rate the problem!

663295G — Kun and Palindrome

Approach: Mitpro

Hint
Editorial
Solution(C++)
Rate the problem!

663295H — Mario and pipes

Approach: Mitpro

Hint
Editorial
Solution(C++)
Rate the problem!

663295I — Magical Box

Approach: Mitpro ; Code: Mitpro

Hint
Editorial
Solution(Python 3)
Hint
Editorial 2
Solution 2(C++)
Rate the problem!

663295J — Adjacent XORs

Approach: Mitpro

Hint
Editorial
Code (C++)
Rate the problem!

663295K — Grandmaster and Chessboard

Approach: i_love_sqrt_decomp

Hint
Editorial
Code (C++)
Rate the problem!

663295L — Ducky Learns XORs

Approach: Mitpro

Hint
Editorial
Code (C++)
Rate the problem!

663295M — Palindrome Prefix

Approach: Mitpro

Hint
Editorial
Code (C++)
Rate the problem!

Full text and comments »

  • Vote: I like it
  • +32
  • Vote: I do not like it

By Mitpro, 8 months ago, In English

Hello Codeforces

I am glad to invite you to take part in my contest. The round will be in ICPC style, but penalty won't count (if your solution is skipped, don't worry, I skip WA submissions to not count penalty). Note that problem K is supposed to be the last problem, but I am too lazy to change :). You can expect the difficulty of these problems to be Div. 4.

You will be given 13 problems to solve. It will start at Friday, January 9, 2026 at 22:15 (UCT+7) and ends at Friday, January 16, 2026 at 22:15 (UCT+7).

All the problems are authored my Mitpro

I would like to thank:

I hope you will enjoy the round and the problems!

This contest has already been made, but I decided to do make it become contest.

UPD1: Why do most of you register and do not solve the problems :(. I really want many people to solve it because I put a lot of time in the problems.

UPD2: Who ever gets top 10 after the contest ends will get a shout out, who ever gets top 5 will have the option to be co-author next round!

UPD3: Who ever gets top 15 after the contest ends will get have the option to be tester next round!

UPD4: Congratulations to the winners!

  1. MisterGir

  2. am_aadvik

  3. WA_ON_TEST_2

  4. rpam

  5. bramar2

  6. DigiTalDreamar

  7. wtf.rjdp1

  8. Zeeshan-Haider-Alvi

  9. kamyak

  10. Kalevion

UPD5: Editorial!

Full text and comments »

  • Vote: I like it
  • +40
  • Vote: I do not like it

By Mitpro, 9 months ago, In English

After a year of grinding, I finally reached Expert!

Hitting Expert feels great, but ratings are not stable: one bad contest and the whole thing can vanish. So I figured I should post this before I am no longer Expert, share my journey to get here and what I had to do to improve, hope it helps you improve too!

I started competitive programming on Codeforces without really knowing what I was doing. My first contests were hard, I was averaging around $$$9000+$$$ rank, barely solving anything on time, and mostly just trying to understand how people were so fast. But I kept joining contests.

I began practicing outside of contests, reading editorials, and learning algorithms on Codeforces. My average contest rank changed from $$$9000$$$ to around $$$\textbf{5500}$$$! And that was enough to reach Pupil for the first time. It felt huge! My first real sign of progress.

After that, $$$\textbf{I started LeetCode}$$$, with more consistency, better problem recognition, and implementation, I pushed my average rank to about $$$\textbf{3000}$$$! That was when I started to believe I could actually climb higher. Becoming Specialist made me remember when I said: "I just HOPE I can get 2 problems". And now: "Problem C $$$1500$$$ score distribution? Easy".

Expert was the toughest so far. I had to fix bad habits, stop rushing, and reduce silly mistakes (but I still forgot to add memo.clear() in last problem D which cost me like 20 minutes in the contest!). My average rank slowly got down to around $$$\textbf{2000}$$$, that’s when I finally hit Expert!

Full text and comments »

  • Vote: I like it
  • +26
  • Vote: I do not like it