K1o0n's blog

By K1o0n, 5 days ago, translation, In English

Hello, Codeforces! We are pleased to invite you to Codeforces Round 957 (Div. 3), which will be held on Jul/11/2024 17:35 (Moscow time).

The round will be hosted by rules of educational rounds (extended ICPC). You will be offered 7 problems, which I with Noobish_Monk, ErnKor, Kmes and ArSarapkin have prepared for you.

The rules of the third division are:

  • The penalty for a wrong submission is 10 minutes.

  • 12-hour phase of open hacks after the end of the round (hacks do not give additional points)

  • after the end of the open hacking phase, all solutions will be tested on the updated set of tests, and the ratings recalculated.

Reminding you, that only trusted participants of the third division will be included in the official standings table. This is a forced 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 (or you are a newcomer/unrated), then the round will be rated for you.

We would like to thank everybody, who helped in preparing this round:

Good luck!

UPD1 After the end of the round, Shayan will broadcast the solutions, a recording will also be available, but we will also prepare a textual editorial.

UPD2 Video Discussion by Shayan

UPD3 Video of solving the round + Editorial by the "winner" of this round, neal

UPD4 Editorial.

UPD5 Congratulations for the winners:

Official:

  1. siiiuuuuuuu

  2. shil_pelmen

  3. xiojoy

  4. _Separation

  5. son_and_moon

Official + Unofficial:

  1. tourist

  2. neal

  3. Dominater069

  4. abc864197532

  5. hitonanode

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

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

cool

»
5 days ago, # |
  Vote: I like it -16 Vote: I do not like it

my goal to reach +1700 after this round

»
5 days ago, # |
  Vote: I like it 0 Vote: I do not like it

Hoping for the best Div.3 Round! <3

»
5 days ago, # |
  Vote: I like it 0 Vote: I do not like it

__ combating unsporting behavior. To qualify as a trusted participant of the fourth 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 fourth division or not, if your rating is less than 1600 (or you are a newcomer/unrated), then the round will be rated for you.

why is it fourth division

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

Finally I can write this: my first unrated div3 :D

  • »
    »
    4 days ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    so people rated above 1600 wont be placed on leaderboard ?

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

      They wont be placed on official leaderboard

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

    How I used to think , it will be div 3 which will carry me to expert, but the div 2 hard carried man

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

As a tester of this round, I will say that the tasks were interesting

»
5 days ago, # |
  Vote: I like it 0 Vote: I do not like it

Hoping to get a good delta positive after this round! I wish everyone the same!

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

Just curious: How do you guys propose a Div3 contest?

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

Hoping we all get positive delta :)

  • »
    »
    4 days ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Hoping we all learn something regardless of delta :). (No offense, but if someone gets positive delta, someone else won't get positive delta)... I like being realistic.

»
4 days ago, # |
  Vote: I like it +17 Vote: I do not like it

As a tester i confirm that problems are indeed cool and worth solving.

»
4 days ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it
»
4 days ago, # |
  Vote: I like it +1 Vote: I do not like it

finally a div3 after a long time.

»
4 days ago, # |
  Vote: I like it +37 Vote: I do not like it

Can you tell me how to propose div3 contests? Vladosiya, Gornak40?

»
4 days ago, # |
  Vote: I like it +13 Vote: I do not like it
Vladosiya for deleting the lore in almost all of the problems...

Thank you.

»
4 days ago, # |
  Vote: I like it 0 Vote: I do not like it

My goal is to solve atleast 5 questions. Let's hope for the best.

»
4 days ago, # |
  Vote: I like it 0 Vote: I do not like it

f(n)=(n−1)⋅(f(n−2)+f(n−1))

can we solve this eqn using matrix expo???

if yes then plzz give me the matrix...

»
4 days ago, # |
  Vote: I like it +11 Vote: I do not like it

I like the monk's organization :D

»
4 days ago, # |
  Vote: I like it 0 Vote: I do not like it

Hoping a fresh and exciting contest

»
4 days ago, # |
  Vote: I like it 0 Vote: I do not like it

I want to go specialist, Good luck for me

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

chat do i rise back up to pupil

UPD: I think I do

»
4 days ago, # |
  Vote: I like it -14 Vote: I do not like it

Shayan streams pretty much in recent month for problems' solution. I appreciate him a lot.

»
4 days ago, # |
  Vote: I like it 0 Vote: I do not like it

Hope for rating++;

»
4 days ago, # |
  Vote: I like it +17 Vote: I do not like it

As a tester, I can guarantee that the round will be interesting!

»
4 days ago, # |
  Vote: I like it 0 Vote: I do not like it

potato

»
4 days ago, # |
Rev. 3   Vote: I like it +9 Vote: I do not like it

I want to solve 3 questions in this contest :)

»
4 days ago, # |
  Vote: I like it +1 Vote: I do not like it

How to be tester? Is this random?

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

    No, it's not random. Most testers are friends of setters or coordinators. Yes, there are some "random" testers if you want to say it like that, but in a way that they are friends of friends.

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

As a problemsetter, good luck, guys!

»
4 days ago, # |
  Vote: I like it +10 Vote: I do not like it

As a tester of this round, I can say that this round will probably lower your rating, but the tasks are worth solving <3

»
4 days ago, # |
  Vote: I like it -12 Vote: I do not like it

Can anyone tell me how much problem should I solve by looking at my profile and of what rating in order to get to pupil?

