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

Автор Friendiks, 3 месяца назад, По-русски

Привет, Codeforces!

Мы рады объявить, что Codeforces Round 1106 (Div. 2) пройдёт в 28.06.2026 17:35 (Московское время). Раунд будет рейтинговым для участников с рейтингом ниже $$$2100$$$. Вам будет предложено $$$6$$$ задач, на решение которых будет $$$2$$$ часа.

Все задачи были придуманы и подготовлены lewc, KotlechkovEgor и мной.

Мы выражаем ОГРОМНУЮ благодарность следующим людям, без которых раунд не смог бы состояться:

Распределение баллов будет следующим:

A B C D E F
$$$500$$$ $$$750$$$ $$$1250$$$ $$$1500$$$ $$$2250$$$ $$$2750$$$

UPD: Разбор опубликован

UPD2: Поздравляем победителей!

Официальные участники

Неофициальные участники

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

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

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

New record: 12 contests in a row with no interactive problem. (Does not count 2237G - Send GCDs, because it's too hard for me to solve it's also communication)

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

Like round 1097, Problem D is below usual score.

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

Two consecutive rounds? Something happened?

(1105 & 1106)

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

Traktor is back in business.

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

As a tester, I really liked problemset, and since I'm a tester, please give me a contribution

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

Back to back Div. 2's

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

hello i am beginner, i could solve no problem today, suggest me something to ace, i have 250 questions on leetcode. How to master codeforces ?

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

i felt b really tough, feeling so demotivated

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

omg 74TrAkToR round. Waiting at least $$$2$$$ NP complete problems and $$$1$$$ with incorrect model solution.

»
3 месяца назад, скрыть # |
Rev. 2  
Проголосовать: нравится -54 Проголосовать: не нравится

give me a cotribution edit1:how i get -46 votes ? lol =)

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

oh terrible gap between Div2D and Div2E.

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

As not a tester, I wish everyone +delta

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

As a tester, I really liked problemset, and since I'm a tester, please give me a contribution

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

wrong contest

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

Don't want to lose rating anymore TAT

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

Is it NP-complete?

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

As an All_rounder, I carefully decided to start with Problem A. Peak strategy.

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

as a guy who decided to not test this round i hope it was a good decision.

UPD: also, as a friend i won't talk to Friendiks ever after unless I become master today

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

Wow such a big difficult gap.

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

why was yesterdays contest creators fixated on XOR!!

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

I hope this one isn't as hard as yesterday's. ~ fellow newbie

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

I hope to solve A to C (and maybe D)

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

How can I hack during the contest?

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

such a fun contest after a long time honestly

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

Loved the number theory problems $$$B$$$ and $$$D$$$.

Good problems, thanks for the round.

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

Love the themes for the questions!

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

One of the most beautiful contest I ever gave

Seriously, like the dopamine hit when I got D was like kisses.

This might just be my opinion, cause I love math more than coding.

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

Good problems

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

Love NumberTheoryForces!

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

Why to hell CodeForces website soooo non-responsive??? Submitting a solution often takes several minutes. mirror.codeforces.com is completly dead, m1/m2/m3.codeforeces.com are also dead. Failed to submit E on last minutes :(

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

problem D best(as a math lover). but esay.

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

Best div2 in a while imo

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

Great contest, reached CM. Lets gooooo

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

How it feels knowing that you can throw this round and suffer no consequences

And then proceed to get ABCDE and think I do amazing and then see perf of 2070 :sob:

»
3 месяца назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится
  • Me after solving B.
  • Me after B.png
»
3 месяца назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

problem D best(as a math lover). but esay.

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

Wow fast system test :)

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

In problem C,

"The houses in the village are connected by bidirectional paths"

So, if the graph is 1---2---3 then houses 1 and 3 forms a guild, right? (v=2;h=1)

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

problem D best(as a math lover). but esay.

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

I submitted F at 01:58:55, 65 seconds before the contest ended, and it got an AC a minute after the contest ended :)

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

oh yes Mathforces and Guessforces

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

Why did nobody hack?

Is it unhackable?

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

