natalina's blog

By natalina, history, 7 weeks ago, translation, In English

Hello, Codeforces!

On Mar/11/2024 17:35 (Moscow time) Codeforces Round 933 (Div. 3) will start.

You will be offered 7 problems, dedicated to the adventures of a restless mathematician, a programmer and just a funny character named Rudolf and his brother Bernard, and 2 hours 15 minutes to solve them. Problems have expected difficulties to compose an interesting competition for participants with ratings up to 1600. However, all of you who wish to take part and have a rating of 1600 or higher, can register for the round unofficially.

The round will be hosted by rules of educational rounds (extended ICPC). Thus, solutions will be judged on preliminary tests during the round, and after the round, it will be a 12-hour phase of open hacks.

Note that the penalty for the wrong submission in this round is 10 minutes.

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

  • take part in at least five rated rounds (and solve at least one problem in each of them)

  • do not have a point of 1900 or higher in the rating.

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

Problems have been created and written by: vladmart, Sasha0738, t0rtik, Alexey_Parsh, Mordvin13, daha.002, Vladosiya and natalina.

We would like to thank:

  1. Vladosiya and Gornak40 for coordinating the round.

  2. MikeMirzayanov for Polygon and Codeforces platforms and helping prepare the problems.

  3. step_by_step, ashmelev for red testing.

  4. KseniaShk, senjougaharin for yellow testing.

  5. robotolev, Sochu for purple testing.

  6. dan_dolmatov, SashaT9, FBI, SpicyOctopus for blue testing.

  7. Gargera0, Matrosk1n, Alex_TULGU, Alenochka, gas for cyan testing.

  8. bugrova, Toy_mouse, ringku_ for green testing.

Good luck!

UPD: Because of the technical issue (see the post https://codeforces.com/blog/entry/126654), temporarily the only available C++ compilers are: C++14 (GCC 6-32) and C++17 (GCC 7-32).

UPD2: Editorial is posted.

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

»
7 weeks ago, # |
  Vote: I like it +1 Vote: I do not like it

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

  • »
    »
    7 weeks ago, # ^ |
      Vote: I like it -110 Vote: I do not like it

    there is a lot of muslims , so the contest time is not appropriate in Ramadan

    • »
      »
      »
      7 weeks ago, # ^ |
        Vote: I like it +24 Vote: I do not like it

      You need to properly set priorities

    • »
      »
      »
      7 weeks ago, # ^ |
      Rev. 2   Vote: I like it +39 Vote: I do not like it

      There are Muslims all over the world. You can't set a time that suits everyone

      • »
        »
        »
        »
        7 weeks ago, # ^ |
          Vote: I like it 0 Vote: I do not like it

        Or even should. With all respect to any religion, its Codeforces. Anyone is free to choose between personal plans and div3 contests, tho.

        • »
          »
          »
          »
          »
          7 weeks ago, # ^ |
            Vote: I like it 0 Vote: I do not like it

          I agree. You can even have iftar and contest at the same time, like I do.

    • »
      »
      »
      7 weeks ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      iam a muslim and i think this time of the day is good for me

    • »
      »
      »
      7 weeks ago, # ^ |
        Vote: I like it +3 Vote: I do not like it

      yes

  • »
    »
    7 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    I wish experts could participate as rated too. I think the problems are still hard for me and really worth my time.

    • »
      »
      »
      6 weeks ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      as i expert i agree as a newbie i dont

  • »
    »
    6 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    queen's round

»
7 weeks ago, # |
  Vote: I like it -69 Vote: I do not like it

Why not thank me for participating?

»
7 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Excited and hopefully the problem's statement will be short and precise just like the announcement! <3

»
7 weeks ago, # |
  Vote: I like it -10 Vote: I do not like it

Grey testing?

»
7 weeks ago, # |
  Vote: I like it +1 Vote: I do not like it

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

»
7 weeks ago, # |
  Vote: I like it -57 Vote: I do not like it

RAMADAN contest starts 15:35UTC+2. Please

»
7 weeks ago, # |
  Vote: I like it -25 Vote: I do not like it

Hmmm you didn't thank us lol

»
7 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

do not have a point of 1900 or higher in the rating. So div 2 or div 3 ?

  • »
    »
    7 weeks ago, # ^ |
      Vote: I like it +16 Vote: I do not like it

    It means your $$$\max \text{rating} < 1900$$$, not current rating.

»
7 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

date is wrong

»
7 weeks ago, # |
  Vote: I like it +1 Vote: I do not like it

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

»
7 weeks ago, # |
Rev. 4   Vote: I like it -47 Vote: I do not like it

Ramadan>contest

By the way thanks for the March 19's div3 its on the right time

»
7 weeks ago, # |
Rev. 4   Vote: I like it 0 Vote: I do not like it

why is there such a big gap (20 days) between 2 contests?? Will more contests be added in between?

UPD: Another contest added

Hopefully more contests gets added up in between.

»
7 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

What does trusted participant mean?

»
7 weeks ago, # |
  Vote: I like it +5 Vote: I do not like it

First contest during Ramadan!

I hope the tasks will be interesting

And Good Luck for every parcipicant!

»
7 weeks ago, # |
  Vote: I like it +2 Vote: I do not like it

Sorry Codeforces, I have to attend night-prayer at that time. so, No contest for me for the next 30 days.

»
7 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

I hope to become specialist after this round.

  • »
    »
    7 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    And I hope to become expert after this round. Good luck to you!

    • »
      »
      »
      7 weeks ago, # ^ |
        Vote: I like it +1 Vote: I do not like it

      And I hope to become expert after this round too. Good luck to all of us!

»
7 weeks ago, # |
  Vote: I like it +4 Vote: I do not like it

"adventures of a restless mathematician"

Mathforces Incoming. Brace yourselves

»
7 weeks ago, # |
  Vote: I like it +10 Vote: I do not like it

In the last few days, why Div3 contest has been hosted so frequently than before?

»
7 weeks ago, # |
  Vote: I like it +4 Vote: I do not like it

exciting to become an Expert!

GL everybody :)))

