CodeChef_admin's blog

By CodeChef_admin, history, 7 weeks ago, In English

Hey all,

There is less than 7 hours left in the first round of Snackdown — go solve the one problem you need to qualify for the next round!

The panelists for the various rounds include Um_nik, antontrygubO_o, kefaa2, dario2994, DishonoredRighteous, Siberian, Ashishgup, nishant403, radoslav11, evilbuggy, Utkarsh.25dec, Aggu_01000101, srikkanthr, bhatnagar.mradul, 7dan, Dragonado, nandyboy.

Our translators are

  • Russian Translator: lkosten

  • Mandarin Translator: UoA_ZQC

  • Vietnamese Translator: Team VNOI

All the participants advancing from the Qualifiers to further rounds of SnackDown 2021 will receive a digital Certificate of Participation from CodeChef.

Hope to see you on the scoreboard!

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

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

What about the leaked solutions on youtube and the plag check which is being ignored for months?

Change My Mind: These rounds with a time duration of 2-5 days are useless to shortlist without a plag checker.

I know cheating is everywhere but if you don't crack down upon them, they'll get fearless.

UPD: Thanks for the downvotes, a small cost of speaking the truth and stating facts, regardless this is an unrated contest and you get ranked according to the number of problems solved without any time penalty.

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

    Use the cheaters as motivation to get better, if you get better than their results then in contests you'll be stealing rating out of them :)

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

      Damn that's definitely a punchline.

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

      Your advice applies to an ideal person. Unfortunately, when someone cheat there are 2 cases:

      1. You are in the top of the rankings (your case): The cheaters don't affect your ranking. This is an easy position.

      2. You are in the average or below (my case, tjolnir's case, and majority's case): The cheaters do affect your ranking. Response according various types of person:

        2.1. Ideal person: They commit an injustice against you. You are intelligent, manage your emotions perfectly and you continue improving in competitive programmning.

        2.2 Average person 1: The cheating affects you emotionally and mentally, but you manage to get over it and continue improving.

        2.3. Average person 2: The cheating affects you emotionally and mentally, it corrupts you and you also decide to cheat.

        2.4. Cheater: The cheating of others affects you as a cheater. You cheat more.

      Obviously, if you are average or below I recommend to be an 1) Ideal person or 2) Average person 1.

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

        The least I ask is for a plag check, no one can stop cheaters, I've mentioned it and btw I don't take advice from red coders about anything else other than CP, it's pretty easy to spill out stuff from top.

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

          Don't misunderstand me, I hope those cheaters get banned and even if their names would be put in a hall of shame list I wouldn't mind, but you gotta make the most out of a shitty situation.

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

    Check my recent blog

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

For 95% — 98% of the users the problems of Div3 in starters could always be used to host a Div2 contest as well. So try to make all the Starter rated as soon as feasible and possible CodeChef_admin.

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