What is the solution to problem E?

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

    E is just pure DP. Consider $$$dp_{k,i,j}$$$ means the maximum number of the minimum wrong answers in $$$[1,k]$$$ among all F segments $$$[l,k]$$$ where the minimum wrong answers in $$$[1,k]$$$ among all F segments $$$[l,r]$$$ is $$$i$$$ and the actual number of F's in $$$[1,k]$$$ is $$$j$$$.

    • If the $$$k+1$$$-th cake is F, we have $$$dp_{k,i,j} \to dp_{k+1,\min(i+1,dp_{k,i,j}),j+1}$$$;
    • If the $$$k+1$$$-th cake is T, we have $$$\min(dp_{k,i,j}+1,j) \to dp_{k+1,\min(i,dp_{k,i,j}+1,j),j}$$$.

    Total $$$O(\sum n^3)$$$.

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

      My code:

      /*
      dp[k][i][j]:在 1~k 的前缀总共出现 j 个 F 且任意 1~k 之间的 F 线段在 1~k 至少错 i 个时,任意 l~k 的 F 线段至少错的数量
      若 k+1 填 F,则 dp[k][i][j] -> dp[k+1][min(i+1,dp[k][i][j])][j+1]
      若 k+1 填 T,则 min(dp[k][i][j]+1,j) -> dp[k+1][min(i,dp[k][i][j]+1,j)][j]
      */
      #include<bits/stdc++.h>
      using namespace std;
      typedef long long ll;
      #define mx(a,b) a=max(a,b)
      int t,n,ans,dp[2][509][509];
      char c;
      int main(){
      	ios::sync_with_stdio(0),cin.tie(0),cout.tie(0);
      	cin>>t;
      	while(t--){
      		cin>>n,ans=0;
      		for(int i=0;i<=n;++i) for(int j=0;j<=n;++j) dp[0][i][j]=-0x3f3f3f3f;
      		dp[0][0][0]=0;
      		for(int k=1,u=1,v=0;k<=n;++k,u=!u,v=!v){
      			cin>>c;
      			for(int i=0;i<=n;++i) for(int j=0;j<=n;++j) dp[u][i][j]=-0x3f3f3f3f;
      			if(c!='T') for(int i=0;i<=n;++i) for(int j=0;j<=n;++j) if(dp[v][i][j]>=0) mx(dp[u][min(i+1,dp[v][i][j])][j+1],dp[v][i][j]);
      			if(c!='F') for(int i=0;i<=n;++i) for(int j=0;j<=n;++j) if(dp[v][i][j]>=0) mx(dp[u][min(i,min(dp[v][i][j]+1,j))][j],min(dp[v][i][j]+1,j));
      		}
      		for(int i=0;i<=n;++i) for(int j=0;j<=n;++j) if(dp[n&1][i][j]>=0) ans=max(ans,i);
      		cout<<ans<<"\n";
      	}
      	return 0;
      }
      
  • »
    »
    3 месяца назад, скрыть # ^ |
     
    Проголосовать: нравится +8 Проголосовать: не нравится

    Image all N's are already replaced.
    When 2nd player selects sub-segment, he tries to take max F's and min T's, specifically max(F — T) on sub-segment.
    And the answer is {total amount of F's} — {max [amount of F's — amount of T's] among all sub-segments}.

    Solution is O(n^3) DP. State is:
    i: position which we consider (all to the left (i.e. prefix) is already processed).
    f: amount of F's in processed prefix.
    d: current balance of F's and T's (maximal cnt(F) — cnt(T) among suffixes of processed prefix).
    Value of DP is best (minimal) balance.
    Transitions are:
    F: (i + 1, f + 1, d + 1)
    T: (i + 1, f, max(0, d — 1))
    2nd players uses new d to maximize best d (i.e. the DP value).
    Final answer is amount of F's — best balance.
    https://codeforces.me/contest/2238/submission/380519271

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

As neither a tester nor a participant, I can say after the round that C was a really good and interesting problem.

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

Can someone explain F solution.

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

    First, you need to notice that you cannot fire two students if one of them is subortinate to the other one, unless you fire both of them in the same day, which is not optimal.

    Now, all the students who has never been fired forms a tree.

    If a student gets fired in the $$$(n-i)$$$-th day, the number of students hired in his subtree in the $$$n$$$-th day would be $$$2^i-1$$$.

    Count the students hired in the last day, and you will find that the sum of $$$2^i-1$$$ among all fired students equals to $$$k-(s-1)$$$, where $$$s$$$ is the number of fired students.

    This means, the sum of $$$2^i$$$ is $$$k+1$$$.

    Now, you have to minimize $$$s$$$, so you should choose the biggest possible $$$2^i(0 \le i \le n-1)$$$ for each student.

    The answer is $$$C(s-1) \times f$$$, where $$$C(x)$$$ is the number of different possible trees with $$$x$$$ nodes, which is the Catalan sequence, and $$$f$$$ is the number of different permutations of all the $$$2^i$$$ you need.

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

      Upd 1:Oops, found a mistake in the note inside my code. Fixed.

      My code:

      /*
      第 n-i 轮结束时解雇一个人会导致最终这棵子树大小为 2^i-1
      总共解雇 s 个人的话,根附近始终未解雇的有 s-1 人
      于是 sum i=1~s(x[i])=k-s+1
      其中 x[i]=2 的不超过 n-1 次幂 -1
      令 y[i] in 2^0,2^1,...,2^(n-1)
      首先找到一种最优策略
      如果有两个相同的 2^i,可以变为 2^(i+1),不优
      于是除了 2^(n-1),每个 2^i 至多取一次
      所以一定尽可能用大的来凑
      先统计总共要解雇 s 个人,ans=C(s-1)*S
      如果有 a[i] 个 2^i(a[0],a[1],...,a[n-2] 都为 0 或 1)
      则 S=s!/a[n-1]!
      */
      #include<bits/stdc++.h>
      using namespace std;
      typedef long long ll;
      const int mod=1e9+7,R=1e9+5;
      int t,n,k;
      ll s,ans,o[29],f[400009],g[400009];
      inline ll w(ll a,ll b){return !b?1:b==1?a:b&1?w(a*a%mod,b>>1)*a%mod:w(a*a%mod,b>>1);}
      inline ll C(int x){return f[2*x]*g[x]%mod*g[x+1]%mod;}
      int main(){
      	ios::sync_with_stdio(0),cin.tie(0),cout.tie(0);
      	f[0]=1;
      	for(int i=1;i<=400005;++i) f[i]=f[i-1]*i%mod;
      	g[400005]=w(f[400005],R);
      	for(int i=400005;i;--i) g[i-1]=g[i]*i%mod;
      	cin>>t;
      	while(t--){
      		cin>>n>>k,s=ans=0;
      		++k,--n,n=min(n,__lg(k)),memset(o,0,sizeof(o));
      		if(k==(1<<n)){cout<<"1\n";continue;}
      		for(int i=n;i>=0;--i) o[i]=k>>i,s+=o[i],k&=((1<<i)-1);
      		cout<<f[s]*g[o[n]]%mod*C(s-1)%mod<<"\n";
      	}
      	return 0;
      }
      
»
3 месяца назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

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

In C if n=4 and the parents are like this 1 1 1 for h=1 and v=1 is there only one guild or more i couldnt understand this part

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

Nice round, I enjoyed the tasks :)

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