»
7 weeks ago, # |
  Vote: I like it +1 Vote: I do not like it

I hope to solve as many problems as possible :DD

»
7 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Hope reach pupil after this round

Good luck for everyone !!!!

»
7 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Why no thanks for gray writers/testers?

»
7 weeks ago, # |
  Vote: I like it -21 Vote: I do not like it

Negative delta, HERE WE GO

»
7 weeks ago, # |
  Vote: I like it -20 Vote: I do not like it

gl everyone :>

»
7 weeks ago, # |
  Vote: I like it -23 Vote: I do not like it

thanks for information;

»
7 weeks ago, # |
  Vote: I like it -20 Vote: I do not like it

Excited to give this contest on my birthday!!!

»
7 weeks ago, # |
  Vote: I like it -17 Vote: I do not like it

If I become pupil during Ramadan, I will convert to Muslim from Hindu

»
7 weeks ago, # |
  Vote: I like it -9 Vote: I do not like it

Hope to solve only A. B TO G will be so hard.

»
7 weeks ago, # |
  Vote: I like it -8 Vote: I do not like it

Good luck!

»
7 weeks ago, # |
  Vote: I like it -11 Vote: I do not like it

RAMADAN mubark :)

»
7 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Expert please

»
7 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Rudolf and Bernard? Game theory on problem E?

»
7 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

I wish this contest i could improve the score ! because i have lose four times till now

»
7 weeks ago, # |
  Vote: I like it -45 Vote: I do not like it

Problem E is one of the worst problems i have ever read

  • »
    »
    7 weeks ago, # ^ |
      Vote: I like it +31 Vote: I do not like it

    skill issue

  • »
    »
    7 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Problem E is one of the greatest problems i have ever read!

    • »
      »
      »
      7 weeks ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      But it literally is "Write simple greedy algorithm. Then run it 100 times. Then solve 800 rated problem on the results.". What is so great about it?

      • »
        »
        »
        »
        7 weeks ago, # ^ |
        Rev. 3   Vote: I like it +15 Vote: I do not like it

        To me, it is a beautiful combination of dp, deque and prefix sum / sliding window.

        If I say it like you:

        A literally is "Write some bruteforce."

        B literally is "Do some observation. Write some code to implement that."

        C literally is "Check some special substring."

        D literally is "Do some implementation with set."

        F literally is "Do some observation. Write simple binary search."

        G literally is "Too hard for me to solve in the contest."

        Life literally is "Be born. Eat. Sleep. Solve some codeforces contests. Go to the grave."

        Something may be literally is "something easy" to you, but "something meaningful" to others.

»
7 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