»
3 days ago, # |
  Vote: I like it 0 Vote: I do not like it

a general doubt, penalty gets applied after correct submisson or doen't depend on correct submission?

  • »
    »
    3 days ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Penalty gets applied after correct submission.

    • »
      »
      »
      2 days ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      what if I submitted two correct submissions to a problem what is there any penalty on this??

»
3 days ago, # |
  Vote: I like it +1 Vote: I do not like it

time to lock in

»
3 days ago, # |
  Vote: I like it 0 Vote: I do not like it

good luck guys :)

»
3 days ago, # |
  Vote: I like it 0 Vote: I do not like it

Great! Looking to get a fat positive (will get the opposite).

»
3 days ago, # |
  Vote: I like it 0 Vote: I do not like it

I hope I'll be +1300 after this round! Good luck to everyone!

»
3 days ago, # |
  Vote: I like it 0 Vote: I do not like it

good lucky for all !

»
3 days ago, # |
  Vote: I like it 0 Vote: I do not like it

i wish i'll reach back to 1300

»
3 days ago, # |
  Vote: I like it +1 Vote: I do not like it

Looking forward to getting my first color today!

»
3 days ago, # |
  Vote: I like it 0 Vote: I do not like it

will trusted participant be rated ??

or just be included in the official standing ?

  • »
    »
    3 days ago, # ^ |
    Rev. 4   Vote: I like it +6 Vote: I do not like it

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

    If the rating range is 1600-1900(didn't cross 1900 at any time), then you would only be in the official standings.

    Btw, Congrats!! on reaching Expert

»
3 days ago, # |
  Vote: I like it 0 Vote: I do not like it

I hope to go forward and wish for this to be the best Div3. Odin is with us!!!

»
2 days ago, # |
  Vote: I like it 0 Vote: I do not like it

Looking forward to getting a good positive delta this round

»
2 days ago, # |
  Vote: I like it 0 Vote: I do not like it

My goal above 1200 in this round

»
2 days ago, # |
  Vote: I like it 0 Vote: I do not like it

Hoping For a +ve delta this round and learn smtng neww....

»
2 days ago, # |
  Vote: I like it 0 Vote: I do not like it

interesting problems... i solved 3 in 40 minutes :)

»
2 days ago, # |
  Vote: I like it 0 Vote: I do not like it

that went a bit better than last div2 (emphasis on a bit because i somehow crashed my ide 4 times which lost me about 4-6 minutes from E-G)

»
2 days ago, # |
  Vote: I like it 0 Vote: I do not like it

NICE contest, at least for me its a good div 3, i solved 3. some late submission because of cloudflare but it was good overall.

»
2 days ago, # |
  Vote: I like it 0 Vote: I do not like it

got stuck on F , ughhhhhhhhhhhhhhh.

»
2 days ago, # |
  Vote: I like it 0 Vote: I do not like it

Overall very nice problems and good contest. My first time solving E and hopefully I get a good delta :)

  • »
    »
    2 days ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    is it just brute force ? 1e4*1e4 *100 it should not pass obviously

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

      here's an oberservation: n*a-b can only be at most 7 digits which means b can only have at most 7 values for each a

    • »
      »
      »
      2 days ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      well nope, brute force is TLE, its basically going over all values of A (10^4 iterations) and the it is guaranteed that the length of a valid string after removing b bits from it will never exceed a length of 7 (cuz the constraints come into play) so for every A , you run 7 inner loops and then obviously you can find b in constant time using a formula.

      270014350

      • »
        »
        »
        »
        2 days ago, # ^ |
        Rev. 2   Vote: I like it +1 Vote: I do not like it

        you can also solve this with math i believe — start with an empty string (denoted as s), add the digits of n one-by-one to it, then solve the system of equations:

        (int)s = n * a - b

        numdigits(n) * a - b = numdigits(s)

        270034846

        • »
          »
          »
          »
          »
          2 days ago, # ^ |
            Vote: I like it 0 Vote: I do not like it

          ohh, thanks for this :) . During the contest, i was constantly trying to think in this direction cuz this is much more efficient than what i wrote but yeah my brain just didnt work. Thanks for the soln, appreciated.

        • »
          »
          »
          »
          »
          2 days ago, # ^ |
            Vote: I like it 0 Vote: I do not like it

          lol I did this but it messes up the case n=1 where solving for a has “infinite”(a up to 10,000 from constraint) solutions. I basically cried after the contest…

    • »
      »
      »
      2 days ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      how is it 1e4*1e4*100 in brute force....??? beacuse after these 3 loops for(n>9) we have to convert it into string then add it to string for a times and pop back it for b times ....to get the final string that we convert into integer of long long??

    • »
      »
      »
      2 days ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      are you thinking to pre calculate a-b or a-b/2 or a-b/3 respectively for single digit ,double digit and triple digit......?????

»
2 days ago, # |
  Vote: I like it 0 Vote: I do not like it

C is the easiest but it was the hardest for me to write

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