No offense. But it's an utter shame that the submission count of the toughest problem passed behind the second toughest one's. Such a powerful cheater Indians are. As a cricket team they are great, greater, greatest. But as programming community they are kind of shameless.

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

    Partial Correct Solution/Comment.

    I am also Angry on Cheater(You can find my blog here ) but blaming whole indian community doesnt sounds well.

    I know 85%-95% cheaters are indian. But you should also rememeber there are many good CP programmers from Indian

    You must know

    You have right to blame cheaters but no india

    Your comment was 50% correct 50% wrong should I Downvote or Upvote Confused!

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

      It doesn't really matter what my opinion is. But the fact that I haven't seen many Indians stepping ahead to prevent those acts. From your comment if 90% cheaters are from India then who should we blame to? Russia? China? lol... One just example if anyone is proved cheating from our university we boycott him from attending in any kind of big contests like NCPC ICPC...You surely don't do these regularly, otherwise they shouldn't have that much courage to do these further. I don't hate India and I can assure you about that but about your community I am just frustrated.

      • »
        »
        »
        »
        7 weeks ago, # ^ |
        Rev. 2   Vote: I like it +57 Vote: I do not like it
        From your comment if 90% cheaters are from India then who should we blame to? Russia? China? lol

        Illogical argument. You don't need to blame any entire country for that.

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

          Why cheaters are growing? Especially in India. Provide any cause that's suitable.

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

            Please, check the thousand other blogs discussing this.

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

              Yes I understand, But why any software company would want to hire people by rating based on codechef! Isn't that bit weird? I have recently seen it on some random post. can't recall though. And downvote doesn't gonna change anything.When someone do great, you said we did great, like we won gold on olympic, but when some from your side did bad, you intend to avoid that discredit.That don't make you great. You have to receive the blame, thats upon you.

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

                I'm not sure what you even mean by 'that's upon you'? Do you want me to apologise or something for someone cheating in a country I share with 138 crore people?

                I don't even think it's worth to reply at this point, but I'm still gonna ask for the sake of curiosity. How does anything you've said yet counter my initial comment?

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

        From what I have observed:

        • Of all the youtube channels and telegram groups to cheat, the majority of them are from India: YES, but there are in the worst case 100 channels or groups MAX.

        • A considerable group of all the set of indians cheat: Unfortunately this could be a YES. We could be talking of several thousands.

        • A considerable group of all the set of indians are honest and don't cheat: I think this is also a YES. And probably (I hope) they are the majority of indians.

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

          The worst thing happens when the candidate masters and masters of Inda sell solutions..Then it becomes inevitable to eradicate cheating

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

    You have no right to call a whole country as a CHEATER, being an Indian I also accept that cheating is at its peak. Last ICPC 2020 has many INDIAN TEAMS in under 100, twos of them are in under 50 like IIIT Hyderabad etc. , being an INDIAN accept the bitter truth but not everyone is a cheater and not everyone outside INDIA is a legendary non-cheater CPer.

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

F

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

According to the rules of the contest:

Discussing CodeChef's problems or any aspect of problem, on any other platform on web, on identification, could lead to disabling of respective account and banning from the community.

This solution seems to have appeared around an hour before the contest ended. Suddenly the number of solves on the most difficult question increased from about 200 to over 800 in the final hour.

A glance at loads of the submissions shows that most of them have made pretty much no effort to hide the cheating. E.g., these five header lines from the video appear in this exact order in almost all of the late submissions.

#define all(v) v.begin(),v.end()

#define display(A) for(auto &aa:A) cout <<aa<<" ";cout <<"\n";

#define displayP(A) for(auto &aa:A) {display(aa);}

#define FOR(i,a,n) for(ll i=a;i<=n;i++)

#define TTT template<typename T> 

The display and displayP functions aren't even used in the solutions!

Whilst in a qualifying round the ranking list is not overly important, it undermines the contest and its rules, and these people shouldn't be allowed to participate in the main contest where they will likely attempt to cheat again. I hope that the admins will make a rudimentary effort to remove at least the most obvious cases. It devalues the efforts of those who try hard to come up with a solution.

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

    +1

    I agree with you You can blog related to this hete Cheating in Snackdown

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

    I think this non-issue will become quite a real one in the next 2 rounds. (They are 48-hour rounds which are supposed to select 3000 people.)

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

      Indeed, which is why people who've demonstrated a willingness to cheat at this stage should forfeit their right to compete for those places.

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

      Sorry :)

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

        Yes 5 problems are very less.There should have been atleast 7-9 problems.Less problems give people more time to cheat.

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

        Man, in Round 1 there are no tie-breaks, which means that all the people with same amount of problems solved as person on 1500 will proceed to the Round 2 and that's exactly what you are asking for. Read the rules and make sure you understand them before ranting.

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

          I got confused as to how can someone select top 1500 from a long challenge like ranking format. I apologise. Sorry for the comment :)

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

    It was an excellent honeypot

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

Editorial link is broken for Prefix as a Substring 2

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

How to solve Prefix as Substring 2?

