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

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

Neapolis University Pafos

Hello Codeforces!

The series of Educational Rounds continues thanks to the support of the Computer Science and Artificial Intelligence (CSAI) program at Neapolis University Pafos, with scholarships provided by JetBrains.

Educational Codeforces Round 187 (Rated for Div. 2) will start on 25.02.2026 17:35 (Московское время).

This round will be rated for the participants with rating lower than 2100. It will be held on extended ICPC rules. The penalty for each incorrect submission until the submission with a full solution is 10 minutes. After the end of the contest, you will have 12 hours to hack any solution you want. You will have access to copy any solution and test it locally.

You will be given 6-7 problems and 2 hours to solve them.

The problems were invented and prepared by Adilbek adedalic Dalabaev, Ivan BledDest Androsov, Maksim Neon Mescheryakov, Roman Roms Glazov, Maks FelixArg Novotochinov and me. Also, huge thanks to Mike MikeMirzayanov Mirzayanov for great systems Polygon and Codeforces.

Good luck to all the participants!

Our friends at Neapolis University Pafos also have a message for you:

Admission is now open for the BSc in Computer Science & Artificial Intelligence. Up to 40 full scholarships from the JetBrains Foundation will be awarded this year, covering tuition, accommodation, insurance, visa fees, and a €300 monthly stipend.

JetBrains Blackbox Cup 2026 Join our new unique coding competition, happening on March 15, 2026.

  • Imagine joining a project with no documentation and no backlog. Your mission: explore the system, uncover hidden logic, and start solving tasks — step by step, through experimentation and smart guesses.
  • AI tools are welcome! AI assistants and modern developer tools are fully allowed — resourcefulness is part of the challenge.
  • Two leagues: Junior — high school students & Senior — university students, graduates, and professionals.

Registration closes on March 13.

Winning the Blackbox Cup can also boost the chances of getting a fully-funded JetBrains Foundation scholarship for BSc CSAI at Neapolis University Pafos(extra points on the entrance test).

See you!

UPD: Editorial is out

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

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

Я бы хотел решить C и достичь рейтинга 1500 или выше. Я бы хотел, чтобы была хотя бы одна задача сложности 1400 — 1600 для изучения.

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

SIX SEVEN

»
3 месяца назад, скрыть # |
 
Проголосовать: нравится -31 Проголосовать: не нравится
print("Hello World")
»
3 месяца назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

WoW !

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

SIXTY SEVENNNN

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

Why are there people with more than 2100 rating that have registered as an official participants?

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

i love edu rounds but the fact is it always decreases my ratings !!!!

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

i love edu rounds but the fact is it always decreases my ratings!!!

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

No testers???

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

Thanks for the round! Interesting to see the Blackbox Cup format—good luck to everyone participating!

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

When can I become purple

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

Guys, what are the differences between educational round and normal round?

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

I wish I can solve C and become 1500 rating or above. I wish there is at least one problem in difficulty 1400 — 1600 for me to study.

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

cp just ruined my life, i hate cp im never coming back here

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

What is the point of these rounds?

  • They're not "educational" as the name implies (in fact, the average div-2 accomplishes the original goal of these rounds (to expose more users to general algorithmic techniques) to a far greater extent)
  • They're not fun. I think they can be summarized as "div-3s but less fun, less balanced, and way more tedious". Having no testers doesn't help either.
  • They waste slots. Why not have regular div-2s instead of these rounds? Considering how the proposal queue is always full, there's certainly no shortage of problems for regular rounds.
  • ICPC scoring sucks, I have no idea why it's present in this format.

Even contests like Good Bye 2023 are infinitely superior to whatever today's round was.

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