how to solve D i was unable to build an intuition :| .

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

.

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

Thank you guys for your contest it was so cool and I enjoyed it. I wish you all the best and continued success.

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

Subject: Appeal regarding submission 380502541 for problem 2238D (Unintentional Leak)

Hello Codeforces Administration,

I am writing to appeal the coincidence warning I received regarding my submission 380502541 for problem 2238D and its similarity to submissions by Anurag97 and Garima_badugu123. I want to be entirely transparent about how this overlap occurred.

The custom logic inside my solve() function—including the specific loop structures and variable naming—is my original work. I did not copy this from anyone, nor did I intentionally share it in any group chat, forum, or with any other participant.

During the live contest, I used JDoodle, a cloud-based online compiler, to quickly compile and test my C++ code. I was completely unaware that JDoodle does not secure code by default and that snippets can be easily scraped by automated bots via public URLs. It is clear to me now that my solution was unintentionally exposed to the public through this platform while the round was still active, leading to it being scraped and submitted by others.

For full context, the sieve() function at the top of my submission is a widely known, pre-published template for the Sieve of Eratosthenes that I keep in my standard toolkit. However, I understand that the strike is due to my custom logic being leaked.

I sincerely apologize for my negligence in securing my workspace during a live round. I respectfully ask you to consider lifting this penalty, as this was a case of unintentional leakage rather than deliberate cheating. Thank you for your time, understanding, and all the work you do to keep the platform fair.

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

