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

Автор fangahawk, 2 года назад, По-английски

Hello Codeforces!

We're glad to invite everyone to participate in Codeforces Round 940 (Div. 2) and CodeCraft-23, which will start on Apr/21/2024 17:35 (Moscow time). The contest will be rated for all the Div. 2 participants (Rating < 2100).

The Programming Club at IIIT-H organizes this event as a part of our techno-cultural fest Felicity @ IIIT Hyderabad.

Programming Club at IIIT-H

You will have 6 problems to solve in the duration of 2 hours 2 hours and 15 minutes. One of the problems is divided into 2 subtasks. Do ensure you read all of the problems!

There have been a bunch of people that have helped us in making this contest a (hopefully) great one!

Score Distribution: $$$500 - 1000 - 1500 - 1750 - 2250 - (2250 + 1250)$$$

Hope you enjoy the problems!

UPD: The editorial can be found here.

UPD: The Winners

Official

  1. Alphaqwq_
  2. misfits
  3. Monkey1ng
  4. Nanani_fan
  5. lmq3z

Unofficial

  1. BurnedChicken
  2. maspy
  3. kotatsugame
  4. zdc123456
  5. zjy2008
  • Проголосовать: нравится
  • +373
  • Проголосовать: не нравится

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

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

I hope I will not reach specialist in this round

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

As a participant,hoping for clear and short statements

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

Damn, never hoped that after Indian ICPC, IIITH Programming club would go international! Really looking forward to attend it!

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

bet

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

Will the score distribution of the problems be published? Or will the contest be held on ICPC rules?

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

As a tester I really liked the problemset and encourage everyone to participate in the round!

akcube fangahawk orz

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

I will upvote if I become CM

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

akcube round, orzzz!!!

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

what algorithms book and resources gennady korotkevich (tourist) read?

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

Will the score distribution of the problems be published? Or will the contest be held on ICPC rules?

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

Best of luck so that you can get good response for your questions, from IIIT Hyderabad.

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

Minecraft !!

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

IIITH Programming Club orz

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

As a participant, I would like to get upvotes as minus looks ugly in my profile!

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

1K stalkers and I will write this one.

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

As a monkey tester, I was offered $$$6+9+6 \times 9$$$ bananas to write this comment.

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

I too wanted to join IIIT bcoz of the coding culture there, my clg sucks

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

Hoping to reach pupi.

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

Why codecraft-23 in 2024, isn't it codecraft-24?

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

Best wishes for everyone's A, B, C, D

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

When will the score distribution be announced?

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

    what meant by score distribution

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

      Usually contest happen in either icpc style, i.e. every question has equal weightage, i.e. whoever does any question first gets higher rank. Whereas normal contests on codeforces (non educational rounds) have ratings attached to them so that they are indicable that it is 50% chance that it can be done by someone having rating about equal to what's shown, and the if you do a higher rated question its more rank than doing first few questions.

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

        Score distribution $$$\neq$$$ problem rating, those are two separate things.

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

          But scores are proportional to the earned points ig

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

            Usually, yes, but his explanation was still wrong, he mixed up the two systems. The score distribution does not tell you how much a problem is rated, only its value in the contest.

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

            To clarify, scoring distribution is different from the ratings attached to the problems post-contest. Ratings are given to problems after the contest is over based on number of solves, etc. and are indicative of the rating required to solve the problem in contest. Scoring distribution is just the points you as a contestant would gain if you solved it at the 0th minute. It's more or less only meant to be indicative of what the setters + testers approximate the relative difficulty of the problems to be.

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

ee sala cup namde

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

Good luck everyone

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

I taught this was a programming contest,looks like a math test to me

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

