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

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

Neapolis University Pafos

Привет, Codeforces!

Благодаря поддержке Neapolis University Pafos, продолжается серия образовательных раундов. Университет предлагает получение степени бакалавра в области компьютерных наук и искусственного интеллекта со стипендиями JetBrains. Получите передовые навыки в области искусственного интеллекта и машинного обучения, которые подготовят вас к востребованным техническим карьерам. Доступно ограниченное количество стипендий. Не упустите свой шанс учиться в Европе бесплатно!

В 15.09.2025 17:35 (Московское время) состоится Educational Codeforces Round 182 (Rated for Div. 2).

Этот раунд будет рейтинговым для участников с рейтингом менее 2100. Соревнование будет проводиться по немного расширенным правилам ICPC. Штраф за каждую неверную посылку до посылки, являющейся полным решением, равен 10 минутам. После окончания раунда будет период времени длительностью в 12 часов, в течение которого вы можете попробовать взломать абсолютно любое решение (в том числе свое). Причем исходный код будет предоставлен не только для чтения, но и для копирования.

Вам будет предложено 6 или 7 задач на 2 часа. Мы надеемся, что вам они покажутся интересными.

Задачи вместе со мной придумывали и готовили Адилбек adedalic Далабаев, Иван BledDest Андросов, Максим Neon Мещеряков и Роман Roms Глазов. Также большое спасибо Михаилу MikeMirzayanov Мирзаянову за системы Polygon и Codeforces.

Удачи в раунде! Успешных решений!

Наши друзья из Neapolis University Pafos также хотят передать вам сообщение:

🚀 Бесплатные клубы по Математике, ИИ и Программированию
Университет Neapolis Pafos совместно с JetBrains приглашает школьников (13–19 лет) присоединиться к клубам по математике, искусственному интеллекту и программированию. Это еженедельные программы, созданные для прокачки ваших навыков решения задач через специально подобранные челленджи и живые сессии.

Не упусти шанс отточить свои навыки (и получить удовольствие от крутых миксов задач, которые подготовил pashka).

🔹 Математический клуб
Заложи прочный математический фундамент, чтобы улучшить свои навыки программирования. Каждую неделю ты будешь получать 10–15 постепенно усложняющихся задач, а также полуторачасовую живую сессию каждую субботу. Доступно два уровня сложности, так что ты можешь выбрать траекторию, которая тебе подходит.
💡 Лучшие участники получат 5 бонусных баллов на вступительном испытании на программу бакалавриата «Computer Science and Artificial Intelligence» в Neapolis University Pafos — это полностью финансируемая программа благодаря стипендиям JetBrains Foundation.
👉Присоединиться к Математическому клубу

🔹 Клуб Искусственного Интеллекта
Погрузись в мир искусственного интеллекта — от основ для начинающих до олимпиадных тем (например, IOAI). Присоединяйся к живым сессиям по средам и выполняй еженедельные домашние задания, чтобы постоянно прогрессировать.
👉Присоединиться к Клубу ИИ

🔹 Клуб Программирования
Идеальный вариант для тех, у кого уже есть опыт в спортивном программировании и кто хочет выйти на новый уровень. Каждую неделю — микс из задач с прошлых контестов Codeforces, который курирует Павел Маврин (чемпион мира ICPC 2004, серебряный медалист IOI 2002 и инструктор JetBrains Academy).
👉Присоединиться к Клубу Программирования

🎯 Продемонстрируй свои навыки:
Прими участие в третьем JetBrains Youth Coding Challenge — соревновании для школьников 13–19 лет. Лучшие участники будут приглашены на четвертый Algorithm and Code Training Camp (ACTS) 2026.1 в Румынии или на ACTS Online в январе 2026 года.

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

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

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

expert now?

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

All the best everyone!

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

Guys Why so many contests are coming?

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

Math, AI, Coding clubs sound like an amazing chance for beginners to grow their skills

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

Guys why so many contest are coming?

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

Is this a rated contest? Can someone kindly answer?

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

Hi awoo,

