adnan_toky's blog

By adnan_toky, 21 month(s) ago, In English

1778A - Flip Flop Sum

Tutorial
Code

1778B - The Forbidden Permutation

Tutorial
Code

1778C - Flexible String

Tutorial
Code

1778D - Flexible String Revisit

Tutorial
Alternative Solution
Code
Alternative Code

1778E - The Tree Has Fallen!

Tutorial
Code

1778F - Maximizing Root

Tutorial
Code

Full text and comments »

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

By adnan_toky, 3 years ago, In English

I am very frustrated after getting another unexpected warning from codeforces after the last educational round. I have already described the issue previously in this blog Unexpected warnings from CodeForces. It's disturbing to write over the same issue repeatedly. But I must write again this time because I did not receive any response from codeforces after writing the previous blog and commenting multiple times. It's very disappointing for me as a member of this community.

My submissions of this round skipped getting an unexpected warning that says my submission to problem C (1555C - Coin Rows) 124303153 coincides with the submission 124301236 by NZB.

The solution to problem C was very simple. We are given a grid of two rows as input and we have to calculate the answer from the sum of the suffix of the first row and the prefix of the second row. My solution was like this:

int n;
cin >> n;
 
ll x[2][n+1];
 
memset(x, 0, sizeof x);

// input for the first row
for (int i = 1; i <= n; i++){ 
    cin >> x[0][i];
    x[0][i] += x[0][i - 1]; // calculating prefix sum
}

// input for the second row
for (int i = 1; i <= n; i++){
    cin >> x[1][i];
    x[1][i] += x[1][i - 1]; // calculating prefix sum
}

ll mn = LL_INF;

// calculating the answer
for (int i = 1; i <= n; i++){
    mn = min(mn, max(x[0][n] - x[0][i], x[1][i - 1]));
}

Isn't it the simplest approach to solve the problem? More than 6000 people solved this problem during the contest. So there is a high possibility to coincide two submissions for a problem having this kind of simplest approach. Although the submission that coincides with my submission is different from many aspects except the approach of implementation. Codeforces plagiarism checker should be smarter to judge this kind of sensitive situation.

Here I'm attaching the submissions.

My Submission
NZB's Submission

If you want to downvote the post, please leave a comment before downvoting explaining how should we approach simple implementations like this and what would be your feeling after being convicted as a cheater twice just for the simplicity of your implementation? Isn't it heartbreaking and unexpected from such a reputed platform like codeforces?

I hope MikeMirzayanov will handle the situation gently this time and roll back the situation.

Full text and comments »

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

By adnan_toky, history, 3 years ago, In English

Who doesn't like short statements? (or maybe just me!)

Sometimes I get bored reading long statements while practicing and search for the problems with short statements. So I filtered such problems and ordered them by their statement size. I thought of sharing the list with everyone. Hope it may help the lazy programmers like me!


Problems (Categorized by Difficulty):

1700
1800
1900
2000
2100
2200
2300
2400

Remember that a short statement doesn't mean a simple and clear statement.

Full text and comments »

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

By adnan_toky, 4 years ago, In English

In the last round, I have received two unexpected warnings from CodeForces plagiarism checker. The first one says, my solution 105930169 for the problem 1476D - Journey significantly coincides with solutions bleh0.5/105914875. After sometimes I got another warning that my solution to the same problem (1476D) significantly coincides with solutions bleh0.5/105914875, tejas10p/105917332.

My approach for problem D was quite straight forward. Just three operations in three different loops. Whoever solved the problem using this idea, it is quite possible to match their solutions. I have explored the submissions of the first 100 people according to the common standings of this round. Among these 100 submissions, I found 7 submissions that are also quite similar to my solution. It does not mean that we all shared our code among us, it is just that our approaches were same. I'm mentioning these 7 submissions here.

My submission:

The two submissions that matched with my submission:

Similar submissions:

  • 105883915 — Here only difference with my solution is I used array and he used vector.
  • 105878527 — He used vector and wrote the solution in a separate function.

Other similar submissions:

I already commented on the post but nothing changed. So I am here annoying you again. From the day (16 Feb, 2020) I did my first contest here, i never missed a single round regardless of how busy i was. I love my cf profile more than anything and just can't let a scar stay on my profile without any wrongdoing. -_-

I am requesting MikeMirzayanov & awoo to look into these unexpected warnings.

Full text and comments »

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