E has an unusual distance definition and it has not been presented in the russian version for more than half an hour

  • »
    »
    7 weeks ago, # ^ |
      Vote: I like it +8 Vote: I do not like it

    I was delayed by this unusual distance definition for ten minutes and decided to do problem B. :(

    • »
      »
      »
      7 weeks ago, # ^ |
        Vote: I like it +8 Vote: I do not like it

      whole time i was thinking it's i — j + 1 :(

    • »
      »
      »
      7 weeks ago, # ^ |
        Vote: I like it +11 Vote: I do not like it

      I took more than half an hour to figure out from the sample test cases that the distance is |i-j|-1 :(

  • »
    »
    7 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Was added asap after someone asked about it. (Thanks udon1206)

»
7 weeks ago, # |
  Vote: I like it +7 Vote: I do not like it

I spent more time in B than problems E and F due to my stupid mistake.

  • »
    »
    7 weeks ago, # ^ |
    Rev. 2   Vote: I like it 0 Vote: I do not like it

    same buddy, I really did stupid mistake on problem B that cost me 1 hr & 5 wrong submission with very high anxiety because of the fear of very big rating drop but thank god I solved it & at the last minute solved E as well that pushed my rank to under 1500 and my rating saved

    • »
      »
      »
      7 weeks ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      How to do B?

      • »
        »
        »
        »
        7 weeks ago, # ^ |
          Vote: I like it 0 Vote: I do not like it
        while (test-- > 0) {
                    int n = read();
                    int arr[] = intArray(n, false);
                    boolean res = true;
                    for(int i=1;i<n-1;i++){
                        int steps = arr[i-1];
                        if(arr[i] - steps*2 <0 || arr[i+1] - steps < 0){
                            res= false;
                            break;
                        }
                        arr[i] -= steps*2;
                        arr[i+1] -= steps;
                    }
         
                    if(res){
                        if (arr[n - 1] ==0 && arr[n-2] == 0) {
                            out.println(YES);
                        }else{
                            out.println(NO);
                        }
                    }
                    else{
                        out.println(NO);
                    }
         
                }
        

        see my logic

      • »
        »
        »
        »
        7 weeks ago, # ^ |
          Vote: I like it +1 Vote: I do not like it

        You can only subtract values from the 0th element by choosing index 1. Therefore you MUST choose index 1 a[i] times. After that you can treat the value at a position 1 as a new 0 positioned value. Therefore after running for loop every value must by 0, otherwise in is impossible.


        for(int i = 1; i < n-1; ++i){ a[i] -= a[i-1]*2; a[i+1] -= a[i-1]; a[i-1] = 0; }
»
7 weeks ago, # |
  Vote: I like it -23 Vote: I do not like it

bad B, C, D, E, F, G!!!!

  • »
    »
    7 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    B is harder than C I think. Maybe it's even harder than D

»
7 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Binary search doesn't work for F ?

  • »
    »
    7 weeks ago, # ^ |
      Vote: I like it +1 Vote: I do not like it

    It does.

    • »
      »
      »
      7 weeks ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      I got two questions —

      1. Why did you binary search on (L+R)/2 ?

      2. How did you know the optimal index will lie between [-10,10] of the index got from binary search ?

      • »
        »
        »
        »
        7 weeks ago, # ^ |
          Vote: I like it 0 Vote: I do not like it
        1. It's optimal to divide the biggest gap into 2 equal parts.
        2. It's just my trust issue. I didn't think lower_bound would give the optimal index that I checked 20 indexes around it. If I got WA, I would check 100 indexes around it xD.
  • »
    »
    7 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    One no, but two do work.

»
7 weeks ago, # |
  Vote: I like it +1 Vote: I do not like it

My private Screencast.. A,B,C,D,E Video Solutions here: https://www.youtube.com/watch?v=hSNp4xnn9lc

»
7 weeks ago, # |
Rev. 2   Vote: I like it +10 Vote: I do not like it

Screencast with commentary (set video quality to HD to be able to read my code)

»
7 weeks ago, # |
Rev. 2   Vote: I like it -10 Vote: I do not like it

Problem G is nice.

»
7 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

E seem very hard (at least for me) are there other simple solutions not involving dp with segment tree or sparse table?

»
7 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Can someone explain the 4th test case in problem D.

Like how is it 2 3 5 and not 1 2 3 5?

  • »
    »
    7 weeks ago, # ^ |
    Rev. 2   Vote: I like it 0 Vote: I do not like it

    Initially ball is with player 1.

    Next, it goes to player 5.

    Next, it may go to either 1 or 4.

    Finally it may be with 2 or 5 (from 1), or 3 or 5(from 4).

»
7 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

RIP all who got WA on test 2 in F :(

I don't know which case I was missing. Can anyone debug my submission : https://codeforces.com/contest/1941/submission/250809941

  • »
    »
    7 weeks ago, # ^ |
      Vote: I like it +3 Vote: I do not like it

    repeat the same steps for req+1 and req — 1 also

    • »
      »
      »
      7 weeks ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      Tried already in contest. Tried now again still getting WA

»
7 weeks ago, # |
  Vote: I like it +9 Vote: I do not like it

Got trolled by problem F (2 wrong submissions) because (a[i] + a[i+1]) / 2 overflows int :(

Let this be a lesson to use std::midpoint... (or in Java, a[i] + (a[i+1] - a[i]) / 2)

»
7 weeks ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

I could only get TLA on test 3 for F, which trick was needed to reduce complexity ? FFT ?

  • »
    »
    7 weeks ago, # ^ |
      Vote: I like it +25 Vote: I do not like it

    Imagine FFT problem in a Div3 contest...

    • »
      »
      »
      7 weeks ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      My solution was to take the two problems with largest imbalance, and iterate over d and f to find the best new problem, I don't know how to speed that up

»
7 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

For problem G I made a simple Dijkstra where the cost is determined by the size of a std::set which contains all the colors of the edges I've been through. Does anyone have an idea why it doesn't pass Test 3?

Spoiler
  • »
    »
    7 weeks ago, # ^ |
    Rev. 2   Vote: I like it 0 Vote: I do not like it

    You can visit node from different colors, was debugging it for half an hour. Cool problem, fixed solution

    • »
      »
      »
      7 weeks ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      Thanks!

      • »
        »
        »
        »
        6 weeks ago, # ^ |
          Vote: I like it 0 Vote: I do not like it

        well u can make a visited of map for {color,node} it wont give tle, jiganly did the same

»
7 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Excuse me guys, but who can help me find mistake in D?

My answer is different with correct answer in only one number, and I coulnd't find mistake.

Here is my code:

void solve() {
	int n, m, x;
	cin >> n >> m >> x;
	vector<int> ans;
	int r; char c;
	cin >> r >> c;
	if (c == '0') {
		ans.push_back((x + r)%n + 1);
	} else if (c == '1') {
		int frm = (x-r+n)%n;
		ans.push_back(frm + 1);
	} else if (c == '?') {
		ans.push_back((x + r)%n + 1);
		int frm = (x-r+n)%n;
		ans.push_back(frm + 1);
	}
	for (int i = 0; i < m-1; i ++) {
		cin >> r >> c;
		if (c == '0') {
			for (auto el : ans) {
				el = (el + r)%n + 1;
			}
		} else if (c == '1') {
			for (auto el : ans) {
				int frm = (el-r+n)%n + 1;
				el = frm;
			}
		} else if (c == '?') {
			vector<int> v;
			for (auto el : ans) {
				v.push_back((el + r)%n + 1);
				int frm = (el-r+n)%n + 1;
				v.push_back(frm);
			}
			ans = v;
		}
	}
	set<int> res;
	for (auto i : ans) {
		i --;
		if (i == 0) {
			res.insert(n);
		} else {
			res.insert(i);
		}
	}
	cout << len(res) << nl;
	for (auto i : res) {
		cout << i << " ";
	}
}

I will be very grateful to anyone who offers a helping hand

  • »
    »
    7 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it
    for (auto el : ans) {
    el = (el + r)%n + 1;
    }
    // replace it with for (auto &el : ans)
    

    you aren't changing el while traversing

    • »
      »
      »
      7 weeks ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      yeah, thank you.

      Now I understand that my code was completely wrong, and I really choked in that contest...

»
7 weeks ago, # |
  Vote: I like it +3 Vote: I do not like it

Can anyone give me some insights over the Solution of Problem — F Rudolf and Imbalance

  • »
    »
    7 weeks ago, # ^ |
    Rev. 4   Vote: I like it +1 Vote: I do not like it

    Easy explanation for F :

    Firstly, you can binary search over your answer (you can easily observe monotonicity)

    Let's check if $$$X$$$ can be our answer or not.

    $$$-$$$$$$>$$$ If there is no index such that $$$a_{i+1}$$$ $$$-$$$ $$$a_i$$$ $$$>$$$ $$$X$$$, then surely $$$X$$$ can be our answer.

    $$$-$$$$$$>$$$ If there are more than 1 indexes such that $$$a_{i+1}$$$ $$$-$$$ $$$a_i$$$ $$$>$$$ $$$X$$$, clearly $$$X$$$ can't be our answer.

    $$$-$$$$$$>$$$ Else let's say $$$a_{i+1}$$$ $$$-$$$ $$$a_i$$$ $$$>$$$ $$$X$$$ for some $$$i$$$, what should be the complexity of the extra problem?

    Let's say the complexity is $$$C$$$, then $$$C \leq a_i + X$$$ and $$$C \geq a_{i+1} - X$$$. Thus, we have a range $$$[$$$$$$a_{i+1} - X$$$, $$$a_i + X$$$ $$$]$$$.

    Lastly, we need to check if we could make a problem with complexity in the given range, say $$$[$$$ $$$L$$$ , $$$R$$$ $$$]$$$, for that, you can simply iterate over $$$d$$$ or $$$f$$$ and use set kind of data structure for searching a possible answer.

»
7 weeks ago, # |
  Vote: I like it +13 Vote: I do not like it

Is there anyone ignore the "consecutive" in problem E like me ._.

»
7 weeks ago, # |
Rev. 2   Vote: I like it -8 Vote: I do not like it

G was a nice problem

Can't help but point out that C has more ACs than B tho..

  • »
    »
    7 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Would you please provide a hint regarding your solution to problem G for us mere mortals? Please...

    • »
      »
      »
      7 weeks ago, # ^ |
      Rev. 3   Vote: I like it 0 Vote: I do not like it

      You can create a new graph containing all the nodes and all the colors. On this graph, two nodes have a connecting edge if:

      • One is a node and the other is a colour. Let's call these u and c respectively.

      and

      • There exists an edge on the original graph connected to u and has the color c.

      It's not hard to see that the BFS distance on this new graph is exactly twice the answer :) I don't have a rigorous proof though

      The amount of nodes and edges on this new graph cannot be more than O(n+m) so it will pass in the TL.

      • »
        »
        »
        »
        7 weeks ago, # ^ |
          Vote: I like it 0 Vote: I do not like it

        Wow! Very nice solution indeed! Thank you very much )))

  • »
    »
    7 weeks ago, # ^ |
    Rev. 2   Vote: I like it 0 Vote: I do not like it

    what is logic for ** Problem G** .

»
7 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

WT compilation error !!

»
7 weeks ago, # |
  Vote: I like it +1 Vote: I do not like it

Can't wait to become Expert!

»
7 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

I couldn't implement it in time, but I just wanted to make sure my strategy is correct for E.

Let row_ans[r] represent the minimum cost for some row. We can use prefix sums to calculate some contiguous row_ans and choose the minimum in O(n-k) time. The minimum will be the answer.

As for calculating row_ans[r], we use dp to calculate the minimum cost from dp[r][c] to dp[r][m]. row_ans[r] = dp[r][1].

Simmply apply dfs over dp[r][c] and check the minimum cost between dp[r][c] and dp[r][c+1], dp[r][c+2], ..., dp[r][c+d+1].

Is there anything more/wrong?

  • »
    »
    7 weeks ago, # ^ |
      Vote: I like it +1 Vote: I do not like it

    This would have time complexity of O(nmd) in worst case which would TLE.

  • »
    »
    7 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Seems like "intended" solution. It's $$$\mathcal{O}(nmd)$$$ on hindsight and with bruteforce approach, but monotone-queue trick can help reducing the $$$d$$$ factor.

»
7 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

someone tell the approach of PROBLEM D

»
7 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Again missed cyan by 2 points. Rip my life

»
7 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

(haven't given this contest but) wanted to ask which topics do i need to learn to solve div 3/4's F and g?

»
7 weeks ago, # |
  Vote: I like it +1 Vote: I do not like it

I tried F instead of E as seemed easier but failed on test2.

here's the submission (code is clean)
any help is appreciated.

  • »
    »
    7 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Why do you use upper_bound instead of lower_bound?

    • »
      »
      »
      7 weeks ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      lower_bound can also be used, implementation would be little different. I used upper as it felt comfortable

  • »
    »
    7 weeks ago, # ^ |
      Vote: I like it +1 Vote: I do not like it

    What about when cur diff > second max diff ?

    Also op1 and op2 can exceed (int) because a[i] is up to 2e9.

    You can check my code it's the same 250750511.

    • »
      »
      »
      7 weeks ago, # ^ |
        Vote: I like it +3 Vote: I do not like it

      cur diff > second max diff !!! ohho damn, How did I even miss it!!!!

      Thanks for pointing out,

      int is not an issue, you can see on top i have #define int long long :)

    • »
      »
      »
      7 weeks ago, # ^ |
        Vote: I like it +3 Vote: I do not like it

      Man It got accepted, how in the world i didn't notice I calculated second max incorrectly, DAMN!!!! Its suicide for me :(

»
7 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

"Note that the penalty for the wrong submission in this round is 10 minutes." Does it mean I can't submit for the next 10 min? or is it anything else?

  • »
    »
    7 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    You can submit for the next 10 minutes.

    It means that your penalty will be increased by 10 once you submit accepted code for that problem.

    • »
      »
      »
      7 weeks ago, # ^ |
      Rev. 2   Vote: I like it 0 Vote: I do not like it

      if the code got accepted at t=t min then the website registers it as t=t+10 min? am I correct? and also what happens if I don't submit any code later?

»
7 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Is there anyway to solve problem E with memoization? Just curious.

  • »
    »
    7 weeks ago, # ^ |
      Vote: I like it +1 Vote: I do not like it

    It was not possible, beause the overall complexity would have been d*n*m. I used a multiset in order to memorize information about the d+1 previous supports sorted in ascending order

»
7 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Problem A — Simple sort and binary search.

Problem B — Note that 1st element can only be modified by operations on element 2. Accordingly iterate over the array, simulate the operations on each, and check the last 2 elements for 0. In any case, element value goes < 0, answer is not possible.

Problem C — Simple substring search. First, count for mapie (requires only 1 operation). Then check for rest of the possiblities (pie, map).

Problem D — Let dp(i,j) represents whether all the m turns result in player j having the ball, if we are at move i and currently player j has the ball. Do a simple recurive dp, and final answer is the count of dp[i][m] == 1 over all i players.

Problem E — For each row, let dp(i) represent the min. cost to place supports, such that we place a support at a[row][j]. dp(i) can be calculated as min j from i-d-1 to i-1. Use segment tree to speed up this calculation. For every row, cost for that is dp(m). Final answer is a subarray of size k with minimum sum, that can be done using simple prefix sums.

»
7 weeks ago, # |
  Vote: I like it +19 Vote: I do not like it

Guys fft tag for B wtf?

  • »
    »
    7 weeks ago, # ^ |
    Rev. 3   Vote: I like it -26 Vote: I do not like it

    Simple solution for B using FFT:

    #include <bits/stdc++.h>
    using namespace std;
    
    using ll = long long;
    using cd = complex<double>;
    const double PI = acos(-1);
    
    int reverse(int num, int lg_n) {
        int res = 0;
        for (int i = 0; i < lg_n; i++) {
            if (num & (1 << i))
                res |= 1 << (lg_n &mdash; 1 &mdash; i);
        }
        return res;
    }
    
    void fft(vector<cd> & a, bool invert) {
        int n = a.size();
        int lg_n = 0;
        while ((1 << lg_n) < n)
            lg_n++;
    
        for (int i = 0; i < n; i++) {
            if (i < reverse(i, lg_n))
                swap(a[i], a[reverse(i, lg_n)]);
        }
    
        for (int len = 2; len <= n; len <<= 1) {
            double ang = 2 * PI / len * (invert ? -1 : 1);
            cd wlen(cos(ang), sin(ang));
            for (int i = 0; i < n; i += len) {
                cd w(1);
                for (int j = 0; j < len / 2; j++) {
                    cd u = a[i+j], v = a[i+j+len/2] * w;
                    a[i+j] = u + v;
                    a[i+j+len/2] = u - v;
                    w *= wlen;
                }
            }
        }
        if (invert) {
            for (cd & x : a)
                x /= n;
        }
    }
    
    void solve() {
      int n;
      cin >> n;
      vector<ll> a(n);
      for (int i = 0; i < n; ++i) {
        cin >> a[i];
      }
      for (int i = 0; i < n; ++i) {
        if (a[i] < 0) {
          cout << "NO\n";
          return;
        }
        if (i + 2 >= n && a[i] != 0) {
          cout << "NO\n";
          return;
        }
        if (a[i] != 0) {
          a[i + 1] -= 2 * a[i];
          a[i + 2] -= a[i];
          a[i] = 0;
        }
      }
      vector<cd> v;
      for (auto& elem : a) {
        v.push_back(static_cast<cd>(elem));
      }
      fft(v, false);
      cout << "YES\n";
    }
    
    int main() {
      int t = 1;
      cin >> t;
      while (t--) {
        solve();
      }
    }
    
    

    Proof that it works: https://codeforces.com/contest/1941/submission/250827117

  • »
    »
    7 weeks ago, # ^ |
      Vote: I like it +1 Vote: I do not like it

    just a simple loop and ac idk why fft tag needed

»
7 weeks ago, # |
  Vote: I like it +12 Vote: I do not like it

Admit it, who solved B using fft?

»
7 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Does hacking points contribute in rating?

»
7 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

**Dear Codeforces Community ** Please can anyone tell me why this code give wa on test 2 https://codeforces.com/contest/1941/submission/250799602

and when i just update the vector size with n+1 and m+1 then it gives me tle on test 6

https://codeforces.com/contest/1941/submission/250822673

the difference between both the codes is just that instead of using vector of size [n][m] i took [n+1][m+1]??

  • »
    »
    7 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    WA -> you are not considering when j == m in you fun TLE -> it's clear n * m * d which in worst case n * m * m

»
7 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Someone Please answer this python related question regarding problem D. For the input details about m throws, if I take the input as s = input().split(), dist,dir = int(s[0]),s[1] it gets accepted. But during the contest I took it as s = input().rstrip() ,dist,dir = int(s[0]),s[2] (I thought s[1] is the white space?), it gives WA on test 3. Everything else in both the codes is the same. Why is this the case? Can't believe I did not solve a problem because of this :(

  • »
    »
    7 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Because there can be lines like 10 ? or 100 ? depending on the value of $$$n$$$, you need first split the line by a space and then parse $$$r_i$$$.

    • »
      »
      »
      7 weeks ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      Thanks. Really bad mistake:(

»
7 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

I tried D using recursion (gave tle ) then applied dp, here is my code 250762239. Can someone pls tell why it gave wa ?

»
7 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Similar problems : G and arc061_c

»
7 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

How to write tabulation for the following solution to Problem D: 250808686. How do you approach DP in such scenarios?

»
7 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Somebody please tell me if there is a penalty for failed hacking attempt here in this contest.

»
7 weeks ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

Isn't it possible to have editorials ready even before contests? Just asking because you hardly see editorials for contest right after contest's ends and I wonder why it's like that. And the persistence of technical issues on codeforces is becoming something else. It's always one thing or the other.

»
7 weeks ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

I strongly believe there is something wrong with the Judge for Problem F. This is tourist's submission for F and this is Valee's for F.

I gave the same input to both on ideone. Valee's output doesn't match with the one from tourist. Line 17 of both submissions doesn't match.

So, I submitted this input to hack Valee's submission. It says unsuccessful hack.

I don't understand if I'm doing anything wrong or if the checker is broken.

  • »
    »
    7 weeks ago, # ^ |
      Vote: I like it +1 Vote: I do not like it

    Code has undefined behaviour due to out-of-bound access-

    int lb = upper_bound(c.begin(), c.end(), (v[src]+v[src-1])/2-b[i])-c.begin();
    sl = min(sl, max(abs(v[src-1]-b[i]-c[lb]), abs(v[src]-b[i]-c[lb])));
    

    This should be —

    int lb = upper_bound(c.begin(), c.end(), (v[src]+v[src-1])/2-b[i])-c.begin();
    if(lb!=k)
        sl = min(sl, max(abs(v[src-1]-b[i]-c[lb]), abs(v[src]-b[i]-c[lb])));
    

    Different compilers behave differently when undefined behaviour happens. If it's working on the judge compiler, I doubt you can hack this submission with the compiler used for this submission.

»
7 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Nice contest. E>F (at least I couldn't come up with a non dp solution for E) F was easier, never using ternary search again tho

»
7 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

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

  • »
    »
    7 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Can you provide 3rd test? My solution got WA on 3071st testcase, but when testing this testcase alone answer is correct. My solution doesn't has any global variables 250835513

  • »
    »
    7 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Nevermind, I found it myself. Thank you

»
7 weeks ago, # |
  Vote: I like it +1 Vote: I do not like it

Hours and hours trying to solve problem E and the only thing that I discoverd that I'm really bad at dp :))

»
7 weeks ago, # |
Rev. 2   Vote: I like it +2 Vote: I do not like it

I think there might be an issue with the way codeforces is handling problem B. A lot of people have written solutions which should give a tle and they take forever to run on my local machine. However when i try running hacks here, all hacks fail. In fact there is not a single successful hack in problem B. One such example of a tle solution is https://codeforces.com/contest/1941/submission/250718192

Please tell me if i am missing something and why none of the hacks give tle on these solutions even though they do on my local machine

  • »
    »
    7 weeks ago, # ^ |
      Vote: I like it +5 Vote: I do not like it

    The same goes with Problem F. I don't understand what's wrong with Codeforces Checker.

    • »
      »
      »
      7 weeks ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      It literally says that the time taken is zero. That is not even possible. It is taking forever to run on my machine. In fact, at first glance it is clear that we cannot subtract the values with 1 each time since the constraint is 1e9. I dont know what is up here today. So many solutions would fail if only they would allow hacks on these brute force solutions.

    • »
      »
      »
      7 weeks ago, # ^ |
        Vote: I like it +1 Vote: I do not like it

      Hey bro!!

      Nice to see you back in cf.

      • »
        »
        »
        »
        7 weeks ago, # ^ |
          Vote: I like it 0 Vote: I do not like it

        Hey Ankan, Thanks a lot! It's great to be back in CF. I wish I'd reach 1900 this year.

        Btw, what do you feel about my comment? :D

  • »
    »
    7 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Surely the solution looks wrong, but it seems the compiler does some (surprising) optimizations that make the code run fast enough. It is known that compilers sometimes do optimizations like this (like making a recursion into a loop).

    I could confirm that the code runs fast enough in my local environment by giving the -O2 flag to g++.

  • »
    »
    7 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Let's wait till system testing finishes.

»
7 weeks ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

Ok got it Thanks

»
7 weeks ago, # |
  Vote: I like it +1 Vote: I do not like it

When will solutions be published?

»
7 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

https://codeforces.com/contest/1941/submission/250836422 Can anyone Give me test case that will give wrong answer according to my code

»
7 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

tell me how i can see the rating of a problem?

»
7 weeks ago, # |
  Vote: I like it +4 Vote: I do not like it

The set of tasks is a bit unbalanced, B is more difficult C and D

  • »
    »
    7 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    I think the greedy strategy in B is difficult to prove. Maybe that's why.

    • »
      »
      »
      7 weeks ago, # ^ |
      Rev. 2   Vote: I like it 0 Vote: I do not like it

      I thought about it like this: If I'm forced to start at index a2, then I must be able to make index a1 equal to zero. so loop starting at second element and If at any time while setting index ai-1 to zero, any of the other indices, which are ai and ai+1, becomes negative, then it's a failure.

    • »
      »
      »
      7 weeks ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      There is prove (why it's diffucult?):

      1. We can't do operations on $$$i=1$$$
      2. $$$a_1$$$ can only be reduce doing $$$a_1$$$ times operation on $$$i=2$$$
      3. After that, $$$a_1$$$ is zero and we can't do operations on $$$i=2$$$.
      4. Now, array size is reduce by $$$1$$$, continue this algorithm to $$$i = n - 1$$$
  • »
    »
    7 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Idk how you attempted B, but B and C have similar solutions.

»
7 weeks ago, # |
Rev. 7   Vote: I like it 0 Vote: I do not like it

Why is this test case of problem 2 a "NO" The array should act like this

[5, 6, 0, 2, 3, 0] to

[0, -4, -5, 2, 3, 0] to

[0, 0, 3, 6, 3, 0] to

[0, 0, 0, 0, 0, 0]

Making the answer YES because you can turn the whole array into Zeros.

  • »
    »
    7 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    how did you get third array from second array? some values have increased I dont see how it is legal move

  • »
    »
    7 weeks ago, # ^ |
      Vote: I like it +4 Vote: I do not like it
    $$$\\ Keep \: in \: mind \: that \: each \: element \: can \: only \: be \: decreased.\\ After \: \left [ 0, -4, -5, 2, 3, 0 \right ], you \: cannot \: go \: to \: \left [ 0, 0, 3, 6, 3, 0 \right ].\\ For \: a_{i}=-4, \: this \: term \: can \: only \: be \: decreased.\\$$$
    • »
      »
      »
      7 weeks ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      I got confused by the way I defined how the operation goes

      the way I did it

      is that ai = ai — 2* ai-1

      the array increase more if the ai was negative, but the way the operation is defined makes that impossible. I had a brain fart!

»
7 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

I am sorry Done only A. B is so hard

Plz make upcoming Div3 B's easier.

»
7 weeks ago, # |
  Vote: I like it +6 Vote: I do not like it

Video Editorial for problem E (Rudolf and K Bridges) : Audio (Hindi)

YOUTUBE EDITORIAL LINK---CLICK here

»
7 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

This solution for G naturally came to my mind but my I THOUGHT IT WOULD GIVE TLE. can someone explain why its not getting TLE ? as per my understanding even if the logic is correct , if a node is connected to C different colored edges , this solution would consider that node C times and also once that node would come as minimal it the inner loop will work for E ( no of edges ) times , so according to my understanding worst case should be C * E for minimal output for a single node itself . And it should turn out to be TLE , if you think the time complexity is fine can anyone explain why ?

»
7 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

This was a great contest! Great job, problem setters and organizers!

»
7 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

problem c was the easiest but I had to look on google to look how to use function find in order to start from a specific index and not from the beginning

»
7 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

can someone explain how this is working in time 250679099

  • »
    »
    7 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    C++ should be considered cheating for this :) In Rust its TLE

    • »
      »
      »
      7 weeks ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      So the problem is with codeforces servers?

      • »
        »
        »
        »
        7 weeks ago, # ^ |
          Vote: I like it 0 Vote: I do not like it

        Wait for system testing.

      • »
        »
        »
        »
        7 weeks ago, # ^ |
        Rev. 5   Vote: I like it 0 Vote: I do not like it

        Here is assembly output of this loop:


        ; for(int i = 1;i<n-1;i++){ cmp rax, 2 jle 414 <_main+0x29d> lea rcx, [8*rax] mov rax, r12 lea rdi, [r12 + rcx - 16] nop ; while(v[i-1] > 0){ mov rdx, qword ptr [rax] test rdx, rdx jle 19 <_main+0x12b> sub qword ptr [rax + 16], rdx ; v[i+1] -=vi_1 ; v[i] -=2; lea rsi, [rdx + rdx] ; vi_1 *= 2 mov qword ptr [rax], 0 ; v[i-1] = 0 sub qword ptr [rax + 8], rsi ; v[i] -= vi_1 add rax, 8 cmp rax, rdi jne -36 <_main+0x110>

        As you can see the inner loop is transformed into 2 SUB commands (one for each element), really cool

      • »
        »
        »
        »
        7 weeks ago, # ^ |
          Vote: I like it 0 Vote: I do not like it

        Nope, it's due to compiler optimizations. Apparently the compiler rolls the innermost loop into constant-time operations. Optimizations like this do happen sometimes.

    • »
      »
      »
      7 weeks ago, # ^ |
      Rev. 2   Vote: I like it 0 Vote: I do not like it

      I tried rust -O3, and it generates exactly the same thing:

              test    r8d, r8d
              jle     .LBB0_15
              sub     dword ptr [rbx + 4*rax], r8d
              add     r8d, r8d
              sub     dword ptr [rbx + 4*rax - 4], r8d
              mov     dword ptr [rbx + 4*rax - 8], 0
              jmp     .LBB0_15
      

      Not sure why it's TLE on codeforces

»
7 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

is there any problem similar to A but with higher constrain like arrays size can be up to 1e5 ?

»
7 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

It was one of the best Div.3 ever. Thanks!

»
7 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Can someone explain the solution to E.

  • »
    »
    7 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Ok.

  • »
    »
    7 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it
    // 1<=t<=1e3 1<=k<=n<=100 3<=m<=2e5 1<=d<=m 0<=ai,j<=1e6 ai,1=ai,m=0 sum(n,m)<=2e5
    #include<bits/stdc++.h>
    #define int long long
    using namespace std;
    const int MAXN=105;
    
    int dp[200001],a[MAXN],hei[200001];
    map<int,int> mp;
    
    signed main(){
    	int t;
    	scanf("%lld",&t);
    	while (t--){
    		int n,m,k,d;
    		scanf("%lld %lld %lld %lld",&n,&m,&k,&d);
    		for (int i=1;i<=n;i++){
    			for (int j=1;j<=m;j++)
    				scanf("%lld",&hei[j]);
    			for (int j=0;j<=m;j++) dp[j]=1e17;
    			mp.clear();
    			dp[1]=1;
    			mp[1]++;
    			for (int j=2;j<=m;j++){
    				dp[j]=mp.begin()->first+hei[j]+1;
    				mp[dp[j]]++;
    				if (j-d-1>=1){
    					mp[dp[j-d-1]]--;
    					if (mp[dp[j-d-1]]==0)
    						mp.erase(mp.lower_bound(dp[j-d-1]));
    				}
    			}
    			// for (int j=2;j<=m;j++)
    			// 	printf("%lld ",dp[j]);
    			// printf("\n");
    			a[i]=dp[m];
    		}
    		int ans=0,sum=0;
    		for (int i=1;i<=k;i++)
    			sum+=a[i];
    		ans=sum;
    		for (int i=2;i+k-1<=n;i++){
    			sum-=a[i-1];
    			sum+=a[i+k-1];
    			ans=min(ans,sum);
    		}
    		printf("%lld\n",ans);
    	}
    
    	return 0;
    }
    
    
»
7 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Why I've Rated compete but it didn't Rated?

»
7 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

In final scoring of this contest , i have penalty of 125 . how is this calculated ? can someone explain me this.

  • »
    »
    7 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    it's the ICPC rules. The total penalty is the sum of the time you spent on your solved problems, which is 13+112(1:52)=125

»
7 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Now since hacking phase is finished, then can someone tell me why this code is not a tle 250786266?

»
7 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Can anyone give me explanation over the Solution of Problem — G. Rudolf and Subway

  • »
    »
    7 weeks ago, # ^ |
    Rev. 2   Vote: I like it 0 Vote: I do not like it

    Just build a graph with extra nodes for each color and find shortest path.

    Edit: You can see this for reference.

»
7 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

So many solutions of G hacked.

»
7 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Hopefully I'm not the only one doing 0-1 BFS on G ._.

Submitted right after system test initiation so I guess it passed, but I don't trust my messy codes....

  • »
    »
    7 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    how do you apply 0-1 BFS on G ??

    • »
      »
      »
      7 weeks ago, # ^ |
      Rev. 3   Vote: I like it 0 Vote: I do not like it

      (A bit complex though, I tend to overthink stuff.)

      Re-map the entire graph: each vertex of the new graph has the form of $$$(v, c)$$$, with $$$v$$$ is the original vertex, and $$$c$$$ is the color. This is for maintaining the current color in the trip.

      Edge $$$(u, v, c)$$$ in original graph becomes $$$((u, c), (v, c))$$$, and has weight $$$0$$$ (color doesn't changed — if wanna switch, see below).

      For an original vertex $$$v$$$, all vertices $$$(v, i)$$$ are connected to each other through weight-$$$1$$$ edges (acting as interlude steps if wanting to use an edge of new color).

      From here, the core idea for 0-1 BFS is complete.

      Answer will be $$$min \space dist((b, i), (e, j)) + 1$$$ (the $$$dist$$$ denotes the number of color changes, so add $$$1$$$ for the first color).

      If $$$b = e$$$, answer = $$$0$$$ — this case should be trivially handled first.

      A few touches are required:

      • We only considered vertices appearing at least once in the graph, instead of all vertex + color combinations (coz it can go up to $$$4 \cdot 10^{10}$$$). C++'s STL map (or any BST-based map-like data structure) can help with that.
      • To prevent repeated traversals of weight-1 edges, a special visited check is required for each vertex family (i.e. vertices originated from the same original node, differing only in colors).

      My code, for references (but as warned, it was way more than messy): 250907436

      A bit of code explanations and quirks
»
7 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Is this contest rated? No rating changes till now?

»
7 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

My rating is 1655 but i'm still a specialist . WHY ?

»
7 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Minor UI glitch post rating change. https://imgur.com/a/mw2YwLz

»
6 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Thanks authors for this great tournament!

»
6 weeks ago, # |
  Vote: I like it -13 Vote: I do not like it

Hello MikeMirzayanov, I received a message saying my solution to 1941E - Rudolf and k Bridges submission 250807913 and singhsoojal solution 250811342 to the problem are quite the same. And thus, we both have been disqualified.

Both Solutions might be very close, but we don't share the same exact code. I didn't share my solution anywhere. We also don't know each others, so we don't have any way to communication.

I think it's unfair to accuse people for cheating just for thinking in the same way and writing codes that are similar but not the same.

Your efforts for making the checker of copying are appreciated but I just figured out it needs some more work.

Thanks for the great round and problems!

»
6 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Can anyone explain why its giving error in testcase 4 solution

  • »
    »
    6 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Your solution is incorrect. Maybe you understood the problem wrong.

    Try this test case:

    Test

    Answer should be 0. Your code giving 1.

»
6 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Your solution 250774158 for the problem 1941F significantly coincides with solutions harshsharma2024/250774158, TLExceeded/250796278, codingishard8/250800925, Fusu/250810532, 2.16/250811985.

Here is my code : Accepted after getting wrong answer with this code : Wrong answer and after 3 minutes from getting the wrong answer. I swear that I didn't cheat in the contest, and all the codes in this contest were written by only me and I didn't use any online IDE.

And I didn't like this Plagiarism Mistake at all, not fair facing like these obstacles to get a new rate, specially when I am too close to the new rate.

MikeMirzayanov I've compared the two solution and I think the similarity between them is normal and many user could do such a solution.

»
5 weeks ago, # |
  Vote: I like it +5 Vote: I do not like it

Its very funny because a problem from the County Phase of the OI in Romania was similar to the G in this round, and it helped me a lot upsolving this round in the week prior to the contest!

Anyway, interesting problems and round!

»
11 hours ago, # |
  Vote: I like it 0 Vote: I do not like it

Contest Was Super Fun