soullless's blog

By soullless, history, 15 months ago, translation, In English

Hello, Codeforces!

I am very excited to invite you to our contest Codeforces Round 1037 (Div. 3), which starts on Jul/17/2025 17:35 (Moscow time). You will be given 7 problems and 2 hours and 15 minutes to solve them.

The problems were authored by me, __rose, Pishka12, Chalishkan and I_HATE_MD_DM to solve and alter them.

The round will be hosted by the rules of educational rounds (extended ICPC). Thus, all solutions will be judged on preliminary tests during the round, and after the round, there will be a 12-hour phase of open hacks. After the open hack phase, all accepted solutions will be rejudged on successful hacks. Also, note that there is no score distribution — rank will be determined by number of problems solved, followed by penalty; wrong submissions will incur the usual penalty of 10 minutes, following the rules of educational rounds.

Remember that only the trusted participants of the third division will be included in the official standings table. As it is written by link, this is a compulsory measure for combating unsporting behavior. To qualify as a trusted participant of the third division, you must:

  • take part in at least five rated rounds (and solve at least one problem in each of them)
  • do not have a point of 1900 or higher in the rating.

Regardless of whether you are a trusted participant of the third division or not, if your rating is less than 1600, then the round will be rated for you.

We would like to thank:

GL HF!

Editoral is out!:

Also I would like to show you the beauty of our country's nature with the stunning backdrop of tourist Peak (3965m)!

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

| Write comment?
»
15 months ago, hide # |
 
Vote: I like it +9 Vote: I do not like it

Hope to reach Expert in this legendary contest!

»
15 months ago, hide # |
 
Vote: I like it +93 Vote: I do not like it

It should be 4009

»
15 months ago, hide # |
 
Vote: I like it +12 Vote: I do not like it

as a tester this round is good

»
15 months ago, hide # |
 
Vote: I like it +58 Vote: I do not like it

as a tester this round is peak

»
15 months ago, hide # |
 
Vote: I like it +42 Vote: I do not like it

As a problem setter, I hope you will enjoy these amazing problems.

»
15 months ago, hide # |
 
Vote: I like it +42 Vote: I do not like it

As a first time tester wish positive delta for the ones who r ready to sacrifizs anything for it

»
15 months ago, hide # |
 
Vote: I like it +33 Vote: I do not like it

i was at this peak and the views as beautiful as the tasks on this contest) gl & hf for everyone

»
15 months ago, hide # |
 
Vote: I like it +11 Vote: I do not like it

As a non-tester, I want to test a round, please some coordinator allow me to do one!!

»
15 months ago, hide # |
 
Vote: I like it +8 Vote: I do not like it

as a tester have fun everyone

»
15 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Hope to get back to specialist this round (skill issue)!

»
15 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Hope to reach Expert in this legendary contest!

»
15 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

giving credits to the fathers of internet is a sweet gesture ^-^

»
15 months ago, hide # |
 
Vote: I like it +5 Vote: I do not like it

As a participant, I can guarantee there exists some undiscovered peak, 44m higher than this.

»
15 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

As a participant, I don't think tourist's peak is 3965 cmon guys

»
15 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Tourist has exceeded the peak.

»
15 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

In Round 1035,I got 128 rating and reached Expert,but in Round 1036,I lost 103 rating so I back Specialist. All in all, bless i can reach Expert again:)

»
15 months ago, hide # |
 
Vote: I like it +3 Vote: I do not like it

hope to reach green!

»
15 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

As a hike-aholic, the mountain successfully drew my attention!

»
15 months ago, hide # |
 
Vote: I like it -10 Vote: I do not like it

As a tester, I wish everyone a smooth contest, green submissions, and a positive delta.

»
15 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

How does it work if I participate in this contest, but after rollbacks I become expert right before the contest?

»
15 months ago, hide # |
 
Vote: I like it +15 Vote: I do not like it

As a first time tester, this is definitely one of the peak rounds of all time ( glhf everyone :) )

»
15 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

I HAVE to participate

»
15 months ago, hide # |
← Rev. 2  
Vote: I like it -59 Vote: I do not like it

.

»
15 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Hope to make a comeback

»
15 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

hey guys, I am on a journey to get a coloured rank. If I flopped in this contest, the roast is free—no need to hold back.

