This is a post to ask doubts and share your logic for solving questions from Codestudio Weekend Contest 66! 😄
You can also view the rankings for the contest here (link).
If you face any issues during the contest, do let us know by replying below. ✌️
How was your experience in the contest or got any feedback? Let us know here (link)
Who Can Participate:
CodeStudio weekend coding contests are open to programmers from all across the globe. Everyone, from freshers to professionals, can participate.
About The Contest:
CodeStudio Contest is our weekend coding competition. In this contest, the coders compete while also improving their overall algorithmic knowledge. The coding contest helps students and professionals to tackle a problem by reading the concepts they don’t know and also gain practical experience by coding the solution to the problem, thus improving their skills significantly. This coding competition packs the excitement of programming with the fun of learning into one compelling challenge. Don't forget to try out a sample problem if you are new to Codestudio.
Duration Of The Programming Contest: 1.5 hours (90 mins)
Rewards - CodeStudio EXP
I have solved the second question without TLE here is my solution -
So this is how I solved B. This gives AC for 10/11 test cases and probably gives TLE for the last TC.
As per the problem we need to iterate through every index of shields and decrease the value of every index in the ninja array by 1, except the index pointed to by shields[i]. Can anyone please share their AC code as how to solve this in T.C less than the T.C of my code. Was thinking of trying out a few other methods involving strings ,etc to somehow pass the time limit but couldn't implement it as I started the contest very late (with only 20 minutes remaining). Thanks.
Join Striver's tutorial, where he walks through the solutions to each problem of Codestudio Weekend Contest 66 | 25 Mar, 2023.
So what are you waiting for? Put your coding skills to the test and join Striver for a weekend of problem-solving here! 💻👨💻
I was not able to pass the last test case of third question …
What i understood is that if between any 2 answers eg 001 and 110 .. if the no of different answers is divisible by 2 so they would share same rank for some or the other combination of answers…Hence if the no of different answers is odd then they would never share same rank for any combination of ans
[no of different ans = sum of instances where both answer doesnt match (eg 1 & 0 or 0 & 1) of two ninjas)]
Can anyone tell what was wrong that i passed only 10/11 test cases…or atleast share your solution
Here is my code
Hey, I was able to solve the first 2 questions !! First one was easy though but the second one was throwing TLE. After Thinking a while i was able to reduce the Time-complexity to O(n). Slow start but yeah looking forward to participate and able to solve more and more questions. Cheers !