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

Автор _O_v_O_, 6 недель назад, По-английски

你好,Codeforces!

We are excited to invite you to participate in Codeforces Round 1129 (Div. 2), which will be held on Oct/24/2026 14:05 (Moscow time). Note the unusual start time of the round.

You will be given 2 hours and 15 minutes to solve 6 problems. One of the problems will be divided into 2 subtasks. At least one problem will be interactive so we recommend reading the guide to interactive problems if you have not encountered them before. All the problems were authored and prepared by Getaway_Car and me, _O_v_O_.

We'd like to express our sincere gratitude to:

Good Luck & Have Fun! We hope you enjoy this round!

UPD1: Scoring distribution:

$$$500 - 750 - 1500 - (2000 + 2250) - 2750 - 3000$$$

UPD2: Congratulations to the winners (subject to change):

Official:

  1. nike0g
  2. TasselFlower
  3. binglengmo
  4. legendcn
  5. lenohoo

Unofficial:

  1. peti1234
  2. nike0g
  3. TasselFlower
  4. binglengmo
  5. __baozii__

First solves:

A: 00:01:49 by ZeeroBug
B: 00:05:03 by Dipanjali_4184
C: 00:10:14 by wangyizhi
D1: 00:21:41 by TasselFlower
D2: 00:27:57 by TasselFlower
E: 00:41:25 by evenvalue
F: 00:27:55 by jiazhichen844

Editorial

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

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

as a writer, i authored

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

As a tester, I was red when I test :(

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

As a tester, god I love interactive

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

hope everything goes smoothly

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

Wow cnoi round again

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

Love the 19:05 start time, hope to see more rounds scheduled at this time :)

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

Good start time for CN participants

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

As a tester, I miss interactive xD

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

Nice round and enjoy

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

Nice Time!!!

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

Great time for Vietnamese participants :D although it overlaps with atcoder but I will participate

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

beautiful handle, beautiful time, beautiful round!

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

Holy, employed and samsoom in one round, negative 100 points is calling lol

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

As a Tester, I think this is a great CNOI round!

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

The time is perfect, I like it

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

As a cucu, caca

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

Note the unusual start time of the round.

finally, a contest that starts early instead of starting late!

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

As a participant, my goal is to solve three problems. Good luck to everyone!

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

Hope to reach lgm

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

YESSSSSSS

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

OvO

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

спасибо вам за раунд)

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

As a tester, orz _O_v_O_

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

How to register?

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

tourist Whoever sees this comment is gay. (except cry , Camal and evanchen )

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

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

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

As a hfOIer, Getaway_Car orzzzzz!

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

zcCN!!! Wish I can solve 4~5 problems and get high rating.

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

hopefully i'll not begin the contest with chopsticks in my hand

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

Will Codeforces Round 1129 (Div. 2) be rated for newcomers

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

hopefully i'll be pupil by this :))

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