why is it so hard man:(

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

Nice round! Though I feel like C > D

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

Hey guys, During this contest and in the last 10 minutes, I headed towards B, I thought this would be a simple greedy algorithm, but I never really had learned any algorithm, I now have wrote this code

#include <bits/stdc++.h>
using namespace std;

int main() {
  int m= 0;
  int t;
  cin >> t;
  while (t--) {
    string x;
    cin >> x;
    int l= x.length();
    if (l == 1) {
      m++;
    }
  }
  return 0;
}

Its not even complete, If anyone knows what should I do next, please help me.

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

Solution of F: First put numbers from 1 to n on a binary tree, where the root is floor((1+n)/2), and the left and right child of each node represent the left and right range of the next step of binary search. For example n=12:

             6
          //   \\
       3          9
    /    \      /   \
   1     4    7      11
    \     \    \    /  \
     2     5    8  10  12

Then we can observe that for any two nodes u < v (proof omited):

(1) If u is ancestor of v, or the v is ancestor of u: beauty(u,v) = n-(v-u).

(2) Otherwise, beauty(u,v) = n- (2 + (size of subtree of right child of u) + (size of subtree of left child of v)).

We denote the formula above as n- (2 + RSZ(u) + LSZ(v)).

To calculate the answer, first we pretend that there's no situation (1). Then we iterate v from 1 to n, use a map to maintain for each possible size k, there are how many u < v such that RSZ(u) = k. By the structure of the binary tree, there are at most O(log(n)) different possible sizes of subtrees, so the complexity is O(n*log(n)).

Second, we need to deal with situation (1). Note that the height of the binary tree is at most O(log(n)), there are at most O(n*log(n)) pairs of nodes with ancestor relation, so we can brute force for every single pair.

Therefore, we solved the problem in O(n*log(n)).

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

    Code example: 364371615

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

    You can deal with both situations in one dfs: 364374549

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

    Actually, it's possible(and not hard) to reach $$$O(n \log^t \log n)$$$(t is a number from 0,1,2, depends on how you write the code) for this problem.

    For situation (1), we can enumerate the node with the smaller depth between u and v, and it becomes two range adds. There's $$$n$$$ nodes, $$$O(1)$$$ each, $$$O(n)$$$ total.

    For situation (2), we can enumerate the LCA of u and v, and we only need to merge the nodes in the left subtree and the ones in the right. Since when a node has a depth $$$k$$$, there's $$$O(\log(n)-k)$$$ different values of $$$\rm{RSZ(a\ node\ in\ its\ left\ subtree)}$$$ and $$$\rm{LSZ(another\ node\ in\ its\ right\ subtree)}$$$, calculating this node costs $$$O((\log(n)-k)^2)$$$ (if you use map, there could be one or two $$$\log \log n$$$s), the total cost is $$$O(\sum\limits_{i=0}^{\log n} (\log(n)-i)^2 \times 2^i)$$$, which turns out to be $$$O(n)$$$.

    Though, this optimization would give the code a great constant factor, it doesn't seem to be better than your $$$O(n \log n)$$$ one.

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

Man I almost got D but TLE is kicking my butt.

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

Though i couldn't solve problem C, i enjoyed thinking about. Any ideas on how to solve it?

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

    hint just think in terms of bit you know that the answer will be sum of each numbers bit for example say 13 3 so you know that whatever a b c d e will be itll be just sum of bits of 3 so find greedily n using binary search or you can do this with in nlogs time

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

Man I have so much work to do, and I left all that in the hopes of giving this contest and solving some nice problems.

Wasted 2 hours of my time, and now I still have work to do. GGs.

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

In C, we were supposed to take ceil of s/m, given that the least bit of m must be less than or equal least bit of s, then answer exists. What am I missing?

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

D is too IO-bottlenecked, it's not humane

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

Is there an easier way to solve E than:

  1. Maintaining BITs for prefix / suffix cnt / sum
  2. Calculating $$$prefixScore_i = prefixCnt_i \cdot sortedA_i - prefixSum_i$$$ (and $$$suffixScore_i$$$ simularly) using the corresponding BITs.
  3. Using BIT + binary lifting to quickly find the i-th currently used position in sorted order ($$$sorted_i$$$).
  4. Binary searching on the inflection point of $$$prefixScore_{sorted_i} \gt suffixScore_{sorted_{i + 1}}$$$ and checking adjacent positions for optimality.

It took me like an hour to implement this T_T (though my implementation skills have never been good)

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

    Id also like to know if there is any cleaner approach. Only difference between my solution and your idea is that i used segtree for the (cnt,sum) part, then the binlifting becomes a simple find_kth in the segtree cnt field 364371413

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

    Imagine the binary search you do in step 4 as you have a big seesaw with points that weigh down on it based on how far away it is from the center, and you are trying to find the center which balances the seesaw. You can do some math to show that the center should be the average of the currently active values so it suffices to try $$$O(1)$$$ choices for Alice near the average.

    Based off this, all you need to do is maintain a set of active values, use lower_bound to find an element near the average, decrement/increment the iterator to get surrounding active values, and use your BITs to compute the best score Alice can achieve.

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

in D a<= 1000000

b <= 1000000

why the timelimit this is my code ~~~~~ // this is code vector getDivisors(ll n) { vector divisors; for (ll i = 1; i * i <= n; i++) { if (n % i == 0) { divisors.push_back(i);

if (i != n / i)
            divisors.push_back(n / i);
    }
}

return divisors;

}