It motivates me.

  • »
    »
    14 months ago, hide # ^ |
     
    Vote: I like it 0 Vote: I do not like it

    You can do it, bro.

    A bamboo doesn't grow an inch for about 3 years before it grows to around 90 feet in just a couple of weeks.

    I've been stuck in newbie for more than a year

»
15 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Expecting as usual another round of div 3 that C or D will be harder than the next.

»
15 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Hope that D is not mind-tricking :)

  • »
    »
    15 months ago, hide # ^ |
     
    Vote: I like it +3 Vote: I do not like it

    I find mind tricking problem enjoyable, since I don't know many ad-hoc problem

»
15 months ago, hide # |
 
Vote: I like it +1 Vote: I do not like it

After a 10 days long break...

»
15 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Why are geometry problems so rare in codeforces. I would love if problem setters made more geometry problems instead of Constructive or Permutation. though i don't hate them

»
15 months ago, hide # |
 
Vote: I like it +1 Vote: I do not like it

Has something changed my penalty meter kept increasing it was 100+ even though i did no wrong submission?

»
15 months ago, hide # |
 
Vote: I like it +1 Vote: I do not like it

Loved F. Errichto's video about heavy/small nodes came helpful. Also amazing test prep for F. I had to safeguard memory + use unordered map with custom hash

»
15 months ago, hide # |
 
Vote: I like it +1 Vote: I do not like it

Noice, good questions for my first ever contest ever. was scared to start codeforces but finally gave it a shot after 8 months of DSA grind. how well of a performance is 4 questions?

»
15 months ago, hide # |
 
Vote: I like it +13 Vote: I do not like it

How to solve A?

»
15 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

I was in queue for A submission for like 3 mins like what was that

  • »
    »
    15 months ago, hide # ^ |
     
    Vote: I like it 0 Vote: I do not like it

    it's common situation on Div 3/4 round; Therefore, use m1/m2/m3 codeforces

»
15 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

damn math questions damn damn damn

»
15 months ago, hide # |
← Rev. 3  
Vote: I like it +12 Vote: I do not like it

Problem F is cool

»
15 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

problem $$$F$$$ was cool, I think this is the first time for me to use some SQRT decomposition technique in a live contest xD

also, some solutions for problem $$$G$$$ worked on the hard version but got TLE on test 17-18 on the easy one !^_^

»
15 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

In D , to think of boundaries as l ans r were given variable names but was a distraction.

  • »
    »
    15 months ago, hide # ^ |
    ← Rev. 2  
    Vote: I like it 0 Vote: I do not like it

    Hi can you share me your approach for D. My Approach is failing at test case-2

    My Approach (Failed)
    Code

    Edited:

    I figured out out edge case

    Edge Case

    I was using DSU like approach to merge all casinos with overlapping intervals into same group and assigning them their largest reachable value, but turns out we can't win any value within range [l,r] for a casino, rather we would have a specific value 'real'. Thus we can't guarantee that we can play at any casino which will have an overlapping interval

    • »
      »
      »
      15 months ago, hide # ^ |
       
      Vote: I like it 0 Vote: I do not like it

      Sorry but I am unable to understand your approach properly, but let me say this that think very greedy, maximizing coins is the goal so sort real[i] array and check if you could achieve the next or next to next or next to next to next and so on.. Thank you

»
15 months ago, hide # |
 
Vote: I like it +7 Vote: I do not like it

This is my first contest. And i solved first two problems. this contest and result will memorable for me.

thank you

»
15 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

how can even around 12000 users solve question d.

  • »
    »
    15 months ago, hide # ^ |
    ← Rev. 2  
    Vote: I like it 0 Vote: I do not like it

    I wasted a lot of time on it until I realized I had missed an important piece of information given in the constraints, that $$$l_i \leq real_i \leq r_i$$$. This makes the problem way easier.

    • »
      »
      »
      15 months ago, hide # ^ |
      ← Rev. 2  
      Vote: I like it 0 Vote: I do not like it

      Thank you for the comment — just realized I've probably written a solution that allows to lift this constraint on $$$real_i$$$: 329491170 (I did not double-check this fact, but it seems to be true)

  • »
    »
    15 months ago, hide # ^ |
     
    Vote: I like it 0 Vote: I do not like it

    almost 20% of them are cheaters

»
15 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

How to solve pF? I think I got TLE because of the heavy node (the node with large deg)

»
15 months ago, hide # |
 
Vote: I like it +1 Vote: I do not like it

Problem E royally f*cked me.

»
15 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