Anything you can do to help with the crawling bans for hacking? These crawling bans have three key disadvantages:

  1. Weaker test cases.
  2. Weaker cheat detection.
  3. Worse user experience.

On other platforms (such as leetcode), I can freely click through submissions which is valuable for additional test cases and cheat detection. On codeforces it seems like there’s a unique technical constraint that currently results in broad bans on anyone clicking through submissions at a normal pace.

Anything you can do to improve the experience for people who enjoy contributing to hacking rounds would be greatly appreciated.

Thanks,

DarkTemplarDrop

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

I hope I can reach Cyan in this contest

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

will i return to expert? we are waiting :)

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

I am newbie. Will I reach to pupil :)

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

no unrated participation?

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

watch me win

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

It would be great to have the unrated participation option available for all the contests, always, MikeMirzayanov ❤️

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

Will grind Hard to become Pupil, This time .

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

6 or 7 problems?

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

Not able to participate as unrated ;-;

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

wish to be a pupil

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

all the best!

wishing for +ve delta for everyone

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

For some reason I have a button to register unrated, and it does not show me that I am out of competition, and I'm definitely over 2100 rating.

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

As dumb a question as this might be, but are all the Educational rounds hosted by Neapolis University Pafos?

If yes, then what are they for exactly? Honestly, I join for rating.

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

Is it normal for so many submissions for a problem like D. It doesn't felt that easy.

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

How did so many solve E1????

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