void sol() { ll n , m ; cin >> n >> m; vector b(n+m+1) ; vector a(n+m+1) ; for (ll i = 0 ; i < n ; i++) { ll x ; cin >> x ; a[x]++ ; } for (ll i = 0 ; i < m ; i++) { ll x ; cin >> x ; b[x]++ ; } ll al = 0 , bo = 0 , cnt = 0 ; bool ch1 = true , ch2 = false ; for (ll i = 1 ; i <= n+m ; i++) { if (b[i] == 0)continue; vector div = getDivisors(i) ; ll cnt2 = 0 ; for (auto it : div) { if (a[it]){ch2 = true ; cnt2+=a[it] ;} } if (n — cnt2 > 0)ch1 = false ; if (ch2 and !ch1)cnt+=b[i] ; else if (ch2 and ch1)al+=b[i] ; else if (!ch1 and !ch2)bo+=b[i] ; ch1 = true ; ch2 = false ; } for (ll i = 0 ; i < m ; i++) { if (i % 2) { if (cnt){cnt-- ; continue;} if (bo == 0){cout << "Alice" << endl ; return ;} bo-- ; } else { if (cnt){cnt-- ; continue;} if (al == 0){cout << "Bob" << endl ; return ;} al-- ; } } if (m % 2){cout << "Alice" << endl ; return ;} cout << "Bob" << endl ; } ~~~~~

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

My solution for E got TLE in Python, but after translating it to C++ post-contest, it got AC. Sad for Python users, it’s time to learn C++ I guess.

Otherwise, fun contest!

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

For C i though check all the bits in S(from MSB to LSB) where there is a one and find all distances after the postion of the one in S to the ones in M bits, if some of those distances have been found before do nothing and if not add the min distance, after that sum up all the unique distances as power of 2. I could not prove why it is incorrect yet it gave me a wrong answer on the last test case in the problem. Can someone help me?

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

Could any please explain solution to C?

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

Why? My O(n log n) solution for Problem D got TLE on the 12th test case.364371872

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

i even used Pollard-Rho to count the number of factors of b[i] in D (

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

i totally got cooked by C, reaching cm is so tough

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

Test Cases of D have IO Bottleneck.

My Contest Submission: TLE

Same Solution when attempted with this, worked:

std::ios_base::sync_with_stdio(false);
std::cin.tie(NULL);

Same Solution with Above Code: Accepted

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

Looks like D has very tight constraints. Can someone explain why my solution https://mirror.codeforces.com/contest/2203/submission/364365602

here gives TLE, whereas I can see similar solutions have got accepted

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

    Maybe because of extra overhead, you are unnecessarily storing values in freq vector. Store them in simple vectors

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

      I realized that in all my submissions, I hadn't enabled fast IO, that's why it was failing. Solved this problem pretty fast in contest but it didn't pass. Now realized it was the problem :(

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

    It gives TLE because the nested loop that checks all multiples for every possible value up to n + m is too slow, especially when there are many test cases. Even when most values do not appear in the input, the code still iterates over them, leading to roughly (n + m) log (n + m) operations per test case. On top of that, large vectors are recreated for every test case, which adds extra overhead. Together, these factors make the program exceed the time limit.

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

      I realized that in all my submissions, I hadn't enabled fast IO, that's why it was failing. Solved this problem pretty fast in contest but it didn't pass. Now realized it was the problem :(

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

B was nice

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

Can someone either prove or disprove my solution for C? If it's incorrect you're welcome to hack it :)

Solution

EDIT: This has been answered here.

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

For D,

https://mirror.codeforces.com/contest/2203/submission/364378879 -this gives tle https://mirror.codeforces.com/contest/2203/submission/364379153 -this doesn't. why?

the only difference in both sol. is a extra set for all elements of b that isn't even used. weird

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

Most solve it as binary search solution, but actually there is an easier binary observation and this is the simplest approach.

Problem: 2203C - Test Generator Submission: 364327744

Since ai & m = ai, every ai can only use bits that are already set in m. So each ai is formed only from allowed bits of m.

First, look at the lowest set bit in m, which is (m & -m). This is the smallest value any ai can contribute. So if s is not divisible by this value, then it is impossible and the answer is -1. Also if m = 0, it is impossible.

To minimize n, think in binary. Iterate over bits from 0 to 60 and keep:

  • sum1: total value of bits of s up to this bit.
  • sum2: total value of bits of m up to this bit.

At any prefix, to build sum1 using numbers formed from m, we need at least ceil(sum1 / sum2) numbers.

Take the maximum of this value over all prefixes. That maximum is the minimum possible n.