I didn't find an editorial for this problem. In the video editorial, he took more time to explain obvious things and didn't explain the main optimization which is calculating all the prefixes of s1 that are ending at every index of x.

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

    The prefix function P of S1 + “$” + X tells you the longest prefix of S1 ending at each index of X, and also at each index of S1. Suppose you know that a prefix of length L1 ends at a certain index. Then a prefix of length P[L1-1] also ends there, and P[P[L1-1]-1], and so on. So you initially find the max L2 values (longest prefix of S2 starting after the prefix of S1) for each L1. Then you iterate from longest down to 0, and every time we process L1, we also say Ans[P[L1-1]] = max(itself, Ans[L1]). This dynamically (O(len(S1))) updates all the shorter derivatives of a prefix using the prefix function.

    Commented code here

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

      Thanks a lot, I didn't see the recursion part.

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

    we calculate the largest prefix of s1 ending at index i of x be A(KMP), and the largest prefix of s2 starting at x be B(Z-array). Now, we take another array g, where g[i] is the largest length of any prefix of S2 with s1[0...i] as its prefix. g can be calculated by arrays A and B(g[A[i]] = max(g[A[i]], B[i + 1])), or rolling hash.

    Finally we calculate KMP array pi on s1, and we iterate backward from n to 0, and ans += g[i] + 1, and g[pi[i]] = max(g[pi[i]] ,g[i]), meaning we move on the next largest prefix. The last part is a bit similar to directed graphs. Also, you have to check if a given length of prefix exists or you'll add an extra one

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

    My solution is a bit confusing. But I will try to explain it.

    Our aim is to find the maximum prefix length of s2 which follows a certain prefix length of s1. If prefix (s2) of max length 5 follows a prefix (s1) of length 3, then there will be 6 different ordered pairs for a length 3 prefix. And we have to add this for all the prefixes of s1. Let this max value I am storing in the ans[].

    Do KMP for s1. Now for each prefix of s1, you will have the largest suffix ending at the same index. Create a vector<vector> prev to store the lengths of prefixes that contain a certain suffix. For example, if s1 is preabcpre, then your prefix of length 9 contains one prefix of length 3. prev[3] = {9}. Rest will be empty. One thing to note here is that ans[3] will always be greater than equal to ans[9] because the prefix of length 9 will always contain the prefix of length 3. So, we can do a DP to calculate the answers for all prefixes starting from the largest prefix to the prefix of length 0.

    Form Z array of the string temp1 = s2+"#"+x. This will give the max length prefix of s2 at each index.

    Do KMP for temp2 = s1+"#"+x. Now at each index just calculate the ans[] by looking at the KMP array of temp2 and z array of temp1 and then apply the DP to calculate the final ans[] and do the summation of all the elements of ans[] to get the final answer.

    My code : https://ideone.com/Ble4xK

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

CodeChef_admin

https://snackdown.codechef.com/prizes
"Top 500 participants from the Elimination round will get a cool SnackDown t-shirt."
Does this hold for this season too? I'm participating just for the t-shirt.

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

    Why do you need the t-shirt?? Are you naked out in the cold freezing? Do you never have had the privilege of wearing a t-shirt? Is codechef some great institution and you're some devoted follower? Do you just wanna show it to the others, so that you seem more "techie"? You're such a dumbfuck.

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

      "Are you naked out in the cold freezing?" No

      "Do you never have had the privilege of wearing a t-shirt?" never have had the privilege of wearing a t-shirt that is won in a coding competition.

      "Is codechef some great institution and you're some devoted follower?" no, hmm...looks i don't even have a chance after seeing this level of cheating.

      "Do you just wanna show it to the others, so that you seem more "techie"?" You're such a dumbfuck.

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

    Yes

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

SnackDown 2021 Qualifiers ended last night. The video editorials for the contest are out: https://bit.ly/3vux3jW, and you can learn how to solve these and many more questions. Check them out right away!

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

CodeChef_admin Round 1A doesn't seem to have been added to your calendar yet. Do you intend to add any of the upcoming elimination rounds? It's been added in the clist.by calendar, but I've been following the official one presuming that it should be more extensive/reliable.

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

last few hour to cheat.

Dont miss this opportunity go and cheat.