How to solve D mannnn???

  • »
    »
    15 months ago, hide # ^ |
     
    Vote: I like it 0 Vote: I do not like it

    Just sort the casinos you receive by the amount they are going to give you (because going back is pointless) Then you greedily check where you can advance.

    #include <bits/stdc++.h>
    using namespace std;
    
    #define pii pair<int,int>
    
    struct Pol {
        int l,r,v;
    };
    
    bool fun(Pol a, Pol b) {
        return a.v<b.v;
    }
    
    void solve() {
        int n, k; cin>>n>>k;
        Pol *pool =new Pol[n];
        for(int i=0; i<n; i++) {
            int a,b,c;
            cin>>a>>b>>c;
            Pol pl; pl.l=a; pl.r=b; pl.v=c;
            pool[i]=pl;
        }
    
        int pre=k;
        sort(pool,pool+n,fun);
    
        for(int i=0; i<n; i++) {
            if(pool[i].v>pre) {
                if( pool[i].l<=pre && pre<=pool[i].r ) {
                    pre=pool[i].v;
                }
            }
        }
    
        cout<<pre<<endl;
    
    }
    
    int main() {
        ios::sync_with_stdio(false);
        cin.tie(nullptr); cout.tie(nullptr);
    
        int t=1;
        cin>>t;
        while(t--) solve();
    
        return 0;
    }
    
»
15 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

How to solve E ?

  • »
    »
    15 months ago, hide # ^ |
     
    Vote: I like it 0 Vote: I do not like it

    create a list that is lcm(p[i], s[i]) and recreate p and s and check if they are same

  • »
    »
    15 months ago, hide # ^ |
     
    Vote: I like it 0 Vote: I do not like it

    check if res[i] = lcm(a[i], b[i]) works and if not then nothing can work

  • »
    »
    15 months ago, hide # ^ |
     
    Vote: I like it +3 Vote: I do not like it

    I did something way more convoluted than what's being suggested. I checked if p[n]==s1 and then for i from 0 to n-2: gcd(p[i],s[i+1])==p[n]. Also checked each of p and s are valid by checking if p[i]%p[i+1]==0 and s[i+1]%s[i]==0

  • »
    »
    15 months ago, hide # ^ |
    ← Rev. 3  
    Vote: I like it +1 Vote: I do not like it

    To construct a valid array a such that:

    `p[i] = gcd(p[i-1], a[i])`
    `s[i] = gcd(a[i], s[i+1])`
    `p[n-1] == s[0]`   // i.e., gcd of the entire array

    We observe the following:

    1. From p[i] = gcd(p[i-1], a[i]), it must be that: p[i-1] % p[i] == 0

    2. From s[i] = gcd(a[i], s[i+1]), it must be that: s[i+1] % s[i] == 0

    3. Since a[i] must satisfy both prefix and suffix GCD conditions, it must be divisible by both p[i] and s[i]. So: a[i] % p[i] == 0 and a[i] % s[i] == 0 ⇒ a[i] must be a multiple of lcm(p[i], s[i])

    To check if such an a[i] is valid, try setting: a[i] = lcm(p[i], s[i])

    Then check whether: gcd(p[i-1], a[i]) == p[i]

    Substitute a[i] = lcm(p[i], s[i])

    = gcd(p[i-1], lcm(p[i], s[i]))

    = gcd(p[i-1], (p[i] * s[i]) / gcd(p[i], s[i]))

    = p[i] * gcd(p[i-1] / p[i], s[i] / gcd(p[i], s[i]))

    So, for this to equal p[i], we must have: gcd(p[i-1] / p[i], s[i] / gcd(p[i], s[i])) == 1

    If this condition fails at any index i, then no valid array a[] exists.

    • »
      »
      »
      15 months ago, hide # ^ |
       
      Vote: I like it 0 Vote: I do not like it

      Can you please told me why a[i] would be the lcm , and cannot be more than .

      And how testing just for a[i] would be sufficient

      And Thanks !

»
15 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it
if( p[1]!=s[n] ) {
    cout<<"NO\n"; return;
}

I just didn't write this down and missed question E. What is the use of this one condition?

  • »
    »
    15 months ago, hide # ^ |
     
    Vote: I like it 0 Vote: I do not like it

    I think you mean p[n] != s[1] implies no answer possible? This is because both quantities represent the gcd of the entire array

»
15 months ago, hide # |
 