So the whole idea is just binary counting, no need for binary search.

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

    How do you prove that $$$\max \lceil \frac{\text{sum1}}{\text{sum2}} \rceil$$$ is not only necessary, but also sufficient?

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

      Pareto frontier

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

        The issue I have isn't that. It's not obvious how we can construct the final array since $$$\text{sum1} \mod \text{sum2}$$$ may not be a subset of bits of $$$\text{sum2}$$$. How can you guarantee that a valid construction actually exists?

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

          The trick is that you don't just "fit" the total sum into $$$m$$$ once. You have $$$n$$$ different slots (elements in the array).Even if a bit in $$$s$$$ isn't in $$$m$$$, you can "break it down" into smaller bits that are in $$$m$$$. For example, if $$$s=8$$$ and $$$m=7$$$ (bits 4, 2, 1), you can't use an 8. But if $$$n=2$$$, you can break that 8 into two 4s (which $$$m$$$ does allow) and put one in $$$a_1$$$ and one in $$$a_2$$$.

          Sufficiency: The condition $$$n \ge S_k / M_k$$$ literally means: "At this bit level $$$k$$$, do I have enough parallel slots ($$$n$$$) to carry all the value from $$$s$$$ that hasn't been placed yet?"

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

      It’s like water flowing down a series of pipes. The condition $$$\lceil S_k / M_k \rceil \le n$$$ ensures that at any level $$$k$$$, the total amount of "water" (the sum $$$s$$$) isn't more than the total "pipe capacity" ($$$n$$$ copies of $$$m$$$) available from that level downwards.

      Because binary is powers of 2, if the "total volume" fits, you can always redistribute the water into the individual pipes as you go down.

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

I have a solution for problem D but I'm pretty sure its not intended to pass.

I factorise the numbers and do some goofy caching to squeeze it under the time limit. I find the primes beforehand and then factorise and generate the factors for each number to tell if Alice can use the number or not.

An explanation of the intended solution would be interesting; or I'm not sure if my solution is intended to pass. I wasn't sure of the exact time complexity because of prime factorising and then constructing the factors for each number is difficult to bound.

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

E is really cool

Mostly probabilities are kind of disgusting but this one is really nice

But in comp I wrote i instead of n and forgot 1 modulo operation so no score for me :(

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

What's the reason to set $$$N = 5'000'000$$$ for pF? The TL/ML seems very tight under such constraint :/

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

    Mostly to cut off FFT-based solutions because I think solving this problem with FFT is too boring. Unfortunately, it makes other $$$O(n \log n)$$$ solutions a bit difficult to squeeze, but the model solution is $$$O(n \log \log n + \log^3 n)$$$ and works in less than one third of the TL.

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

Can someone help explain C? I spent over half an hour on that but still can't figure out :<

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

I sincerely hate the problem C. It made me green.

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

i am getting trouble while hacking the problems , the hacking page isn't loading at all :(

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

i am getting trouble while hacking the problems , the hacking page isn't loading at all :(

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

How can I solve the Problem C?

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

Problem F is so HARD, +1 please

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

Where is the Editorial??

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

I AbdGraph sincerely hate the problem C. It made me green.

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

U guys should check code of at least top 100 or above, at top 80-100 they submit all problems at the end of contest to dodge the checking so check all participants who accepted problem F. I've checked somebody at the bottom of 6 problems and many guys used AI, thats not good.

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

Can anyone please hack my submission for problem D : 364389424

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

When will rating change reflect on account

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

сшка говно

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

I previously got AC on problem C but then WA test 13? Are they using pretest?

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

Has the rating been updated ?

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

Can we do E better than n(logn)^2?

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

where do i find the solution for this contest

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

Apparently my yesterdays D solution would have passes with magic words : ios_base::sync_with_stdio(false), cin.tie(nullptr); Really... Before : https://mirror.codeforces.com/contest/2203/submission/364376838 After : https://mirror.codeforces.com/contest/2203/submission/364456720

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

dang, should have participated, cuz i solved ABD fast (3 problems)

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

When would the rating update, it's been quite a while after the system test ended.

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

when will our ratings be updated?

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

Can someone explain me how to do D please?

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

    In number theory if we traverse for each 1 to n for each of their multiples in o(nlogn) this is the major hint of this problem

    like for i from 1 to n -> for j from i to n/i ...

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

    you can do the following:

    • try to find a way to compute a triple (x, y, z) where:
      • x is the number of numbers in b that can be removed only by alice
      • y is the number of numbers in b that can be removed only by bob
      • z is the number of numbers in b that can be removed by anlice and bob

    how to find this triple? how to use this triple to solve the problem?

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

Any idea why no update to rating till now?

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

very nice round that i realy enjoy — nice and classics task — and one question why there is still not rating changes (i want my rating)

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

Hello, I would like to clarify that my submission for problem 2203D is my own original implementation of the standard editorial idea for this problem.

The solution uses a common and natural approach: counting frequencies, computing how many values from array a divide each value, and then classifying the elements of b into the same logical groups. Because this is the standard solution pattern for the problem, similar implementations from different users can naturally look alike in structure.

I did not copy my code from any leaked or public source during the contest. Any similarity is due to the standard nature of the solution, not to code copying.

I kindly ask you to review my submission again with this in mind.

Thank you.

364349636