I have got warning of almost same solution of this contest question number A. Submission ID:http://contest/2238/submission/380467525 I have read this problem on some sources on github on problem name Array_differnece a week ago from there i have read and used in the last contest. Kindly please remove my skipped for yesterday's contest. here is the source link : https://github.com/MK-VIONIX/MNIT/blob/main/Competitive%20Tips/Array%20difference.cpp

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

    why do you have so many compilation error submits?

    I get sometimes it can happen but man, running the code atleast once before submitting should be done, I get sometimes mishaps can happen while submitting but you have a unusual amount of compilation errors.

    not to mention I saw a first submission to a question being compilation error not due to half pastes or anything but a typo in return and some other overloaded stuff, I am sure these stuff could have been avoided if you actually ran the code?

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

Subject: Appeal for Plagiarism Flag on Problem 2238E (Submission: 380512433)

Dear Codeforces Team,

My submission 380512433 for problem 2238E was flagged for a significant coincidence with solution 380483328 by gaurav225. I wrote this solution completely locally on my computer and did not share, leak, or host my code on any public platform. I believe this flag is a false positive caused by a structural convergence in our solutions. Below, I present the exact mathematical derivation and structural fingerprints that prove my independent authorship:

The constraints of the question can be reduced to a simple algorithm, which directly dictates the states used in my code. The no. of mistakes Chell makes in choosing the interval of fake cakes is just, T inside [l,r] + F outside [l,r]. So, the total no. of mistakes becomes T inside [l,r] + (Total F- F inside [l,r]) = Total F- (T inside [l,r]- F inside [l,r]).

Since Chell wants to minimize her mistakes and Total F is fixed, so we minimize (T-F) i.e. min(T-F) which is just -max(F-T). Assigning F=+1 and T=-1, the max(F-T) becomes the maximum subarray sum of the string, which is a consequence of Kadanes Algorithm.

On the contrary, GlaDOS wants to maximize Chell's mistakes, so we need dp to track both global and running max subarray sum. My code exactly does this using a dp with cur and mx. The further logic was simple as depending on whether we encounter F or T, the cur and mx values change accordingly. And, to optimize memory from O(N^3) to O(N^2), I used a standard rolling layer optimization via dp.swap(ndp).

I have built my performance on this platform through honest, independent practice. I kindly request that you review the structural convergence of this case and restore my submission standing as soon as possible. Thank you for your time and understanding.

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

Subject: Appeal for matching code flag on problem 2238C

Hi Codeforces Team,

My submission 380496146 for problem was falsely for plagiarism as I wrote this code entirely independently from scratch during the contest. ( my solution matched with Sri_avtar18 and Boptep )

The high similarity flagged by the automated detector is a complete coincidence due to the standard nature of the problem and the inevitability of the implementation.

My code uses a standard iterative Tree DP approach based on the given parent array a[i], Because the input provides parents for nodes 2 to n where the parent a[i] < i, the nodes are already topologically sorted. Iterating from n down to 2 (for (int i = n; i >= 2; i--)) is the standard way to process a tree bottom-up without explicitly building an adjacency list or running a recursion-heavy DFS. This is a common in problems like edge weight assignment, gardening trees (which I have solved) and links like https://codeforces.me/blog/entry/20935

While the core DP logic matches due to the simplicity of the approach, my unique coding style is visible, I initialized my tracking vectors b and c explicitly with -1 using vector b(n+1,-1); instead of clearing or using a global array, which fits my usual implementation habit, My variable naming choices (depth, maxdep, cnt, maxi) are standard, literal names that any English-speaking programmer would pick for this specific tree properties task.

I coded this entirely on my local offline environment and did not use any public online IDEs like Ideone.

Given that the logic used is identical to standard Tree DP educational templates, it is highly expected for multiple solutions to converge on this exact code structure. I kindly request the Codeforces team to review my submission and restore my contest rating.

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

Clarification regarding plagiarism flag on Problem 2238C