Vote: I like it +2 Vote: I do not like it

Hi Codeforces!

In today's problem E, i was confusing about one thing

What is the difference between gcd(a[i], b[i]) != a.back() and gcd(a[i], b[i + 1]) != a.back(), imo the should give the same value however the first one is WA and the second one is passed

Thanks in advance!

  • »
    »
    15 months ago, hide # ^ |
     
    Vote: I like it 0 Vote: I do not like it

    Consider the case when p = [8, 4] and q = [4, 8]. In this case gcd(p[i], q[i]) = p.back() for all i however not for gcd(p[i], q[i+1]). You need to check for both conditions

»
15 months ago, hide # |
 
Vote: I like it +12 Vote: I do not like it

The problems are good, but I think the samples are too weak...

So many penalties I have made...

»
15 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

I can't think straight about E

how did you guys think about the problem ?

I know it's the LCM but why ?

»
15 months ago, hide # |
 
Vote: I like it +1 Vote: I do not like it

Beautiful problems, especially F! Really enjoyed solving the tasks :)

»
15 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

For problem F, I'm seeing a concept of heavy light decomposition. Can this problem be done without it or is it necessary? Was trying to optimize cost update by storing what is the total edge cost for particular color of neighbors for every color and every node, but didn't work.

»
15 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

How to solve G2?

  • »
    »
    15 months ago, hide # ^ |
     
    Vote: I like it +6 Vote: I do not like it

    I had a solution where I fixed the minimum element of the subarray (let's call it x), and the goal was to find the maximum possible median (y) of any subarray that contains x.

    It's not hard to prove that the subarray must either start or end at x, because at least one half (either left or right) need to be dominant so we will only take that part so it is just finding the maximum prefix/suffix starting/ending from the index of x (we are going to model the problem for prefix).

    Now, for a fixed x, we can binary search on the value of y. For each candidate y, we transform the array into +1 if the element is ≥ y, and -1 if it is < y. The idea is that if the number of +1s outweighs the -1s in a subarray, it means elements ≥ y are in the majority, so the median has to be >=y.

    To efficiently check this, we use persistent segment tree to find the maximum prefix sum starting from index of x. This can be Done with a combine function where answer of node represents the maximum prefix sum in the current node => answer of current node = max(answer of left node,(Number of Elements >= y in left node + answer of right node)).

    • »
      »
      »
      15 months ago, hide # ^ |
       
      Vote: I like it 0 Vote: I do not like it

      you don't need a persistent segment tree

    • »
      »
      »
      15 months ago, hide # ^ |
       
      Vote: I like it 0 Vote: I do not like it

      How do you fix the value of x? Checking each x isn't optimal and doing binary search for x doesn't make sense either.

      • »
        »
        »
        »
        15 months ago, hide # ^ |
         
        Vote: I like it 0 Vote: I do not like it

        You can fix the minimum with NSE and PSE and for a fixed x you are doing binary search on the maximum median

    • »
      »
      »
      15 months ago, hide # ^ |
      ← Rev. 3  
      Vote: I like it 0 Vote: I do not like it

      i think you should try fixing median

      like common technique build array with ele greater than med as 1 and ele less than med as -1 then find subarray whose sum>=0 ans update ans = max(ans,med-min).

      to do this just iterate medians from n to 1 and maintain segment tree and whenever you update pos of your median as 1 in segment tree you call update query now we can say that our answer can grow if subarray include this position so when you are calling update you go to those l,r which include this positon so while calling update you also try to update your answer just maintain max prefix sum max suffix sum total sum and min elemet in segment l,r

      now when you are standing at l,r

      now you have 3 options

      option-1 if(sum of l,r) >=0 ans=max(ans,med-minimum of l,r)

      option-2 int val=maxsuffix sum from mid to l

      now query the prefix mid to r such that val+prefix>=0 and find the minimum in element in this

      prefix and update answer ans=max(ans,med-miniprefix)

      option-3

      int val=maxprefix from mid+1 to r

      now query the suffix mid to l such that val+suffix>=0 and find the minimum in element in this

      suffix and update answer ans=max(ans,med-minisuffix)

      just check my implementation

      https://codeforces.me/contest/2126/submission/329546875

»
15 months ago, hide # |
← Rev. 2  
Vote: I like it +4 Vote: I do not like it

I tried to hack others' solutions of F but I got unexpected verdict. Could anyone point out my mistakes please or is there anything wrong like this ?

generator

Edit: it works now

  • »
    »
    15 months ago, hide # ^ |
     
    Vote: I like it +5 Vote: I do not like it

    btw, the tests of F is really weak, and solutions of O(nsqrt(n)logn) could easily pass, and this generator could hack them

  • »
    »
    15 months ago, hide # ^ |
     
    Vote: I like it +8 Vote: I do not like it

    I'd assume it's the trailing \n.

    Hacking doesn't like extra spaces.

    • »
      »
      »
      15 months ago, hide # ^ |
       
      Vote: I like it 0 Vote: I do not like it

      I replaced \n with endl but it doesn't work ToT

      • »
        »
        »
        »
        15 months ago, hide # ^ |
         
        Vote: I like it +8 Vote: I do not like it

        I mean, remove the ending \n entirely. No extra whitespace should remain in the test case.

        • »
          »
          »
          »
          »
          15 months ago, hide # ^ |
           
          Vote: I like it 0 Vote: I do not like it
          Spoiler

          Hack like this? But it doesn't work, or sorry for my misunderstanding.

          • »
            »
            »
            »
            »
            »
            15 months ago, hide # ^ |
             
            Vote: I like it 0 Vote: I do not like it
            Code
»
15 months ago, hide # |
 
Vote: I like it -9 Vote: I do not like it

Today's F is one of the best problems I've solved in the last few months. Perfect Contest :)