ignore this was my worst performance soo far

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

    Probably Cheating

  • »
    »
    2 days ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    idk, D is just case handling, and E is running a loop on A and computing B accordingly. As a pupil , D was simple but E took some time

    • »
      »
      »
      2 days ago, # ^ |
      Rev. 2   Vote: I like it +1 Vote: I do not like it

      may be this time my brain stopped working possible after getting 3 penalties on A

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

        3 pens on A is ROUGH tbh :)

      • »
        »
        »
        »
        40 hours ago, # ^ |
          Vote: I like it 0 Vote: I do not like it

        us bro us... similar thing happened with me in D ..after which i just gave up as my brain froze.....I thought E and F would be hard to make it even though i had 50 min left......It was after the contest when I solved E and F ...and since then I'm cursing myself why didn't I moved to E and F

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

    D was only matter of implementation, Russian cper have quite different sense of indexing something.

    like if there is single 'W' between 'L' — "LWL". most people probably would think that simply jump over 'W' without swim, no it wasn't you need to jump first and then swim 1 kek.

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

      wasnt it stated you start at n = 0 (ok to be fair it isnt stated the rest of the inputs are [1..n]) (but it doesnt matter that much)

  • »
    »
    2 days ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    most prolly mass cheating in D

  • »
    »
    2 days ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    How did you get TLE,WA on A despite being a 1550?

»
2 days ago, # |
  Vote: I like it 0 Vote: I do not like it