Hello Codeforces Team and Community, My solution 380508782 for problem 2238C was flagged for coinciding with other users. I want to clarify that I did not intentionally share my code or cheat. During the contest, I used the CodeChef online compiler to test my logic and run test cases before submitting. I was completely unaware that the online IDE could be publicly scraped by bots or other users during a live round. I wrote this solution entirely on my own, and it was leaked unintentionally. I now understand that safeguarding my code is entirely my responsibility. I have already switched to a local offline environment to ensure this never happens again. I request the organizers to please take this into consideration to protect my account standing. Thank you.

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

I received a plagiarism warning for my submission. I would like to clarify that I solved the problems independently during the live contest. I do not know the mentioned user, did not exchange code with anyone, and did not use or publish any public source during the contest. If there are similarities between the submissions, they are unintentional. I am willing to provide any additional clarification if needed.

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

I received a plagiarism warning for my submission. I would like to clarify that I solved the problems independently during the live contest. I do not know the mentioned user, did not exchange code with anyone, and did not use or publish any public source during the contest. If there are similarities between the submissions, they are unintentional. I am willing to provide any additional clarification if needed.

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

Dear Codeforces Team,

I respectfully request a manual review of my submission 380514626 for Problem 2238E, which was flagged for plagiarism. I wrote this solution independently during the contest. I did not view another participant's source code, exchange code with anyone, or intentionally share my solution through any platform or service.

My implementation is consistent with the coding style I have used across many of my previous submissions. In particular, I frequently do dp using rolling layers (dp/nxt_dp), initialize unreachable states to -1 or INF based on the formulation, perform state updates, copying the next DP layer back into the current one, and use helper update logic with max(...) or chmax(...) from my template. These are implementation patterns in my own solutions rather than choices specific to this contest.

While I understand that independent implementations of the same dp formula can share similar state definitions and updates, I respectfully request that my submission be reviewed individually. I would be happy to provide any additional information available. Thank you.

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

Explanation for Similarity Flag on My 2238C Submission

Hi Codeforces Administration,

I wanted to give some context on the match found on my 2238C submission from Round 1106 (Div. 2). I'd been away from competitive C++ for quite a while, so in the days leading up to the round I was using an LLM to get back into practice. During one of those practice sessions, it showed me a pattern for declaring a recursive function inside another function so it could still access the outer array/variables (the auto& self lambda trick) — that's just what stuck with me, and I used it without thinking twice when I wrote my solution during the contest.

Worth mentioning too: the actual approach here (keeping track of the top two subtree depths, max1/max2) doesn't really leave much room for different implementations — the core part of the function ends up pretty short and similar no matter who writes it, which probably added to the overlap on top of the shared coding pattern. I have no connection to the other participant whatsoever — never interacted with them before, during, or after the round.

I get why this raised a flag, and I'll be more mindful going forward about patterns I pick up elsewhere that might end up common across other solvers.

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

Submission: 380505706 of user Fyterox I wanted to clarify my submission because I believe the similarity is due to the nature of the problem rather than copying.

My thought process was to look at a few small cases ie primes, two-powers, and numbers with multiple prime factors and notice that the answer depends only on the prime factorization. From there, I counted the total number of prime factors and the number of distinct prime factors using trial division.

Since factorizing a number this way is the most common approach for (O(n), many correct solutions end up looking very similar, looping up to the square root, dividing out each prime factor, and handling the remaining prime at the end. It's short implementation with little room for variation.

You can find almost same implementations in popular youtube educational channels.

I did not copy anyone else's code, and I would appreciate it if my submission could be reviewed manually. Thank you.

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

I solved the problem 2238-C independently during the contest. I use the same local template files a.cpp, b.cpp, c.cpp in VS Code, so the final submission was written inside an existing file, which is why I do not have any history or last file edited things , unfortunately I saw the notification box during todays contest 1107 thats why the code file was already modified by todays contest code. I did not copy code from any person or source, and I did not share my code with anyone. The similarity is due to the standard approach and my thought process. If needed, I can explain the solution idea and my process.[submission:380500848][my file structure](https://drive.google.com/file/d/1znmQsdEteqeRVFP8gsUrmSXxI61Gqm9j/view?usp=sharing)

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

This contest helps me increase my rating to newbie to pupil.