No video

Codeforces Round 956 | Video Solutions - A to D | by Gaurish Baliga | TLE Eliminators

  Рет қаралды 5,398

TLE Eliminators - by Priyansh

TLE Eliminators - by Priyansh

Күн бұрын

Пікірлер: 43
@doge9737
@doge9737 Ай бұрын
I dont know if my comment is relevant to this video or not, but during the contest I was not able to think any approach for B, so I moved to C, the logic seemed very simple, I started to solve, ran my code on TCs and got matching outputs for the case where order was alice bob and charlie, so i figured I should make all the cases, but didn't do it as I thought writing every case may give error on systems tests,so I left. Today I wanted to upsolve this I gave it some time, took help from your solution and the thing was to code it now. I adopted a different approach from this solution for my code, after 2 hours, 2 wrong answers and 1 compilation error, it finally got accepted. Very trivial thing, but feels amazing, maybe this is the thrill of CP everyone talks about :)
@priyanshkumar_iitd
@priyanshkumar_iitd Ай бұрын
Great bro
@ritabratapal8489
@ritabratapal8489 Ай бұрын
For C IT CAN BE DONE BY TAKING ALL THE 6 PERMUTATIONS ALSO
@zebra-er6xc
@zebra-er6xc Ай бұрын
can you share the code, I got TLE on testcase 3 in the contest while considering this
@ritabratapal8489
@ritabratapal8489 Ай бұрын
@@zebra-er6xc sure bro #include #define lli long long int #define vi vector #define vpi vector #define pb push_back #define endl " " #define vli vector #define rep(i,s,n) for(int i=s;i>i #define out(a) for(auto i:a)cout
@ritabratapal8489
@ritabratapal8489 Ай бұрын
u basically check for all the 3!=6 combinations if u still dont get the answer then print -1
@ayushbhowate42
@ayushbhowate42 Ай бұрын
I did the same thing
@AyushVerma-ui7re
@AyushVerma-ui7re Ай бұрын
First question took me like 15 minutes to get the intuition in the contest.
@priyanshkumar_iitd
@priyanshkumar_iitd Ай бұрын
Yeah. I also took 8 minutes
@adarshamit7860
@adarshamit7860 Ай бұрын
took me 6-7 min to see ki koi aur aisa test case pr khela na ho jaaye XD
@AyushVerma-ui7re
@AyushVerma-ui7re Ай бұрын
The example test case solutions were too confusing to get the intuition directly 😂.
@priyanshkumar_iitd
@priyanshkumar_iitd Ай бұрын
@@AyushVerma-ui7re Yeah, you're right. They were confusing
@adarshamit7860
@adarshamit7860 Ай бұрын
I m from patna😂 and ik they do these kind of stuff intentionally😂😅😂
@studyplanet4656
@studyplanet4656 Ай бұрын
Gaurish , thanks buddy I got the intuition for problem D .
@vanshrana7807
@vanshrana7807 Ай бұрын
Just loved your explanation specially for problem D ❤
@swaggyxo7488
@swaggyxo7488 Ай бұрын
Bro the date and time on ur device tripped me tf out 💀🥴 Edit: Amazing explanation of D. I was on to the third observation right from the start but didn't fully understand it, thanks to you, now I can. The inversion concept really tickled my brain, makes me want to start with the hard sections of the A to Z Striver's DSA sheet which I left for later. It has the count inversions question too.
@ankit21309
@ankit21309 Ай бұрын
For D : first sort the first array and make the same index changes in the second as well Do it for the second array, if the count of operation if odd in the second array operations then the and is no other wise the answer is yes, also make sure the element in both the array are same
@AmrutanshuMishra-dp1mf
@AmrutanshuMishra-dp1mf Ай бұрын
Amazing explanation!!!
@user-sw3oo9fr5l
@user-sw3oo9fr5l Ай бұрын
In B, does the order of choosing sub-rectangles matter?
@aye_man_07
@aye_man_07 Ай бұрын
In B it is much easier than that...although it took me almost an hour to figure that out so just create a grid of what changes you need to make in each of the cells and then simply run two diiferent loops over the grid. in one loop calculate the sum of each row and if any one is not divisble by 3 just print NO similary do it for all the columns and in the end if all are divisble just print YES.
@Entertainmentexe
@Entertainmentexe Ай бұрын
Can you give the intuition?
@EvenHeisenbergIsCertainAboutMe
@EvenHeisenbergIsCertainAboutMe Ай бұрын
i did same during the contest still got wrong on testcase 2, maybe some minor mistake i think i had to revisit cf
@harshpandey4190
@harshpandey4190 Ай бұрын
@@EvenHeisenbergIsCertainAboutMe remove abs from your ans
@jayasuryanalamolu3305
@jayasuryanalamolu3305 Ай бұрын
@@Entertainmentexe@Entertainmentexe Basically, on every operation, we add 3(1,2) to that operated row and column, so the difference in the initial and final sum for every row and column must be a multiple of 3; if not, the final matrix cannot be achieved.
@sahilrao4592
@sahilrao4592 Ай бұрын
best explanation sir !!
@prathameshbhangre3147
@prathameshbhangre3147 Ай бұрын
Great explanation
@pargatsingh2369
@pargatsingh2369 Ай бұрын
Gaurish Bhaiya 💯
@prathameshbhangre3147
@prathameshbhangre3147 Ай бұрын
explanation is very beginner friendly
@mohammadgaus7
@mohammadgaus7 Ай бұрын
Maybe am soo dumb that am still confused what you did in first question, like how...
@troys1426
@troys1426 Ай бұрын
How I did first question is basically: We can think of any array that satisfies it. The idea is that the sum of the multiples of k *are* divisible by k. Hence, if you output the numbers from 1 to N for Problem A, you realize that you are essentially summing up all multiples of k from 1 to N.
@priyanshkumar_iitd
@priyanshkumar_iitd Ай бұрын
If you dry run the test cases, then you'll get the intuition. I also did this during the contest.
@shubham_jha
@shubham_jha Ай бұрын
Realisation 👍
@priyanshusingh3208
@priyanshusingh3208 Ай бұрын
For problem B at 25:40 can't i take the whole grid as a subrectangle an just change the diagonal elements as required ? why do smaller subrectangle and complicate things?
@AyushVerma-ui7re
@AyushVerma-ui7re Ай бұрын
@@priyanshusingh3208 because he was trying to explain that every rectangle operation can be broken into multiple 2X2 square operations thus reducing the complexity of the question. You can just think it in a much simpler way.
@adii16089
@adii16089 Ай бұрын
Thank you sir..
@aniket6817
@aniket6817 Ай бұрын
🙏
@Sinchland
@Sinchland Ай бұрын
IICPC ❤
@siddheshpandey7905
@siddheshpandey7905 Ай бұрын
How to think about the solution of second question?
@akashsonar6332
@akashsonar6332 Ай бұрын
I like how he🫡 explained the Q2 problem, about how the AUTHOR would have want us to do..
Codeforces Round EPIC Round | Video Solutions - A to D1 | by Abhinav Kumar | TLE Eliminators
1:27:18
Codeforces Round 962 | Video Solutions - A to F | by Raghav Goel | TLE Eliminators
1:50:12
TLE Eliminators - by Priyansh
Рет қаралды 4,1 М.
Pool Bed Prank By My Grandpa 😂 #funny
00:47
SKITS
Рет қаралды 19 МЛН
The Giant sleep in the town 👹🛏️🏡
00:24
Construction Site
Рет қаралды 18 МЛН
小丑把天使丢游泳池里#short #angel #clown
00:15
Super Beauty team
Рет қаралды 39 МЛН
❌ Don't Run Behind 500 LEETCODE Problems ❌ Focus on QPCD
8:31
Codeforces Round 965 (Div 2) | Video Solutions - A to D | by Abhinav Kumar | TLE Eliminators
1:43:45
I challenged Eugene. It was a mistake.
31:21
GothamChess
Рет қаралды 261 М.
MIT Introduction to Deep Learning | 6.S191
1:09:58
Alexander Amini
Рет қаралды 482 М.
How to choose the right level at TLE Eliminators?
3:30
TLE Eliminators - by Priyansh
Рет қаралды 2,1 М.
Codeforces Round 667 (Div. 3) Stream + All Solutions (A-F) (+ extra)
3:55:56
Codeforces Round 955 | Video Solutions - A to D | by Abhinav Kumar | TLE Eliminators
1:48:42
TLE Eliminators - by Priyansh
Рет қаралды 6 М.
Pool Bed Prank By My Grandpa 😂 #funny
00:47
SKITS
Рет қаралды 19 МЛН