»
15 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Editorial??

»
15 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Me during contest: A-F: that easy? G1-G2: that hard?

»
15 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

how to solve F?

  • »
    »
    15 months ago, hide # ^ |
    ← Rev. 3  
    Vote: I like it 0 Vote: I do not like it

    let's say when you change color of a vertex from x to y, then result += score[color[x]]-score[color[y]].

    You should init the trees with dfs/bfs to set up the color map (for its children) and its parent color update(just 1 edge) for easy update. Overall complexity should be O((N+Q) * log(N+Q)).

»
15 months ago, hide # |
 
Vote: I like it +1 Vote: I do not like it

tried solving G1 with ordered_multiset to get the median but got TLE, can anyone explain why?

submission link: https://codeforces.me/contest/2126/submission/329538028

»
15 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Can anyone please provide solution for F with HLD.

»
15 months ago, hide # |
 
Vote: I like it +2 Vote: I do not like it

While reviewing the preliminary contest standings, I found two contestants whose activity appears suspicious: they submitted solutions to every problem within minutes, and the coding style differs markedly from one submission to the next.

»
15 months ago, hide # |
← Rev. 2  
Vote: I like it 0 Vote: I do not like it

Hi guys, where can I find the tutorial/editorial? Or is not out yet... this my second contest so im kinda lost

»
15 months ago, hide # |
 
Vote: I like it +1 Vote: I do not like it
»
15 months ago, hide # |
 
Vote: I like it +2 Vote: I do not like it

HOPE TO REACH PUPIL IN THIS LEGENDARY CONTEST 10/10! FROM MYSIDE

»
15 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

F was very cool

»
15 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Hey Can Anyone tell me that I have given my first contest untill then I was unrated and I have submitted my first problem which got ACCEPTED but my account is still showing unrated

»
15 months ago, hide # |
← Rev. 2  
Vote: I like it +5 Vote: I do not like it

Problem F can be solved in $$$O(n+q)$$$: 329562348.

When I first thought of the problem, I thought: oh, just use sqrt decomposition (heavy-light partitioning). But then, I thought: Why was the graph being a tree? I realized there's a much simpler solution that exploits this constraint.

»
15 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Nice contest. Thank you authors

»
15 months ago, hide # |
← Rev. 2  
Vote: I like it +3 Vote: I do not like it