How to solve F?

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

    set trivializes, only add if its a divisor of x, max 36 elements in the set so it wont tle

    • »
      »
      »
      2 days ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      How did I not see this..

    • »
      »
      »
      2 days ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      wow so i was in the right direction just less time ughhh. Used sets but couldnt write correct code fack

    • »
      »
      »
      2 days ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      How do you come up with 36?

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

      bruh 1e5 has 36 factors

      but 90000 has 74 factors lol

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

        i dont think that matters, simply going over every factor that can be created does run well in time. 270114245 . And now i feel sed cuz i could have gotten this during contest :(. I wrote the same thing at night just missed the s.insert(1) line during reset of the set

    • »
      »
      »
      42 hours ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      Actually number of divisors of $$$M$$$ is bounded by $$$2\sqrt M$$$ (think of the way we find divisors) In this case the overall time complexity would be $$$O(N\sqrt N)$$$ for $$$N \sim 10^5$$$ which's fast enough

      • »
        »
        »
        »
        40 hours ago, # ^ |
          Vote: I like it 0 Vote: I do not like it

        ig for all practical purposes N^1/3 can be used as an upper bound for number of divisors

»
2 days ago, # |
  Vote: I like it -16 Vote: I do not like it

I literally cannot believe on how ChatGPT unable to solve stupid implementation problem like D.

  • »
    »
    2 days ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    it's case handling and reasoning and greedy thinking I think it's very hard for an ai

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

    why would you want chat gpt to solve for you?

»
2 days ago, # |
  Vote: I like it -8 Vote: I do not like it

Hi All, can anyone help me understand why I am getting memory limit exceeded on problem D? this is my submission, I followed a recursive approach to explore possible options of jumping and swimming, I am not using an extra data structure, thank you in advance for your help!

  • »
    »
    2 days ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    try passing the string by reference

    • »
      »
      »
      2 days ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      Just tried it here, I got time limit exceeded this time; thank you for your help!, I will think on another approach.

      • »
        »
        »
        »
        2 days ago, # ^ |
          Vote: I like it 0 Vote: I do not like it

        Recursion might not pass with the constraints. I think solving the problem greedily is definitely more straightforward and easier to implement.

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

Was it only for me ,or it was really hard to decode the problems?

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

    oh yeah. very weird descriptions. probably their native language is not English.

    • »
      »
      »
      2 days ago, # ^ |
        Vote: I like it -11 Vote: I do not like it

      None of codeforces, codechef, atcoder speak English natively. Poor preparation is the only reason behind bad statements.

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

Another round dusted by Indian cheaters.

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

Me staring at E for 1hr +

»
2 days ago, # |
  Vote: I like it 0 Vote: I do not like it

My brain got blown away after reading E was like another level for me.DIV3's have become harder now

»
2 days ago, # |
  Vote: I like it +72 Vote: I do not like it

Sharing my video of winning* the contest: https://www.youtube.com/watch?v=9Vv2ZukG1CM&t=2476s

(*tourist doesn't count)

»
2 days ago, # |
  Vote: I like it 0 Vote: I do not like it

Missed E, and actually missed the first time that I could clear Div3.

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

    That case n = 1 lol XD

    • »
      »
      »
      2 days ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      Yeah, I've just checked it. My solution deserves to get WA because of my stupidity while not considering all the cases =((

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

        btw big fan, i am trying to solve your previous problems when you were pupil/specialist for practice :)

  • »
    »
    2 days ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    its okay bro. I got E in like 1hr20 min but i got 2 WA bcoz of fact that string cant be empty. I was so tensed for next 40 minutes and actually we have just 100 different cases so i even tried to find where i was wrong until i read string cant be empty. By that time it was already 2hr10min and penalty was too harsh + no time for F

  • »
    »
    2 days ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    your rating does not get reevaluated on this right?

  • »
    »
    34 hours ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Can you please review this and help me where i am going wrong. Thanks in advance!

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

Ahh, D was so straightforward but I spent like an hour debugging just to get AC in 3 minutes after reimplementing my idea.

»
2 days ago, # |
  Vote: I like it 0 Vote: I do not like it

What is the thing you have to notice to solve E?

The only way I would be able to solve (I didn't do this) would be to precompute all of n from 2 to 100 and then have a python program just return those precomputed solutions...

How do we solve for B given we check for values of A... Maybe I wasn't on the right track at all for optimal solution though...

  • »
    »
    2 days ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Notice that B is also bounded by 10000, so the length of good results is bounded by len(10000*100-1) = 6. So you can simply iterate all strings of length 1-6 for each A

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

Easier than recent div4 round!

  • »
    »
    2 days ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    true only was able to solve 4 in that. though i have become better :)

»
2 days ago, # |
Rev. 4   Vote: I like it +57 Vote: I do not like it

The problems were great, but the confusing statements ruined it for me, I really think more attention should be given to making the statement clear and understandable.

For example in problem D it was not clear that k was for the entire problem, when I read it I thought he could not swim a distance more than k in a row which led to me writing a completely different solution and wasted a lot of time on this.

I spent more time understanding the problems than solving them.

I am not saying the contest is bad, but I felt this should be addressed.

  • »
    »
    2 days ago, # ^ |
    Rev. 2   Vote: I like it +3 Vote: I do not like it

    Same, initially i also thought it should be k consecutive rows. Luckily i decided to read samples where answer is NO and one of the test case explained where K need not be in a row

  • »
    »
    2 days ago, # ^ |
    Rev. 2   Vote: I like it +4 Vote: I do not like it

    I think you just misread they wrote that k is for the entire swim from 1...n

    The river is very cold. Therefore, in total (that is, throughout the entire swim from 0 to n+1 )

  • »
    »
    2 days ago, # ^ |
    Rev. 2   Vote: I like it +1 Vote: I do not like it

    Worst Problem was D . First time i solved so poor in DIV3 .

    The first line of each test case contains three numbers n,m,k(0≤k≤2⋅105,1≤n≤2⋅105,1≤m≤10) — the length of the river, the distance ErnKor can jump, and the number of meters ErnKor can swim without freezing.

    I read n then m then k and hence exchanged k's constraint with m's constraint . Stucked in the whole contest for more than 1 hour while solution is correct.

    https://codeforces.com/contest/1992/submission/270048258

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

    same

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

    i mentioned this issue in testing, but unfortunately they did not take it into account

  • »
    »
    2 days ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Actually I also choked because of this , but I also confused about the fact that how to solve this if the task is to compute if swimmer can swim the river if he can continously swim for only k units
    . Please explain you solution for this above wrongly interprated question . Thank you

    • »
      »
      »
      2 days ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      If you are asking about my solution if you could swim for at most k meters continuously, Here is what I tried to do (Not sure if it's correct or not)

      I used a prefix sum array to count the number of crocodiles, there is a crocodile between l and r if pre[r] - pre[l - 1] > 0

      I used a variable to store where the last log was, If there is water at the current index I check if the distance between it and the last log + m is less than or equal k and that there is no crocodile between log + m and the current index then the current index is reachable.

      The rest is similar to the solution of problem D

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

        Ya make sense , It will pass thank's bro

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

There are so many similar solutions for problem D which have been taken from youtube. They all have just changed variable names while initialising a variable name with m-1 and incrementing a variable if there is water and using some other variables and at last they are checking if variable value is not zero then print yes else no. Loads and Loads of solution in the same format, I had a brainrot seeing 10k+ submissions for D itself.

  • »
    »
    2 days ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    same I was not able to solve it and D got 10k submission is just blatant cheating D doesn't get 10k+ submission on div 4 how can it get here

»
2 days ago, # |
  Vote: I like it +8 Vote: I do not like it

I might have gotten E in contest time itself but cloudflare had other plans.

»
2 days ago, # |
  Vote: I like it 0 Vote: I do not like it

Am I really dumb as from submission its looking like D is easy but I was not able to solve it

  • »
    »
    2 days ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    D was ezz, not 10K easy tho :)

    • »
      »
      »
      2 days ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      Yeah 5k submission I can understand as I am dumb but 10k is just crazy I am getting -ve delta for sure :(

      • »
        »
        »
        »
        2 days ago, # ^ |
          Vote: I like it 0 Vote: I do not like it

        well cheaters ruin it for actual hard-workers and thats pretty pathetic, like when i was giving div 3's 7-8 month ago and i was rated 900, if i solved 3 i would surely get +ve, but now its sort of impossible, either you get till E to get +ve or else you get fcked

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

bruh i asked chatgpt to solve D with dp and it actually worked

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

    huh?? gpt might not even do it with a simple loop, how did DP work ? lmao

    • »
      »
      »
      2 days ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      there is a valid dp solution

      • »
        »
        »
        »
        2 days ago, # ^ |
          Vote: I like it 0 Vote: I do not like it

        i know that brother, just stunned that gpt who cant write conditions in loop did it with DP, impressive to say the least lol

        • »
          »
          »
          »
          »
          2 days ago, # ^ |
            Vote: I like it 0 Vote: I do not like it

          i think chatgpt is just better at dp lol

»
2 days ago, # |
  Vote: I like it 0 Vote: I do not like it

thank you all for the great contest! I had so much fun solving a, b but got stuck on c :(

»
2 days ago, # |
  Vote: I like it 0 Vote: I do not like it

how brute-force round ,I love it.

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

Please report this guy. He is sharing answer during the contest time. He is destroying the cp environment. here is the link : https://www.youtube.com/live/frrrP-SHXWA?si=nnX4Ghj0bqvDJEeN

»
2 days ago, # |
  Vote: I like it 0 Vote: I do not like it

Hi, I am a newcomer here. I solved A and B in this contest but I still did not get any rating. Can anyone help me out and let me know why is that the case?

  • »
    »
    2 days ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    There is hacking phase running in this contest, you can see in the standings the time for it. You can read more about it here, once this hacking phase finishes all submissions will be run once again with new test cases that are added during the hacking phase; after it you will be able to see your rating.

»
2 days ago, # |
  Vote: I like it +10 Vote: I do not like it

Fantastic round! E was an amazing problem! Thanks a lot for the round Noobish_Monk ErnKor Kmes ArSarapkin and all testers!

»
2 days ago, # |
  Vote: I like it -16 Vote: I do not like it

there is a question in cf round 957 div3 just completed question no. E Novie Mistake if n==1 for a=3 and b=2 means string is empty value of n*a-b=1 but string is empty means it is zero it is not matching then why question consider string is empty as 1 and it didn't mention anywhere

»
2 days ago, # |
Rev. 4   Vote: I like it +6 Vote: I do not like it

D has a very clean DP solution.

Let $$$dp[i]$$$ denote the minimum number of swims required to reach index $$$i$$$. The transitions are -

For $$$j = i + 1 - m$$$ to $$$i$$$

  • $$$dp[i + 1] = min(dp[j], dp[i + 1])$$$, if $$$s[j] =$$$ 'L'

$$$dp[i + 1] = min(dp[i] + 1, dp[i + 1)$$$, if $$$s[i] =$$$ 'W'

Finally, the answer is YES if $$$dp[n + 1] \le k$$$.

Submission Link: https://codeforces.com/contest/1992/submission/270032188

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

    Yeah, that's true, but I exceeded the memory limit during the contest using dynamic programming, so I used BFS instead. It is also an easy solution.

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

      It's funny because I exceeded the memory limit using a DFS solution, and had to think of a DP solution instead.

  • »
    »
    2 days ago, # ^ |
    Rev. 3   Vote: I like it +8 Vote: I do not like it

    there is also easier greedy solution using O(1) extra memory: create a variable last_land_point and set it = i whenever you get on the land. Then if ever last_land_point become too far, that is farther than jumping distance, start incrementing a variable for how much to swim. If you hit a crocodile while swimming, not possible. If you have to swim too much, not possible.

    Code: https://codeforces.com/contest/1992/submission/269973081

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

      That's great, bro! I liked your solution.

  • »
    »
    2 days ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Hi, I struggle with tabulation DP, can you share any resource from where I can improve ?

    • »
      »
      »
      2 days ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      Tabulation DP is pretty much the same as recursive DP, you just have to calculate the DP values in the correct order, that is, the current state being calculated should not depend on a future state. Honestly the best way to learn tabulation DP is to solve more problems, CSES DP section the Atcoder DP contest helped me a lot.

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

      I would suggest Striver's DP playlist for that. If you just want to convert your recursive soln. to Tabulation then watch his videos(any of them), you will get to know that the only thing which is required for conversion is how to convert your Base cases of recursion to initialisation (base condition) of tabulation dp, rest all is just copy paste of the transition.

      And this conversion is quite easy.

»
2 days ago, # |
  Vote: I like it 0 Vote: I do not like it

Can someone pls tell why my soln for D is giving TLE 270051817. I was trying to keep track of the indexes of logs, i tried to check if we could cover the distance with jump alone or jump+swim but i dont know why my code is giving tle. Can anyone pls help!

»
2 days ago, # |
  Vote: I like it +1 Vote: I do not like it

I submitted almost correct solution for E during the contest https://codeforces.com/contest/1992/submission/270016302, the only thing I didn't figured out was to convert to long long instead of size_t in the only place to avoid overflow. So disappointed, I will NEVER use any integer types except long long in competitive programming again!

»
2 days ago, # |
  Vote: I like it 0 Vote: I do not like it

Can somebody explain what's f(x) and g(x) are in '**C**', i just guessed the soln, by looking at the samples and it worked but i have no idea what is problem saying and want me to do!

  • »
    »
    2 days ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    g(i): Add up numbers in the first i positions of the list that are less than or equal to m. f(i): Add up numbers in the first i positions of the list that are greater than or equal to k.

    To maximize the value of (∑ni=1f(i)−∑ni=1g(i)), place the largest numbers (greater than or equal to k) at the beginning of the permutation to maximize f(i), and place the smallest numbers (less than or equal to m) towards the end to minimize g(i).

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

// Can anybody tell me what's wrong in this implementation of D , I have chosen a variable pos to see if it is possible to pass the river and p tells if we found a "log" , c tells us if i found a "crocodile" and "w" tells us swimming through water i have as usual checked if if it is possible to get to a log then go there otherwise increase the position by m and check if there is one segment to swim to otherwise if only crocodiles were found btw i and i+m segment make pos false.





signed main() { ll t; cin >> t; while(t--) { ll n,m,k; cin >> n >> m >> k; string s; cin >> s; ll i = -1; bool pos = true; while(i<n){ bool p = false; bool c = false; bool w = false; for(ll j = m;j>=1;j--){ ll k = i+j; if(i+j<n){ if(s[k]=='L'){ // cout<<i+j<<endl; i = k; p=true; break; } if(s[k]=='C'){ c = true; } if(s[k]=='W'){ w = true; } } else{ i = n+1; break; } } if(p==false and w==true){ i+=m; if(i>=n){ break; } else if(s[i]=='C'){ pos = false; break; } else if(k>=1){ // cout<<i<<"water1"<<endl; i+=1; k = k-1; // cout<<i<<"water"<<endl; } else{ pos = false; break; } } else if(p==false and c==true){ pos =false; break; } } if(pos){ cout<<"YES"<<endl; } else{ cout<<"NO"<<endl; } } }
  • »
    »
    2 days ago, # ^ |
    Rev. 2   Vote: I like it +2 Vote: I do not like it

    With this number of if-else-s and no proper indentation, it's hard to get the idea implemented right. The right thing to do is perhaps not to find a particular bug, but to take a step back and observe what can be changed globally. Consider developing these habits:

    • formatting the code to aid in implementation (any decent IDE has a keyboard shortcut for that)

    • thinking about solutions with as little if-else-if-if-else... forests as possible

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

Never thought i will get 4 wrong submission on Div3-A :(

However solved B,C easily but spent too much time on D and didn't got much time to solve E Seems lots of people solved D so i might get -ve delta

  • »
    »
    2 days ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    I hope we get +50 delta my rating is same as yours and the same situation it was actually a speed matter because people placed at 2500 also solved 4 problems only

  • »
    »
    2 days ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    I think you will reach pupil easily because you didn't participate in too much contests I participated in more contests so I would be relieved if I got those +50

    • »
      »
      »
      35 hours ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      nah bro just got +7, i think lot of incorrect submission for problem A cost me

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

Bug in https://m1.codeforces.com/enter (during contest Problem C was not able to load i shifted to main site quickly) Your text to link here...

»
2 days ago, # |
  Vote: I like it 0 Vote: I do not like it

Can someone please help me debug this code for D ? I was able to come up with the dp idea but can't find what is wrong with the solution? https://codeforces.com/contest/1992/submission/270037120

Also, Is there some way to see the test case on which it is failing? Thank you.

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

    Just output the testcase where it is failing.

    Spoiler
    Test Case
    Issue in the code
    • »
      »
      »
      2 days ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      Ah Man, Thank you very much!!. Wasted 2 hours on this during the contest. But it should give some Runtime Error(Segmentation fault ) instead of Wrong Answer, Correct? Or am I missing something here?

      Anyways it was an easy problem, more than 10k submissions :O . Will get a negative delta because of this :'(

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

      Can you please tell the wrong test case for my code. I have been getting WA on case 559 of test 4 270114576.

      • »
        »
        »
        »
        43 hours ago, # ^ |
          Vote: I like it 0 Vote: I do not like it
        Testcase

        I must say this is a bad habit is general, but this trick should be used after debugging for long time ( >= 1hr) and still the same error is not resolved.

        • »
          »
          »
          »
          »
          43 hours ago, # ^ |
            Vote: I like it 0 Vote: I do not like it

          Thanks a lot man! I have had 13 wrong submissions and never could figure out the test case where it was failing, thnx a lot. I will learn and try this trick if I struggle a lot on some task, thnx for teaching me this trick.

»
2 days ago, # |
  Vote: I like it +1 Vote: I do not like it

Weird statements for D and F

»
2 days ago, # |
  Vote: I like it 0 Vote: I do not like it

Does anyone know what the error-"Invalid use of deleting symbols" mean? Here's the link for reference 270073853

  • »
    »
    2 days ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    1 1 isn't valid for $$$n=1$$$, because it results in an empty string, which is exceptionally disallowed by the statement.

»
2 days ago, # |
  Vote: I like it 0 Vote: I do not like it

I'm sure many people brute forced the answers of E, and just made if and else cases of it, there weren't many numbers and was fairly easy to make cases for each n.

  • »
    »
    2 days ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    yeah since you really only have around 50 thousand cases (optimally) and it wouldn't be very hard to just bash out all the possible cases of a and b.

    • »
      »
      »
      2 days ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      No that would give TLE, I meant people brute forced the answers beforehand, and made if else cases like: if (n==2) cout << 3 << endl << x1 << x2 << endl .. ... if (n==3) ....

      • »
        »
        »
        »
        2 days ago, # ^ |
          Vote: I like it 0 Vote: I do not like it

        why would that give TLE? i did just that

      • »
        »
        »
        »
        2 days ago, # ^ |
          Vote: I like it 0 Vote: I do not like it

        Personally, I believe that it shouldn't give TLE, due to the extra second it provides for the time constraints, 3 seconds, compared to 2 in B, C, D and 1 in A. I believe it should be possible to optimize enough to fit in the time limit, as 50,000 cases really isn't all that much in computing. You do have a point though.

        • »
          »
          »
          »
          »
          2 days ago, # ^ |
            Vote: I like it 0 Vote: I do not like it

          You are missing the factor of building the number by getting individual digits which is atleast 20 operations for each i from 1 to 10^4. So your total operations would be 10000*5*20 for each test case, so a total 10^8 operations, I personally wouldn't risk on such a solution passing the TL.

          • »
            »
            »
            »
            »
            »
            2 days ago, # ^ |
              Vote: I like it 0 Vote: I do not like it

            one could easily optimize this by precomputing the number of digits that u will need and build the number from there. since that number is quite small it will not TLE

          • »
            »
            »
            »
            »
            »
            2 days ago, # ^ |
              Vote: I like it 0 Vote: I do not like it

            I'm not sure where you're getting these numbers from. Other than the $$$n = 1$$$ case (which has $$$9999$$$ possible answers, since $$$a = b + 1$$$ always works), among all $$$2 \le n \le 100$$$ there are a total of only $$$24$$$ other $$$a, b$$$ pairs actually possible. Precomputing all these and using if else statements would definitely not TLE.

»
2 days ago, # |
  Vote: I like it +12 Vote: I do not like it

really nice contest, I enjoyed the surplus of math-related questions, and it felt fitting for div 3. great job to all the organizers!

  • »
    »
    2 days ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    yeah same. as a math olympiad participant, these observation problems were easier to me, which is why i performed so well this time :D. definitely a great contest with some nice problems!

»
2 days ago, # |
  Vote: I like it 0 Vote: I do not like it

Can someone help me why my submission give a wrong answer in problem F 270081629

»
2 days ago, # |
  Vote: I like it 0 Vote: I do not like it

I only rated 374 and did 1 contest, this contest I did 2 problems, could I be rated in this one?

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

Enjoyed while solving the problems. But descriptions were just too bad. It took much time to understand each problems. Please make descriptions easy so that everybody can understand the questions easily

»
2 days ago, # |
  Vote: I like it -12 Vote: I do not like it

Why did nothing happen to the cheater of the EPIC Institute of Technology Round Summer 2024 (Div. 1 + Div. 2) contest and their rating? MikeMirzayanov & Vladithur

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

Why my score can't increase after this round? In my competition record it shows unrated,why?Can anyone answer my question?My rating is still 762

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

Congratulations to neal for taking the first place XD !!!

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

Why my solution for F was hacked? Just because the time constant?

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

a trend of not able to solve E and getting hacked on F continues

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

Took me embarrassingly long and with many false attempts to solve E. Solved F and G before it.

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

    a recent trend is to give a constructive problem as div -3,4 E making it confusing wheather to go for e or f

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

Language of problem D was not right , you should explain all these cases properly :

1. If he is on the surface (i.e., on the bank or on a log), he can jump forward for no more than m _ (1≤m≤10_ ) meters (he can jump on the bank, on a log, or in the water). 2. If he is in the water, he can only swim to the next river segment (or to the bank if he is at the n -th meter). _3. ErnKor cannot land in a segment with a crocodile in any way.

i am able to solve it after contest by spending 2 hrs and i wasn't able to solve it during contest because langauge was not that much clear l know there are so many submissions but dont judge me by those solutions because most of them are cheaters , and its high chances that they even didnt read the problem statement

  • »
    »
    45 hours ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Or you need to be not delusional and solve more dp problems.

  • »
    »
    44 hours ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    i must agree, there were so many accepted solutions.

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

Can anyone tell me why one solution gives tle and other doesn't for F

AC : 270113651

TLE : 270113332

Not that much of a difference, in TLE one, I am erasing unique elements before I loop, Whereas in AC one I erase after I loop

UPD : I am just dumb. There was just a PEMDAS mistake XD

  • »
    »
    44 hours ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Isn't there something similar to Set or SortedSet in c++? Why be so sophisticated.

    • »
      »
      »
      44 hours ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      yea there is, but this comes to my mind at the first thought during the contest as i have learned about this unique function just before the contest started. but wasn't able to implement it. Maybe just because of I was too tired after solving E

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

I have rating less than 1600, but this contest is displaying in unrated section in my profile?

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

    That is only because the ratings are not currently calculated

    • »
      »
      »
      44 hours ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      hi. i am a beginner here. just wanted to ask. now, since the hacking phase is over, by when(approximately) will the rating be shown?

      • »
        »
        »
        »
        43 hours ago, # ^ |
          Vote: I like it 0 Vote: I do not like it

        After the hacking phase, all solutions will be rerun with the new test cases generated during the hacking phase. This is called System Testing. Your rating will be updated after the System Testing, but not immediately; this might take several hours even after the System Testing is complete.

        I expect the overall process to take about a day. However, note that the time required for rating updates can vary.

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

When can the textual editorial be posted, since youtube isn't accesible in China :(

  • »
    »
    42 hours ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    we'll try to post an editorial in the next three hours.

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

My rating didn't change even tho I solved 2 questions?

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

I hacked four solutions of E using the testcase where t=100 and n from 1 to 100. Now as the system tests are visible the second testcase is same as my hack test. How is this possible ?

Hack test — https://codeforces.com/contest/1992/hacks/1055241/test

Submission Link — https://codeforces.com/contest/1992/submission/270051562

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

    It's because their solution is barely passing the time limit, so run to run variance. If it was ran again it might pass and it might not

  • »
    »
    42 hours ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    I think test case 2 is t= 100 And n from 1 to 100

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

I am unrated and a newbie right now but still this round is showing unrated for me..

  • »
    »
    43 hours ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Dude system testing hasn't started yet. The ratings dont change until its done

    • »
      »
      »
      43 hours ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      Thank you soo much!! Since it was my first contest I didn't know how things really work

  • »
    »
    43 hours ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Since you are a newcomer, this round will be rated for you. It seems you saw your rating graph with the 'All' filter. However, this does not mean that you are unrated for this round; it simply means that the ratings have not been finalized yet.

    Please wait for the system testing to be completed. After the system testing is done, you can expect your rating to be updated.

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

Why my rating is not updated?

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

I am a new comer and below 1600 but i didn't get any rating points and the contest was classified unrated for me, may i know why?

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

When the results will come

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

when is the system test?

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

I participated in this contest and solved only 1st questions but i didnt get any ranking or even my ratings didnt get affected

»
41 hour(s) ago, # |
  Vote: I like it 0 Vote: I do not like it

Why I can't be rated after this round, I just 374 rating

  • »
    »
    40 hours ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    system test phase is happening now. Once the submissions are re judged ratings will roll out. Will take atleast few hours. You shd get the rating update by eod,

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

I submitted A, B, and C yesterday and all three got accepted yesterday. I have no idea how B and C got rejected today ,This time i have proof also that i have done it by myself can anyone help me to reach out codeforces team Codeforces Round 957 (Div. 3)

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

BruteForces!!!

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

i have solved 3 problem but now only one of they remained, but why? how it is possible

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

I had submitted 3 questions in the Codeforces Round 472 (rated, Div. 2, based on VK Cup 2018 Round 2) and it was accepted. But when I checked it just now it is not showing my submitted answers and my first question is highlighted red. Also is showing some system checking which is at 77%. Please tell me what is going on as I am new to Code Forces.

  • »
    »
    38 hours ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Don't worry, system testing is when all the submissions are checked again on larger amount of tests, the problems that you see "rejected" are actually just unchecked yet, you'll see the true result when system testing is finished.

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

Is there any way I can optimise my latest solution of E problem even more ?

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

orz

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

Can anyone explain what is this hack doing?

https://codeforc.es/contest/1992/hacks/1054913

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

Before the change of statement, I struggled for a long time to understand problem F as I thought about making more "good segment". It's strange, I don't know why I can't get the real meaning. Why no explanation of the problems?

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

The jugde ends but my rating doesn't change :v

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

May I know why this contest is not rated though am a trusted participant.

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

how to see the test case where I Got hacked I cannot see it in hacks section, as well as there is no test case visible to me with wrong answer verdict

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

    Just follow the instructions on the image. Also, during the hacking phase, you cannot see the hacker's input. If you can't view the tests, this might be the reason.

    Here is your test used for hack: Link

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

Can anyone please help me correct this solution for problem D.

Got WA on 845th test of test case 2.

Code
  • »
    »
    33 hours ago, # ^ |
    Rev. 2   Vote: I like it +3 Vote: I do not like it

    hey buddy , the problem is the part where you define your state of dp , so what I could understand from the code was dp[i] would give me true/false stating is it possible to go to the end of the river from i.

    There are 2 things that are changing in your recursive function , that is i (index) and k (remaining swimm count) but nowhere in the dp state have you mentioned k there is just i.

    Look at this example lets say when in the first recursive call you get to an index x with remaining swim count as y and it is possible to cross the river with y amount of swimming so dp[x] will be true. but lets say in future you call the same index again with z remaining swim count (z < y) and it is not possible to swim through the river with z swim , still you will be returning "true" because dp[x] is set to true because of first function call.

    Conclusion :

    you need to change the definition of dp[i] , instead of saying dp[i] gives me true or false if it possible to reach end from index i , define dp[i] as minimum number of swimming count required to reach end of river from index i . If it is impossible to reach end from i store some large number which cant be your ans in any case. Keep overflow in mind !!

    AC soln: 270200685

    • »
      »
      »
      33 hours ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      Thank you, now i understand where i was going wrong.

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

I dont see the point of adding updated testcases to a div 3. If you wish to introduce new testcases after the contest, simply make them pretests instead. It is really misleading. Yesterday my code for E got accepted with a missing condition which was compiler dependent. Due to that missing condition, the terminal would behave weirdly during runtime in the new testcases that were added. Now after the contest ended, quite obviously no one bothered to try hacking E since they had checked all values of N in the test files. It is only fair to allow the acceptance to a solution if the tests were weak and and no one hacked the solution. Had the new testcases been there since the beginning, I would have fixed the solution in the contest itself. I would request the codeforces team to look into this.

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

Need Help ,,,, I don't understand how did I get 4 Penalty and -50 on Rating, please can anyone help me for solving this issue, I don't understand I am new here, please anyone there, hello coders

  • »
    »
    32 hours ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    +00:04 in the ranking list does not means 4 penalty, it means you take 4 minutes to solve that question.Talking about the rating, you got negative delta bcoz you doesn't perform upto your rating level(before contest rating) in the contest.

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

[submission:270203220]problem D

In this where i am going wrong when implementing considering state as min meters swum to reach i from 0 it is giving wron g answer i want to know about some changes

»
31 hour(s) ago, # |
  Vote: I like it 0 Vote: I do not like it

how come i only get +14 rating when I solved 3 problems correctly and I am just 800 rated guy

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

Something smells really fishy about the official winners, number 1,2 and 4..... It does not seem feasible for somebody getting a consistent rank of 5k to jump to 1, or for a 4/5 digit ranker to suddenly get a 1 digit rank in contests.....or for that matter, for a Newbie to jump straight to Specialist in one contest.....

  • »
    »
    14 hours ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    There's almost a one-year gap between the contests where they have 5k rank and the recent ones where they have single-digit ranks so I would say it's pretty legit considering they might have been giving contests or solving problems using some alt account.