As a monkey on a typewriter, pokloopp;p00 scdajtc3w023c23[0c23-c also good luck guys girls others prefer not to says and monkeys ok I'm gonna go write hamlet io3439v3ojkltoer

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

_O_v_O_ pls make it on usual time bcs your contest overlaps with Atcoder

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

As a competitor,I am (unrated) when I compete

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

I love you.

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

Good luck guys, dont cheat

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

hi

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

Perfect start time. My sleep time comes back.

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

as a tester, i am excited about it sto orz

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

As a Chinese contestant, it's the most wonderful start time I've seen. Perhaps it's the first rated contest I will participate on Codeforces. Good luck!

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

may be a up vote

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

19:05?! not 22:35?! I like the start time! don't have to stay up late

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

As a Contestant , Getaway_Car &‌ _O_v_O_ orzzz !

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

As a contestant , i hope that this starting time will help me get green profile name

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

As a tester,the problems are interesting.

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

The time is perfect, I like it!

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

sto zhuchenyao orz

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

thanks for the song in question A

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

pro ovo. SUPPORT

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

So little participants, everyone went to do ABC

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

The gap between Problem D1 and D2 is too huge :sob

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

how to solve D2, do we need to find some Pattern in the values of f(n) ??

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

    Here is my code:

    1   #include <bits/stdc++.h>
      1
      2 using namespace std;
      3
      4 long long D[61] = {0, 0, 1, 3, 5, 7, 11, 17, 21, 29, 33, 41, 53, 61, 75, 91, 105, 115, 133, 147, 171, 187, 211, 233, 249, 271, 289, 327, 353, 379, 409, 427, 46    3, 493, 527, 555, 611, 645, 677, 717, 749, 785, 823, 869, 913, 951, 999, 1033, 1081, 1153, 1197, 1235, 1293, 1343, 1401, 1451, 1497, 1551, 1609, 1679, 1731};
      5 long long P[61] = {0, 1, 6, 24, 76, 220, 606, 1612, 4158, 10482, 25866, 62692, 149526, 351716, 817362, 1879520, 4282058, 9676688, 21710796, 48400096, 107283238    , 236583310, 519300176, 136820651, 474962826, 371105961, 616376335, 49951329, 863257431, 526934377, 189831495, 723584179, 289527242, 562262698, 696690249, 7474    39775, 622443848, 338894318, 543542652, 181080058, 269836323, 799645219, 13719665, 631195792, 37230596, 744717670, 86874645, 866645875, 132641236, 75253961, 80    1733003, 975460330, 826925938, 668089391, 890807927, 948390927, 345304740, 812267539, 331051740, 990929756, 485065574};
      6
      7 long long sumationShit(long long num) {
      8         if (num < 1) {
      9                 return 0;
     10         }
     11         int m = 0;
     12         while ((1LL << m) &mdash; 1 < num) {
     13                 m++;
     14         }
     15
     16         long long lo = 1LL << (m &mdash; 1);
     17         long long hi = (1LL << m) &mdash; 1;
     18         long long cut = hi &mdash; D[m];
     19
     20         long long ans = P[m &mdash; 1];
     21         long long c1 = min(num, cut &mdash; 1) &mdash; lo + 1;
     22         if (c1 > 0) {
     23                 ans += c1 % 998244353 * m + sumationShit(c1 + 1) &mdash; sumationShit(1);
     24         }
     25
     26         if (num >= cut) {
     27                 long long c2 = num &mdash; cut + 1;
     28                 ans += c2 * m + (D[m] + hi &mdash; num) * c2 / 2;
     29         }
     30
     31         return ans % 998244353;
     32 }
     33
     34
     35 int main() {
     36         ios::sync_with_stdio(false);
     37         cin.tie(nullptr);
     38
     39         int t;
     40         cin >> t;
     41         while (t--) {
     42                 long long l, r;
     43                 cin >> l >> r;
     44                 long long lAns, rAns;
     45                 long long ans;
     46
     47                 lAns = sumationShit(l &mdash; 1);
     48                 rAns = sumationShit(r);
     49
     50                 ans = rAns &mdash; lAns;
     51                 ans = (ans % 998244353 + 998244353) % 998244353;
     52
     53                 cout << ans << "\n";
     54
     55         }
     56
     57         return 0;
     58 }
    

    The main idea is that a num can be computes as either doing op1 until the highest bit is set and then deleting until you get the correct bits or just adding the bits one by one (you can add bit k, by doing op 1 k times and then doing op 1 again, this will put k and only k as 1) the main idea here is that:

    doing it the first way takes m + d (m times op 1, d times op 2) second way is m + f(n — 2^(m-1)), (you can think of this as just putting that bit there and then doing the rest of the bits, which I defined recursively)

    if you put these together than deleting is cheaper when d <= f(r),

    then effectively we can precompute the amount of numbers for each range of [2^k, 2^(k+1)) that will be cheaper to do in the first way, and that will be cheaper to do in the second way.

    then you compute for each for each bit block the total cost.

    tbh reading my explanation it makes it way more complex than it really is, I suggest you play around with the bit values of the numbers on paper, the core idea is kinda obvious once you get the hang of it, and the rest is just algebraic bullshitery.

    oh and the numbers that are cheaper to delete are all part of a suffix, so you essentially use prefix sums for that, same for low and high, its all prefix sums.

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

time was cool so were the problems

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

1/ I lost my brain when solving A
2/ How tf to solve D and E???? TT
3/ So many cheaters....

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

    Hints for E:

    • Root the tree at node 1. We'll perform two phases.
    • In the first phase, use $$$(n - 1)$$$ queries to determine the subtree size of every non-root node $$$u$$$.
    • For the second phase, make the following observation: if you sort the nodes of a rooted tree in decreasing order of subtree size, then the parent of every node lies strictly before it in this order. Try to build the tree one edge at a time by going across nodes in this order (when you encounter a node, try to find its parent from the preceding nodes), and using the same idea as in the first phase.
  • »
    »
    6 недель назад, скрыть # ^ |
    ← Rev. 2  
    Проголосовать: нравится 0 Проголосовать: не нравится

    B and A shoulve been switched tbh.

    D2 is pretty simple at its core (at least for the amount of points you woulve gotten from it), i did a small explenation for aditya. But holy shit the amount of off my one errors drove me nuts lol.

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

..

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

Deleted

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

How to solve D1?I tried either deleting (2^msb) — 1 then recurse on the remaining or get to (2^msb+1) -1 then deleted to the goal and choose the best value, it worked but for larger values it caused overflow any help?

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

Bruh back in the day solving a,b quickly would get you to 1500. now im losing 45 rating

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

Good problems

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

Good contest but tf am I doing, if I could've actually implemented I would've easily gotten AC, please help how not to spend 20 minutes making a simple helper function

  • »
    »
    6 недель назад, скрыть # ^ |
     
    Проголосовать: нравится 0 Проголосовать: не нравится
    it's way easier to implement than what you've done
»
6 недель назад, скрыть # |
← Rev. 4  
Проголосовать: нравится 0 Проголосовать: не нравится

I believe I will reach 1200 rating after this round, though I didn't do A and B fast enough...

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

any idea ? how to improve in contests ?

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

What to do in D2?

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

Why did this submission 395859622 get skipped after the contest? I submitted the same code again 3 minutes later 395860335, and both got AC during the contest. The only difference is that I commented out #define int long long in the second one, since I know it can cause issues with LCA. But only the second one stayed accepted.

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

Good contest.

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

What is wrong in this code for Problem B


// #include<bits/stdc++.h> using namespace std; void solve () { int n; cin >> n; vector<int> a(n); for (auto &num: a){ cin >> num; if (num == 0) {cout << n << endl; return ;} } vector<int> pref1(n,1), pref2(n, 1); for (int i = 1; i < n; i ++) if (a[i] <=a[i - 1]) pref1[i] += pref1[i - 1]; for (int i = n - 2; i >= 0; i --) if (a[i] <= a[i + 1]) pref2[i] += pref2[i + 1]; int ans = 0; for (int i = 0; i < n; i ++) { int val = pref1[i] + pref2[i] - 1; if (val > a[i]) ans = max (ans,n - a[i]); } cout << ans << endl; } int main() { ios::sync_with_stdio(false); cin.tie(nullptr); int t; cin >> t; while (t --) solve (); return 0; }
»
6 недель назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Why the timings were so odd, i was thinking it is at 20:05 :( ?

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

150+ solve on D2 but it's hard to find a single legit participant among those...

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

My solution discussion stream for ABCD1E

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

So the Dipanjali_4184 is the fastest to solve problem B, after solving problem A all in the span of 5 minutes and proceeds to solve nothing more, while his entire last round got skipped. Yeah looks like a fair participant and deserves to be mentioned in the announcement.

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

As a first time contestant, and although it is late to say this, orzzz to everyone who helped in this and everyone who participated.

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

1129 div2 will always be special for me. Finally reached pupil.

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

This was such a good contest man, really enjoyed it!!

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

IN Problem B

5

2 1 1 0 3

why answer is 5?

Thanks

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

    the answer always is either zero or n because if you can make one element equal to zero after that you just need to remove every other element so you end up with one zero , and in this case you already have a zero so you can just remove other elements

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

As a tester, I miss interactive

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

as a writer, i authored

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

Hello Codeforces Team,

I am writing to respectfully request a review of the similarity warning regarding my submission 395869936(https://codeforces.me/contest/2277/submission/395869936) for problem 2277F, which was flagged as significantly similar to submission 395853784(https://codeforces.me/contest/2277/submission/395853784).

My Codeforces account, rating, and reputation are important to me. I have been actively participating on Codeforces for approximately 50 days, and my submission history is available for review. As a Pupil-rated contestant, I am working consistently to improve my programming skills.

I respectfully request a manual review of both submissions, particularly the specific matching portions and their implementation details, before any decision affecting my account or rating is made.

I am willing to cooperate fully and provide any genuine information that may help clarify the situation. I would appreciate a fair assessment based on the relevant evidence and circumstances.

Thank you for your time and consideration.

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

Hello Codeforces Team, I am writing this again,

with sincere respect to request a careful manual review of the similarity warning issued for my submission 395869936(https://codeforces.me/contest/2277/submission/395869936) for problem 2277F, which was flagged as significantly similar to submission 395853784(https://codeforces.me/contest/2277/submission/395853784).

I want to clarify my position and respectfully ask that my submission not be judged solely on the similarity warning without examining the full circumstances. My Codeforces account, rating, and reputation mean a great deal to me, and I take competitive programming and fair participation seriously.

I have been actively participating on Codeforces for approximately 50 days, and my submission history is available for review. I am a Pupil-rated contestant working consistently to improve my programming skills. I understand that account history alone cannot establish what happened in this particular submission, but I hope it can provide useful context.

I respectfully request that the two submissions be examined side by side, including the exact matching code sections, implementation details, and submission timelines. If there is a specific concern beyond the similarity itself, I would appreciate the opportunity to understand it and provide a factual explanation.

I am ready to cooperate fully and provide any genuine records or information that may help clarify the situation. I sincerely request a fair and evidence-based assessment before any decision affecting my account or rating is made.

Thank you for taking the time to review my request.