so much math i loved it, knew solutions within minutes of every question, but while implementation so many mistakes :(

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

can someone pls enlighten me on how to solve D

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

    it is clear from the question that we need for each y

    ax ^ ax+1 ^ ax+2 ... ^ ... ^ az-1 ^ az > ax ^ ax+1 ^ ax+2 ... ay ^ ... ^ az-1 ^ az.

    note in lhs, ay is missing so basically what we need is all those ranges(x, y) in which sum of MSB of ay is even.

    we need x, y, z. traverse through y, now for each y calculate no. good x and z pairs.

    suffix and prefix dps can be maintained for each bit for odd and even counts.

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

      Is MSB = max set bit? That makes sense but I'm kinda confused about how you would implement the prefix and suffix dp. If you don't mind, can you please give me the gist? Appreciate it.

      Edit: oh wait nvm I see how to do it. Thanks broski

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

        okay, both will have 3 states -> suffix/prefix, bit, odd/even. i will tell for prefix, suffix is similar. pref[n+1][30][2] (n+1, for simple implementation, 30 bits and 2 odd and evens)

        dp state pref[i][j][0] represents count of bit j till ith elements such that parity/zor of that bit is 0(even)

        basically

        a1, a2, a3, a4, a5, a6, a7 a8 ....

        if we are at a8, and we are taking a look at 4th bit (i.e., bit at this position -> (1<<4)) then if we take all suffixes ending at a8 and xor each suffix, the state represents no. of such suffixes that have THE 4th bit off.

        think for transitions it's not that difficult/look at my code., if you don't understand then ill write it. (if anything is unclear don't hesitate to ask or even dm me.)

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

      why msb ?

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

        because in a range for a particular bit there can either odd or even no of that bits. now, we are taking a range (x, z) and we have to remove any element from that range new range -> (x, y-1) ^ (y+1, z), if in new range there are odd bits, then old range will have even bits of MSB.

        basically i am structuring my solution such that it is dependent upon MSB.

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

I was way too close to solving problem C! Great problemset :D

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

C was way too hard for me... After an hour of intense math i found a formula, which gives much bigger answer for the second sample, but i just can't find any single thing wrong with it... If we won't place any rook on main diagonal there are $$$30$$$ possible positions for the first rook, after that there will be $$$12$$$ possible positions for the second rook and $$$2$$$ positions for the last one. In total it is $$$30 * 12 * 2 = 720$$$, which is already bigger, than $$$331$$$... What's wrong?

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

    I was able to find a recurrence for C but was not able to submit in time because of runtime errors.

    F(n) = F(n-1) + (2*n-2)*F(n-2)

    where n is the total number of row and column numbers which were not used. Not sure if it is correct.

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

      I also came up with same relation but I got WA 257630731

      I forgot to add dp[0]=1; Oh god.

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

      Can you provide the intuition for this?

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

        Let us assume some n pairs (r,c) where the rooks have already been kept. Now we cannot keep the rook in any of those (r,c) or (c,r). So, that leaves us (n — r -c) rows and (n — r -c) columns.

        Now, let us list down these x = (n-r-c) viable rows and columns as a1, a2, a3 .. ax.

        So, we can keep the rook at a1,a1 and a1 will be removed from the above list and we will have x-1 elements in the list. (so, f(x-1) part)

        If we take any other ai, we will have x-2 elements left, and we can arrange a1 and ai in 2 ways multiplied by numbers of ways to arrange those x-2 elements. And there are x-1 ways to chose some ai. Hence 2*(x-1)*f(x-2).

        So, the recurrence becomes : f(x) = f(x-1) + 2*(x-1)*f(x-2).

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

        I'm not great at explaining, so forgive me if this isn't clear.

        Initially, I noticed that placing a rook at coordinates (ri, ci), where ri ≠ ci, eliminates 2 rows and 2 columns, reducing the chessboard from n*n to (n-2)*(n-2). Similarly, if ri = ci, it removes 1 row and 1 column, making it (n-1)*(n-1). Let's say after K moves, we've removed some rows and columns, leaving a chessboard of size m (m ≤ n). Now, this smaller board becomes a blank canvas for determining how many boards we can build by arranging the rooks. The challenge lies in determining the number of possible boards we can build. Initially, I considered a brute force approach where I place a rook on a cell, compute the resulting reduced matrix after the computer's move, and repeat.

        $$$\displaystyle f(n)= \sum_{i=1}^n \sum_{j=1}^n

        \begin{cases} f(n-1),& \text{if } i=j\\ f(n-2), & \text{otherwise} \end{cases}

        \text{ where cell } i,j

        \text{ has a white rook}$$$
        $$$ f(1)=1,f(2)=3; base cases $$$

        However, this solution is inefficient with a time complexity of O(N^2) and suffers from overlapping solutions.

        For instance, consider a 3*3 matrix where a white rook is fixed at (1,1) you will get 3 possible boards.

        W _ _	W _ _    W _ _
        _ W _	_ _ W    _ _ W
        _ _ W	_ B _    _ W _
        

        Also when you fix rook at (2,2) you will get 3 boards.

        W _ _	_ _ W    _ _ B
        _ W _	_ W _    _ W _
        _ _ W	B _ _    W _ _
        

        As you can see we have one overlapping solution.

        By examples I observed that we can calculate all possible boards by fixing the rooks in just one row. So we take a row and see all the variations of that row and calculate the number of boards for each variation and this would give us the unq count.

        W _ _	_ W _    _ _ W
        _ _ _	_ _ _    _ _ _
        _ _ _	_ _ _    _ _ _
        
        _ B _    _ _ B
        _ _ _    _ _ _
        _ _ _    _ _ _
        

        Below is the formula of our revised approach ( the base condition remains same)

        $$$\displaystyle f(n)= \sum_{j=1}^n

        \begin{cases} f(n-1),& \text{if } j=1\\ f(n-2), & \text{otherwise} \end{cases}

        \text{ cell } 1,j

        \text{ has a white rook} + \sum_{j=2}^n f(n-2)

        \text{ cell } 1,j

        \text{ has a black rook} $$$

        If you simplify this you will get

        $$$ f(n)= 2*(n-1)f(n-2)+f(n-1)$$$
    • »
      »
      »
      2 года назад, скрыть # ^ |
      ← Rev. 2  
      Проголосовать: нравится 0 Проголосовать: не нравится

      .

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

    I think the problem is that operation order doesn't matter, so it should be divided by $$$(n/2)!$$$

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

    The 720 possibilities are overcounted. Eg. These two configs are same;

    - W(1,3), B(3,1), W(2,4), B(4,2)
    - W(2,4), B(4,2), W(1,3), B(3,1)
    

    The final rook positions are same in above 2 cases.

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

    I just solved it once the contest was over:(((((((((((( Unfortunately I couldn't submit my solution which I am sure that it is correct :((

    #include <bits/stdc++.h>
    using namespace std;
    
    #define ull unsigned long long
    #define ll long long
    #define ld long double
    #define int ll
    
    #define endl '\n'
    #define EPS .0000001
    #define MOD 1000000007
    
    void calculate();
    
    int dp[300010];
    signed main() {
        dp[0] = 1;
        dp[1] = 1;
        for(int i = 2; i <= 300000; i++) {
            dp[i] = dp[i-2]*(i-1)*2+dp[i-1];
            dp[i] %= MOD;
        }
        int t = 1;
        cin >> t;
        for(int i = 1; i <= t; i++) {
            calculate();
        }
    }
    
    void calculate() {
        int n, k;
        cin >> n >> k;
        int x, y;
        set<int> st;
        while(k--) {
            cin >> x >> y;
            st.insert(x);
            st.insert(y);
        }
        n -= st.size();
        cout << dp[n] << endl;
    }
    
  • »
    »
    2 года назад, скрыть # ^ |
     
    Проголосовать: нравится 0 Проголосовать: не нравится

    My way of thinking was similar. There are $$$10$$$ ways for the second rook, because $$$30-(4*8-4*3)=10$$$. And because by filling up the remaining diagonals, all these could be considered as final positions. So after placeing 2 rooks, there are $$$30*10=300$$$ possible positions, which again could be considered as final ones. And then $$$1+30+300$$$ gives $$$331$$$ (the $$$1$$$ is needed because the initial position can also be considered as a final one). But what I don't get is that we overcount the positions after 2 rooks, so it should be $$$150+30+1=181$$$. Can anyone please explain it to me?

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

    Btw, my A got WA on system testing, wow... $$$a_i \le 100$$$ got me there... Definitely, not a good day for me...

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

    this solution would have been correct if two rooks position swapped yields a different setting. but according to problem, they are same. and if you notice carefully, its 6! = 720 and there is a reason for that.

    you can look at my solution i did not do recurrence i used combinatorics only.

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

Does anyone have any advice for improving on problems like C in today's contest?

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

OMG, I SUBMITTED D 8 SECONDS BEFORE THE END

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

I think D is more intuitive than C.

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

Problem B in a Nutshell, huge skill issue

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

    basically you can just check whats the biggest number for Math.pow(2,x)-1 <= k because Math.pow(2,x)-1 is only 1's, the rest of the number doesnt really matter and you can sum it up with the difference and the rest 0's

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

How to solve D?

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

can someone please explain b? I am getting wa.

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

    Let $$$b$$$ be highest bit in k. Then you can get $$$b-1$$$ bitcount by just printing $$$s = 2^{b} - 1$$$. Then print out $$$k - s$$$ and fill the rest with zeros.
    Why does this work?
    Either $$$k - s$$$ will be greater equal than $$$2^b$$$, then you've got all bits in answer and you can't make it bigger (note that it means k has no 0s in its binary representation,
    or $$$k - s$$$ will be smaller, but that means that you "spent" 1 from b-th position to cover up all 0s in lowest bits.

»
2 года назад, скрыть # |
 
Проголосовать: нравится +88 Проголосовать: не нравится
Solved D but at what cost.. nice D tho 🙂
»
2 года назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

how to solve F?

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

Anyone explain why this fails? 257627963

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

Any hints for problem F? I thought of doing merge sort segment tree with heavy-light decomposition, then binary search to find the lowest value that the count is not equal, but I realized there some edge cases.

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

My B problem got Judgement failed veredict, what that means?

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

Mathforces

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

problem C last minute submission got very much raised after 2:05 due to this solution being leaked online in a telegram group please MikeMirzayanov look into this behaviour of participants : screenshot of the solution , i will later reveal those solutions which are being cheated from here!(https://ibb.co/TTQGHV3) Vladosiya othmaine also look into this once please

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

Could anyone please tell me why the answer for n=6 in E is 24? I am getting 23 by hand and code, I was able to simplify the formula for C(i,j) mod j as follows:

1) if j is prime then ((i/j) mod j)*(j-1)

2) if j is not prime then we only need to do this for j=4 because (j-1)! mod j is 0 for all other composite numbers

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

I guess D can be solved using dp

Screenshot-2024-04-21-223826

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

Could anyone please explain how to do problem C? I always seem to struggle in these types of problems related to combinatorics :(

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

mathForces

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

Can't believe I'm this bad. Can't even solve 3 problems

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

Problem C was quite to my liking and I was able to sprint to rank 50 after solving C, although temporarily(^_^)

But D was too difficult and I fell to rank 900+ for not solving any problem after C._(:3]<)_So how to solve it? I was confused by my prefix and suffix array, so tried brute force, but it got WA rather than TLE.

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

    For any number, $$$a_i$$$ you can find that it satisfies the condition only when the xor of subarray in which $$$a_i$$$ is present has the MSB of $$$a_i$$$ set to zero, now you just need to find these subarrays for each element which can be done using dp for each bit j.

    To find the first observation, try to think of an answer for $$$n^2 logn$$$ where you iterate on each subarray and find the number of possible y's in that subarray. What will be the condition for y?

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

Can someone explain to me what this test result means? Also it's not even shown like -1 in results, just empty square, as if I havn't submitted this problem

https://codeforces.me/contest/1957/submission/257589755

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

combinatorics is the most no skill thing you can ask a programer to do

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

How to solve E, F?

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

It says judgement failed for problem B https://codeforces.me/contest/1957/submission/257590765

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

E problem was just observations i think.. i didnt prove anything concrete, just saw first few values and came to conclusion that n = 4 and n = prime are kind of special cases to handle.

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

I am getting judgement failed verdict on this submission.

https://codeforces.me/contest/1957/submission/257590736

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

my solution for B is still not judged https://codeforces.me/contest/1957/submission/257594447 even when system testing is finished :/

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

 3 pages of judgement failed, strange.

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

https://codeforces.me/contest/1957/submission/257627565 https://codeforces.me/contest/1957/submission/257651698 submitted the exact code again and it passed now but gave runtime error during system testing. What's going on? Codeforces high or wat?

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

I would like to report a suspicious contestant: F9O1OvO

I think he cheated because his template has changed massively:

  • His main function looks completely different
  • He switched from typedef to define
  • He suddenly uses "namespace wshb"

His submission for problem A in today's contest: 257575498

His submission for problem A in his previous contest: 255636465

His performance is also very unusual — I find it very weird that a specialist who has participated in more than 50 contests suddenly gets 5th in a div.2 round.

I believe he might have given his user to another person.

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

can anyone tell me whats wrong in my code. I thought if sum of array is k and number of 1 bit is maximum it work. but it is not why? sub :https://codeforces.me/contest/1957/submission/257631018

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

Nice round, but why problem E doesn't have a bolded notification that sum of n over subtests is unbounded? It messed me a bit up.

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

✋✋✋**help wanted** ✋✋✋✋✋✋ i know i am dumb but can anyone tell me where the hell am i wrong here! it works like magic bitcount are correct+ sum of the nums are correct then what?

t = int(input())

for _ in range(t): n, k = map(int, input().split()) q = k ans = [0]*n l =0 while k>=2 and n>0: for i in range(0,k+1): if pow(2, i) >k: ans[l]= 2**(i-1)-1 l+=1 n-=1 k=k-(2**(i-1)-1) break

if sum(ans)<q:
    ans[-1]+=q-sum(ans)
print(*ans)
»
2 года назад, скрыть # |
← Rev. 3  
Проголосовать: нравится +2 Проголосовать: не нравится

what an impeccable contest and i hope that there will be more contests like that

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

Mathforces (More like combiforces tbh).

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

This is one of the best rounds I have had in recent times, with clever ideas in every question! Hope to see more rounds like this~

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

What is the time complexity of question E?

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

In the next codecraft we'll have "How does the Knight move??"

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

i wish you all reach what u want :)