Yet another time I feel E<D. Got stuck on D for one hour and do not have time to implement E2 :(

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

what rating range of question should I solve if I am stuck at C always for Div2?

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

    Looks like I found you again mate while scrolling, keep trying man you will make it to green. Also try to solve problems in an organized matter like do usaco they have cf problems and ones from other sites organized in every category. Like for example c was just dp nothing else as simple as that you just have to do some for a long time in the usaco

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

speedforces

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

well well well , good D. Don't know how people solved it, stared screen for 1:30 Hour

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

Can someone tell how did they solve D?

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

    you need to check for all x [2 , max(ai)] , just think how you can optimize division get the sum quickly.

    and answer for division will be same for a range of elements

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

    Hi there, this is my solution for D. So you will try all X, if you have X, there 200000/X value that you can potentially keep. Now let say one of these value you can keep as J.If you divide all C[i] by X.All C[i] that has value from (J-1)*X+1 to J*X will become J.And the number of sign you can save is MIN(C[J],Number of sign from (J-1)*X+1 to J*X. Now that we have a solution, how do we know this can run in allowed time constraint. Let's say our complexity is 2e5/1 + 2e5/2 +...+2e5/2e5. This sum shall be equal to 2e5LOG. Hope this help.

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

Why using java in D gives TLe

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

A >> B ?

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

Why does Writing code in java gives TLE in D wheras CPP code works

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

Logic for C ?

»
12 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится
  dp[0][1] = 0;
    dp[0][0] = 1;
    
    for(int i = 1; i <= n; i++)
    {
         // same 
         if(a[i] >= a[i-1] && b[i] >= b[i-1] )
         {
             dp[i][0] += dp[i-1][0]%m;
         }
         if(a[i] >= b[i-1] && b[i] >= a[i-1])
         {
             dp[i][0] = (dp[i][0]%m + dp[i-1][1]%m)%m;
         }
         
         
          if(a[i] >= a[i-1] && b[i] >= b[i-1] )
         {
             dp[i][1] += dp[i-1][1]%m;
         }
         if(a[i] >= b[i-1] && b[i] >= a[i-1])
         {
             dp[i][1] = (dp[i][1]%m + dp[i-1][0]%m)%m;
         }
         
         
    }
    
    int ans = dp[n][0]%m + dp[n][1]%m;

can someone tell me whats wrong in my code

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

can someone explain whats wrong in my code

  dp[0][1] = 0;
    dp[0][0] = 1;
    
    for(int i = 1; i <= n; i++)
    {
         // same 
         if(a[i] >= a[i-1] && b[i] >= b[i-1] )
         {
             dp[i][0] += dp[i-1][0]%m;
         }
         if(a[i] >= b[i-1] && b[i] >= a[i-1])
         {
             dp[i][0] = (dp[i][0]%m + dp[i-1][1]%m)%m;
         }
         
         
          if(a[i] >= a[i-1] && b[i] >= b[i-1] )
         {
             dp[i][1] += dp[i-1][1]%m;
         }
         if(a[i] >= b[i-1] && b[i] >= a[i-1])
         {
             dp[i][1] = (dp[i][1]%m + dp[i-1][0]%m)%m;
         }
         
         
    }
    
    int ans = dp[n][0]%m + dp[n][1]%m;
»
12 месяцев назад, скрыть # |
 
Проголосовать: нравится -9 Проголосовать: не нравится
PS C:\Users\total\Desktop\prep\cf> g++ -o E.cpp E
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find E: No such file or directory
collect2.exe: error: ld returned 1 exit status

Bruh minGW straight up deleted my files instead of compiling and then said "oh whoopsie I can't find the file :D"

I was able to even recover E once somehow and then it happened again sadge

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

got MLE on PD...
time: $$$O(n \sqrt {n})$$$
space: $$$O(n \sqrt {n})$$$
I forgot that $$$O(n \sqrt{n})$$$ is too large for space complexity...

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

D was really good problem. Any hints ?

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

    Consider some final price, p. Now for some i, p = ceil(c[i] / x). Now, it's easy to see that we will get the same price p for not only c[i] costs but for a range of costs. Suppose x = 5, then ceil(50 / 5) = ceil(49 / 5) = ceil(48 / 5) = ceil(47 / 5) = ceil(46 / 5) = 10. So, a good idea is : we can find the range and work on how many times the elements in that range will appear in the original array.

    p — 1 < c[i] / x <= p -> c[i] ∈ [(p — 1) * x, p * x]; x ∈ [2, max_cost]

    We can simply store the frequency of each cost in a frq array and make another prefix sum array called pref such that pref[j] — pref[i — 1] = Number of occurrences of elements from the range i to j. Then iterate over all x and get the new sum of the array of costs. For each value of x, we'll get a result = sum — y * (n — cnt); where cnt = Number of elements in the range [x * (p — 1) + 1, p * x], p is calculated for the corresponding x. Finally maximize the ans. ans = max(ans, result); Time Complexity = O(max * log(max));

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

couldn't even solve A. Problem A was definitely higher than 800, or maybe I'm too dumb.

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

My solution for C. Idk what is wrong in this. Plz help

#include<bits/stdc++.h>
using namespace std;
#define ll long long int
ll pow(ll a,ll b, ll c)
{
  ll res=1; 
  while(b>0)
   { if(b&1)  { res=((res%c)*(a%c))%c;} 
   a=((a)*(a))%c; b/=2;}
   return res%c;
   
}
int main()
{
   int t;ll mod=998244353;
   cin>>t;
   while(t--)
   {
       ll n;
       cin>>n;
       ll a[n],b[n];
       for(ll i=0;i<n;i++)
         cin>>a[i];
      for(ll i=0;i<n;i++)
         cin>>b[i];
      vector<ll>dp(n+1,0);
      //dp[i] all good subset ending at index i
      for(ll i=0;i<n;i++)
      {
         ll r=a[i],s=b[i];
         if(r>s)swap(r,s);
         for(ll j=0;j<i;j++)
         {
            ll c=a[j],d=b[j];
            if(c>d)swap(c,d);
            if(c>r && d>s)
            {
              dp[i]= (dp[i]+pow(2,dp[j],mod))%mod;
            }

         }
      } ll ans=0;
      for(ll i=0;i<=n;i++)
         ans=(ans+dp[i])%mod;
       cout<<ans<<endl;
   }

}

Why is this wrong someone explain plz

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

    try to solve the problem in O(n)

    very simple

    for each ai , bi or there is either 1 way or there are 2 ways (you can swap)

    try greedy

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

    What does $$$2^{dp[j]}$$$ mean here? It seems too big.

  • »
    »
    12 месяцев назад, скрыть # ^ |
     
    Проголосовать: нравится +2 Проголосовать: не нравится
    • For each position i, we have two choices:
    1. Do not swap: Keep (a[i], b[i]) as is.
    2. Swap: Make it (b[i], a[i]).
    • We must ensure that after all decisions, both arrays are sorted.

    • We need a DP-based solution since trying all 2^n subsets explicitly is too slow.

    dp[i][0] = number of valid ways to reach index i where we do NOT swap a[i], b[i]

    dp[i][1] = number of valid ways to reach index i where we DO swap a[i], b[i]

    dp[1][0] = dp[1][1] = 1; At the first position, both swap and no-swap are allowed.

    Transition for each i = 2 to n:

    - if (a[i] >= a[i - 1] && b[i] >= b[i - 1])
        dp[i][0] += dp[i - 1][0];
    
    - if (a[i] >= b[i - 1] && b[i] >= a[i - 1])
        dp[i][0] += dp[i - 1][1];
    
    - if (b[i] >= a[i - 1] && a[i] >= b[i - 1])
        dp[i][1] += dp[i - 1][0];
    
    - if (b[i] >= b[i - 1] && a[i] >= a[i - 1])
        dp[i][1] += dp[i - 1][1];
    
    

    Each transition checks if the current pair (either swapped or not) can maintain sorted order from the previous state (either swapped or not).

    After processing all indices, the answer is dp[n][0] + dp[n][1].

    Submission : 338809665

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

Stuck in D for an whole hour getting both MLE and TLE because I thought the intended solution is $$$O(N\sqrt{N})$$$. sad.

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

E1<<<D

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

I felt like time limit was too tight for D :/

My nlogn solution in cpp TLEed

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

I got 2 WAs on Problem C just because of using MOD=1e9 + 7. :(((

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

I wrote the following solution for the D problem , and everytime it got TLE on the 3rd TC.

but after contest i added this line (ios_base::sync_with_stdio(false); cin.tie(0);) in my main function & it got accepted . How?

This is really absurd.

please sombody explain it.plz


#include <bits/stdc++.h> using namespace std; using ll = long long; ll pre[ll(2e5)+10]; ll solve(){ ll n,y; cin>>n>>y; vector<ll>arr(n); for(auto&i:arr){ cin>>i; } auto maxi=ll(2e5+5); memset(pre,0ll,sizeof(pre)); for(auto num:arr)pre[num]++; for(ll i=2;i<=maxi;i++)pre[i]+=pre[i-1]; ll ans=LLONG_MIN; for(ll i=2;i<=(maxi/2)+1;i++){ ll m=1ll; ll cost=0ll; while(m<=(maxi+i-1)/i){ ll left=(m-1)*i+1, right=m*i; right=min(right,maxi); ll cnt=pre[right]-pre[left-1]; cost +=cnt*m; ll aval=pre[m]-pre[m-1]; cnt-=min(cnt,aval); cost -= cnt*y; m++; } ans=max(ans,cost); } return ans; } int main() { int tc; cin>>tc; while(tc--){ cout<<solve()<<"\n"; // solve(); } return 0; }
»
12 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Can anyone tell why is this code wrong https://pastebin.com/kacZJB1A

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

The current time limit for Python on problem E1 seems too strict. My solution, which is clearly O(n^2), times out on test 20 even though this complexity should be acceptable for the given constraints. Could you please consider raising the Python time limit and rejudging all Python submissions for this task? Here is my code for reference (it’s straightforwardly O(n^2), submitted on PyPy 3.10) : 338820099

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

.

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

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

Can anyone please tell what is error in this code?? https://pastebin.com/kacZJB1A

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

Sat like a fish out of water after seeing D :(

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

Straightforward for D:

  • Prices: c1,…,cn. Let C = max(ci) ≤ 200000.
  • New prices: ceil(ci / x). Printing cost: y.
  • Let t be the number of new prices that coincide with existing tags (some cj).
  • Objective: f(x) = sum_i ceil(ci / x) − y*(n − t) = (sum_i ceil(ci / x)) − y*n + y*t.

When an old tag cj “covers” a new price ceil(ci / x):

  • Condition: cj = ceil(ci / x) ⇔ (cj − 1)*x < ci ≤ cj*x.
  • For fixed x, all ci fall into buckets ((cj−1)*x, cj*x] and produce new price cj.

Range of cj for fixed x:

  • From ci ≤ C we get cj ≤ C/x + 1.
  • Hence iterate cj = 1..V(x), where V(x) = ceil(C / x).

Frequencies and prefix sums over original prices:

  • freq[v] = #{i : ci = v}.
  • P[t] = sum_{v ≤ t} freq[v], with P[0] = 0.

How many ci produce the new price cj:

  • new_x[cj] = P(min(cj*x, C)) − P(min((cj−1)*x, C)).

How many tags are reused:

  • t(x) = sum_{cj=1..V(x)} min(new_x[cj], freq[cj]).

Enumeration:

  • x = 2, 3, …, C (for x ≥ C we have ceil(ci / x) = 1 for all i, same value as x = C).
  • Take the maximum f(x).

Complexity:

  • Total over all x: sum_x ceil(C / x) = O(C log C).
»
12 месяцев назад, скрыть # |
 
Проголосовать: нравится +3 Проголосовать: не нравится

I think it was a decent Edu round.

  • A. An observation (divisibility of the sum by 3) could've made life easier, but I just implemented the brute force solution.
  • B. Decent B with a small corner case, which can be dealt with without much struggle.
  • C. Share spirit with A, and here an observation (make A < B first, then count good pairs) could've also sped up AC, but I again used the first idea I had, which was dp
  • D. So sad that I couldn't figure how to use the harmonic series $$$O(n \log n)$$$ thing here during the contest. The problem is great.
»
12 месяцев назад, скрыть # |
Rev. 4  
Проголосовать: нравится +1 Проголосовать: не нравится

To solve problem C, I used this O(n) approach.

Let dp[i] be the number of good subsets that use elements from positions 1 to i.

If a[i] ≥ a[i-1],
a[i] ≥ b[i-1],
b[i] ≥ b[i-1],
b[i] ≥ a[i-1]

then adding index i+1 is optional. For every existing good subset, we can either keep it as is or include i+1, which doubles the count: dp[i+1] = 2 * dp[i]

Otherwise, adding index i+1 is required to maintain validity, so the count stays the same: dp[i+1] = dp[i]

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

C can be solved without dp.

idea: at first swap each pair so that $$$a[i] \geq b[i]$$$

Then both sequences are sorted. It’s not hard to see that the entire set of indices now splits into disjoint segments, where we can either swap all elements or not swap them at all. The answer is $$$2^{numberOfSuchSegments}$$$.

code: 338797210

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

I don't understand my D solution. I calculated prefix sums until 2e5, wrong answer on test case 5. But when i changed it to 3e5, it ACed? Why's that happening? shouldn't we check only until max value?

https://codeforces.me/contest/2144/submission/338844703

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

These questions are all very interesting and I really like them.

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

sadly, don't solve problem D in contest, i realized that I needed to enumerate over the value domain, but in the end, I still didn’t figure it out clearly.

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

Problem B. Maximum Cost Permutation

Video Editorial Link: https://youtu.be/f3RfU-lfuH0?si=Ge5mszVMB8SH-5Zs

Thanks for watching!

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

The test cases in C are so weak that my dp code passed only just MODing the final answer.

338776949

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

The testcases for C are so weak that my dp code passes only just MODing the final answer.

Code

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

When the contest begin,Chinese students are sleeping,:(.I am not happy.

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

When the contest being,Chinese students are sleeping.I am not happy,because I can't take part in this contest,I have to go to sleep.:(

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

I have reached home from office nearly one hour after the contest began… yet that didn’t stop me from scoring 3 problems on the very first attempt within 50 minutes, Siuuu...

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

I think it turned unrated.

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

I think peaple's feedbacks with D is interesting. Seems $$$O(n + \frac{n}{2} + \frac{n}{3} + \dots + \frac{n}{n}) = O(n \log n)$$$ is a well known trick. But after some simple transformations, it did confuse many people, including me :)

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

What's the difference between educational rounds and normal div2 rounds?

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

where's editorial ?

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

When the tutorial will be released ?

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

Why is there no score for this contest?

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

where is tutorial or it is rated or unrated how do i know can anyone help me

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

where is rating?

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

My first rated match. Solved Problem B. In problem A, printed arr[i] and arr[j] instead of I and j. But timer got over. Friends,can you tell if div 2 regular round is tougher than educational round div 2.

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

Where can I find the answers to this contest?

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

It's my first time to participate the contest, why does my interface display "unallowed rated"? :(

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

can somebody tell me where i am going wrong ? submission for D

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

Please Give me My rating updates, T_T

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

Anyone got the ratings for this ?? I haven’t got it yet it’s been 12+hrs

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

when will ratings be given

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

Why the rating does not gets updated for the contest Educational Codeforces Round 182 ?

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

why is it unrated?

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

Where is the editorial?

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

ANY HINTS FOR 'C' ??

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

    there are 4 types of element in it : 1. fixed: if a[i]<=a[i+1] && a[i]>b[i+1] and vice versa 2. essential change: if a[i]>a[i+1] && a[i]<=b[i+1] ...

    in these cases we have no other choice. 3. free: if a[i]<=a[i+1] && a[i]<=b[i+1] ... this one can change.

    4th is not possible as per question. so we will take continious ones with no choice as 1 element, count all element(say k) calculate and print 2^k.

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

Thanks to this contest because after this contest I'm out of newbie now.

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

In the recent Educational Codeforces Round 182 (Rated for Div. 2), I noticed that the code of this user kzhi shows signs of code plagiarism (338807618). He obfuscated his code, and I feel like he might have taken the solution from AI. I sincerely hope that the admins MikeMirzayanov and the contest organizers awoo can permanently ban this case.

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

please upload the editorial

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

I have received a plagiarism warning for my submission, but I do not know the other participant whose solution coincided with mine. I did not share my code with anyone, nor did I use any external/public sources. My work was done independently on my local machine, and I have no connection with the flagged user. Please review my case. I am happy to provide any additional information or logs to help clarify the situation.

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

Hi to the moderators and admin. My solution submitted for 2144C was given to be matching with uno_20/338781348. I would like the moderators to once again take a note of the question. In a general 2DDP we have a fixed way of writing the code, I have been doing the same types of questions in same format for last 2-3 months. Now you have flagged it as plagiarised and removed me out of competition what do I do? Will you mark the contestants for writing the same response for "Hello World" too? In the question we had to compare the consecutive elements in 2 arrays and I did exactly that and allocated the best answer to the DP matrix and initialized the dp matrix before hand with 1s. Now how can you all say that my answer is matching with someone even when I do not even know the person. I request you all to please take this into consideration and put me back into the competition because I had outperformed my expectations in that contest and It had be a good achievement for me rather it became something else due to this negligence. It is not fair. I am not wrong here, you need to correct it. 338770485 MikeMirzayanov awoo.

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

Dear organizers,awoo and MikeMirzayanov,

I received a notification about my solution (338804979) for problem 2144E1 - Looking at Towers (easy version) and (338785110) for 2144D - Price Tags coinciding with other participants' solutions. I want to emphasize that I solved the problem independently during the contest using USACO IDE (a private IDE), and I did not share my code with anyone or access external sources.

The similarity in solutions might be due to:

The problem having a common solution approach (e.g., greedy, DP, or standard algorithm) that leads to similar code structures.

Small constraints or obvious implementations that result in identical code segments.

I assure you that I strictly follow Codeforces rules and value the integrity of the platform. I kindly request you to re-evaluate my submission and remove the skip penalty if deemed appropriate.

Thank you for your hard work and fairness.

Best regards,Chillprogammer.

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

Editorial????

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

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

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

Title: Appeal: False Plagiarism Flag for Submission 338775909 (Problem 2144D) Hello Codeforces team, My handle is ishowguts. Submission 338775909 for problem 2144D was flagged as coinciding with submission 338766632, but I wrote all the code myself offline in VS Code with no collaboration. Development timeline & evidence: * First save: September 15, 2025 at 9:03 PM IST * Last save: September 15, 2025 at 9:54 PM IST * All file “last modified” timestamps in my local workspace reflect this period * I never uploaded or shared my code on any public IDE or platform during development * I implemented each function and logic block manually in this session 
Please manually review both my code and the other submission. If you need any more evidence, I am ready to provide it. Thank you for your time and understanding.
@MikeMirzayanov @awoo

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

Title: Appeal: False Plagiarism Flag for Submission 338775909 (Problem 2144D) Hello Codeforces team,MikeMirzayanov awoo My handle is ishowguts. Submission 338775909 for problem 2144D was flagged as coinciding with submission 338766632, but I wrote all the code myself offline in VS Code with no collaboration. Development timeline & evidence: * First save: September 15, 2025 at 9:03 PM IST * Last save: September 15, 2025 at 9:54 PM IST * All file “last modified” timestamps in my local workspace reflect this period * I never uploaded or shared my code on any public IDE or platform during development * I implemented each function and logic block manually in this session 
Please manually review both my code and the other submission. If you need any more evidence, I am ready to provide it. Thank you for your time and understanding.

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

Hi awoo and MikeMirzayanov,

I received a plagiarism warning regarding my submission 338766379 for problem 2144C, which was marked as coinciding with submission 338804878 by user Chervinko.

I would like to clarify the following:

  1. I submitted earlier.

My submission was made before the compared one.

  1. I did not leak my code. I worked only on my local machine, without sharing my code through pastebins, repositories, or public IDEs.

  2. My solution idea came from a known LeetCode problem. While solving, I recalled the LeetCode problem “Minimum Swaps to Make Sequences Increasing”. That problem also uses a 2-state DP (swap / no swap) with four transition checks. I adapted this idea for the Codeforces problem, but here the task is different. I wrote the solution independently during the contest.

  3. Reason for similarity between participants. Since this DP formulation is a well-known standard approach, independently written solutions naturally end up very similar. The similarity with another participant’s code is coincidental, not due to copying.

Given these points, I kindly ask you to reconsider the skipped verdict on my solution. I respect the rules and take plagiarism very seriously. I assure you this was an independent solution that I developed myself.

Thank you for your time and for organizing the contest.

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

Hello awoo and MikeMirzayanov

I am appealing my plagiarism flag for Educational Round 182, submission [338801217] (problem 2144C).

I want to clarify:

I do not know the other users mentioned (falakejaz2004), and I did not copy their code.

I wrote my own solution during the contest. The problem 2144C – Non-decreasing Array is a straightforward DP problem with a common pattern. Once you identify the condition, many people will naturally write very similar code. That is why my solution might look close to others, even without any copying.

The only external help I sometimes use is AI tools, and only for syntax correction (like fixing semicolons or braces), not for solving problems.

If needed, I can provide proof that I submitted my code earlier and that it was my own work.

It is possible that another participant used AI as well, which generated code that looks similar to mine.

I kindly request that you review this case again. Please restore my rating and ensure my account is not banned. I respect the Codeforces community and I want to continue participating fairly.

Thank you for your understanding.

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

Hello, I received a warning for submission 338795126 for problem 2144F regarding significant similarity with other submissions. I would like to clarify that I wrote this solution independently without copying from anyone else. I may have used common templates or standard approaches that are widely known in competitive programming, which could explain the similarity. I did not use any public code-sharing sites during the contest. All my code was written in my personal environment.

If needed, I am happy to provide a detailed explanation of my approach and the reasoning behind my solution to prove its originality.

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

[Regarding plagiarism warning for submission 338811303]:

Hello, I received a coincidence warning for my solution (submission ID: 338811303) for problem 2144D. I have posted a detailed clarification on my blog here: https://codeforces.me/blog/Sumits_0803

Please review the explanation there. Thank you for your time.

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

:/