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

Автор CodeChef_admin, история, 3 года назад, По-английски

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, 244mhq, 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: qingczha

  • 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!

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

»
3 года назад, # |
Rev. 2   Проголосовать: нравится -26 Проголосовать: не нравится

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.

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

    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 :)

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

      Damn that's definitely a punchline.

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

      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.

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

        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.

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

          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.

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

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.

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

    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!

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

      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.

      • »
        »
        »
        »
        3 года назад, # ^ |
        Rev. 2   Проголосовать: нравится +57 Проголосовать: не нравится
        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.

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

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

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

            Please, check the thousand other blogs discussing this.

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

              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.

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

                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?

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

        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.

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

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

»
3 года назад, # |
Rev. 4   Проголосовать: нравится +60 Проголосовать: не нравится

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.

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

    +1

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

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

    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.)

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

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

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

      Sorry :)

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

        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.

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

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

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

    It was an excellent honeypot

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

Editorial link is broken for Prefix as a Substring 2

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

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.

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

    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

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

    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

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

    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

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

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.

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

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!

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

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.

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

last few hour to cheat.

Dont miss this opportunity go and cheat.