First live contest this year, editorial taking longer than usual... I miss super-fast editorials :=(

»
15 months ago, hide # |
 
Vote: I like it -6 Vote: I do not like it

主题:申诉 Codeforces Round 1037 (Div. 3) 被标记 Unrated 管理员您好: 在 Codeforces Round 1037 (Div. 3) 中,我的提交被判为 Unrated。根据官方 FAQ,轻度 AI 辅助(如润色、重构)是允许的,我在此说明: 所有题目的算法思路均为原创。 以 F 题为例:我自行设计「按节点度数分类,小度数暴力、大度数 map」的做法。 AI 仅用于润色我已写好的代码(变量命名、缩进、注释),无任何逻辑复制。 我已核对最终代码,确保无公开模板逐字重合。 恳请复核,将该场比赛恢复 Rated。如需进一步信息,我乐意配合。 感谢!

Subject: Appeal for Unrated Contest Codeforces Round 1037 (Div. 3) Hi Codeforces team, My submission in Codeforces Round 1037 (Div. 3) was marked Unrated. Per the official FAQ, light AI assistance (styling, refactoring) is allowed. Here are the facts: All algorithms are my own. Such as problem F, I personally devised the “degree-splitting + brute-force for low-degree vertices + map for high-degree vertices” approach. AI was used only to polish my own draft code (renaming, formatting, comments); no logic was copied. I have double-checked the final code and confirm it does not match any public template verbatim. Please review and restore the Rated status. I’m happy to provide any extra details. Thank you!

  • »
    »
    15 months ago, hide # ^ |
     
    Vote: I like it 0 Vote: I do not like it

    关于我为什么要用AI润色代码,因为我要给学弟学妹解释代码是什么意思,我自己写的代码风格不太好阅读,所以我需要用AI在不改变代码逻辑的情况下让代码更适合新手阅读。我保证所有题目的算法思路都是我自己想的。请求恢复rated,感激不尽!

    Regarding why I used AI to polish my code: I need to explain the code to my junior classmates, but my original style is hard to read. Therefore, I used AI solely to make the code more beginner-friendly without altering its logic. I guarantee that the algorithmic ideas for every problem are entirely my own. I sincerely request that this submission be reinstated as rated. Thank you very much!

    • »
      »
      »
      15 months ago, hide # ^ |
       
      Vote: I like it +16 Vote: I do not like it

      Sir your code isn't skipped and why are you exposing yourself that you are using AI in contest?????

»
15 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

How do you do G man I don't understand

»
15 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

My submission of 'B' got TLE on test case 7 in system testing. I think, at least the first 10 test cases should be capable enough to reject a submission during contest... I am feeling so saaad...

»
15 months ago, hide # |
 
Vote: I like it +18 Vote: I do not like it

How weak the pretest is?

»
15 months ago, hide # |
 
Vote: I like it +5 Vote: I do not like it

WTF IS TEST 51 IN F?????

»
15 months ago, hide # |
 
Vote: I like it +6 Vote: I do not like it

im never doing a d3 or edu ever again... i get fst literally every time for the dumbest reasons, i mean cmon you couldve EASILY put a case in e to stop that

»
15 months ago, hide # |
← Rev. 2  
Vote: I like it -12 Vote: I do not like it

why the my solution for the E is skipped??

  • »
    »
    15 months ago, hide # ^ |
     
    Vote: I like it +4 Vote: I do not like it

    Maybe because it's too obvious you cheated?

    • »
      »
      »
      15 months ago, hide # ^ |
      ← Rev. 2  
      Vote: I like it -44 Vote: I do not like it

      using two accounts is wrong!!

      • »
        »
        »
        »
        15 months ago, hide # ^ |
         
        Vote: I like it +9 Vote: I do not like it

        That is what called cheating. you avoided your WA in 2nd account. And, used same soln. Don't use multiple accounts for a single contest.

        What is you did is a plain CHEATING.

        • »
          »
          »
          »
          »
          15 months ago, hide # ^ |
          ← Rev. 2  
          Vote: I like it -26 Vote: I do not like it

          getting plag- is obvious._

          • »
            »
            »
            »
            »
            »
            15 months ago, hide # ^ |
             
            Vote: I like it +5 Vote: I do not like it

            Multiaccounting to avoid penalty is 100% considered cheating, cheating doesn't just mean taking solutions from other people / LLMs

          • »
            »
            »
            »
            »
            »
            15 months ago, hide # ^ |
             
            Vote: I like it +4 Vote: I do not like it

            No matter how much deny. What about those people who solved in one go. While you made mistakes in one account. And used other account to submit final soln.

            Proper Misconduct behavior. This is regarded as CHEATING.

          • »
            »
            »
            »
            »
            »
            15 months ago, hide # ^ |
             
            Vote: I like it 0 Vote: I do not like it

            Using multiple accounts in a rated contest is against Codeforces policy. See Mike's blog on this matter.

      • »
        »
        »
        »
        15 months ago, hide # ^ |
         
        Vote: I like it 0 Vote: I do not like it

        Using an alt account is a form of cheating — you should have read the rules more carefully. Also, you tried to evade penalties by submitting with your alt account first, which is not allowed either.

        • »
          »
          »
          »
          »
          15 months ago, hide # ^ |
          ← Rev. 2  
          Vote: I like it -15 Vote: I do not like it

          yeah, i should accept the fact that getting penalties is not wrong.

          • »
            »
            »
            »
            »
            »
            15 months ago, hide # ^ |
             
            Vote: I like it 0 Vote: I do not like it

            And what do you say about your AI Generated looking like codes in DE with AI Generated looking like inline comments? Which are totally different from your codes to AB?

»
15 months ago, hide # |
 
Vote: I like it +9 Vote: I do not like it

The number of hacks in F and G are crazy in this contest.

»
15 months ago, hide # |
 
Vote: I like it +16 Vote: I do not like it

Fucking Weak Pretest(s) !!! So sad...

»
15 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

When will the ratings get updated?

»
15 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

my ranking showing 17000 around solved 2 questions will i get any rating for the contest it is still showing unrated. will i get any rating for the contest i had participated first time in codeforces contest

  • »
    »
    15 months ago, hide # ^ |
     
    Vote: I like it 0 Vote: I do not like it

    Ratings are not updated yet for all participants, will be updated soon. The 'unrated' text you're seeing doesn't necessarily mean the contest is unrated for you. That text also appears when ratings simply haven't been updated yet.

»
15 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

i guess i will go to sleep and hopefully see myself green tomorrow ;-;

»
15 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

why my rating has not come yet?

»
15 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Can anyone help me to debug my submission for F, I am getting TLE at 41th testcase.

Don't know what is getting wrong.

»
15 months ago, hide # |
 
Vote: I like it +1 Vote: I do not like it

editorial when?

»
15 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

a good contest, thanks for the author.

»
15 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

insanely weak pretests for B

come on dropped from like 2k rank to 6k

»
15 months ago, hide # |
 
Vote: I like it +1 Vote: I do not like it

Still no tutorial?

»
15 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

For the B problem https://codeforces.me/contest/2126/problem/B why is this code not correct ? ~~~~~

include

include

include

using namespace std; int main(){

int t;
cin>>t;

while(t--){

    int n,k;
    cin>>n>>k;
    vector<int>arr(n,0);
    for(int i=0;i<n;i++)cin>>arr[i];

    int cnt=0;

    for(int i=0;i<n;){
        if(arr[i]==0){
            bool onePresent=false;
            int j=i;
            int daysLeft=k;
            while(j<n && j<=i+k-1){
                if(arr[j]==1){
                    onePresent=true;
                    break;
                }
                j++;
                daysLeft--;
            }
            if(!onePresent && !daysLeft)cnt++;
            i+=(k+1);
        }
        else i+=1;
    }
    cout<<cnt<<endl;
}

} ~~~~~~

  • »
    »
    15 months ago, hide # ^ |
     
    Vote: I like it 0 Vote: I do not like it

    First, if the current i isn't right, you have to increment the i with 1 only, but you don't do this in the condition (when doing cnt++ you should increase i with k + 1 else you should increment it only 1)

    Second, you will get TLE because imagine that the sequence is k — 1 zeros and 1, and the sequence goes with this pattern, so you need to use binary search to know the next index of 1.

»
15 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

During the contest, I solved problem D, but to be honest, I just somehow guessed the solution because it seemed that the problem was very similar to some classic greedy problem.

I just experimented with how to sort the intervals. Initially, I sorted the array as I did in the classic problem, by the right side of the interval, and I found that the solution was wrong. So I just changed that to sort based on 'real' instead, and the solution passed, but I didn't understand why it worked.

Can someone explain how to approach these types of problems more systematically? How do you usually prove greedy solutions instead of just guessing?

  • »
    »
    15 months ago, hide # ^ |
     
    Vote: I like it 0 Vote: I do not like it

    This is not difficult. This has nothing to do with the size of the right boundary. Let’s assume the number of current coins is x. We can perform the operation when l≤x≤r. We certainly want our number of coins to increase, so this is related to the value of real. When real>x, performing the operation will definitely lead to a better outcome.

»
15 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

On problem F

I got the memory limit exceeded because of creating array 2D with size O(N * sqrt(N)) and for each elements got long long int.

After that, I increase the BLOCK size to 1000, still MLE, and 2000 then got accepted.

»
15 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Toturial?