Codeforces Round 953 (Div 2) | Video Solutions - A to E | by Abhinav Kumar | TLE Eliminators
Vložit
- čas přidán 28. 07. 2024
- Here are the video solutions in the form of a post-contest discussion for problems A, B, C, D, E of Codeforces Round 953 (Div 2). The live discussion was done with students of TLE Eliminators, this is the recording of the same. We hope this will be useful for you in up-solving this contest.
📢Check out handpicked problems by Priyansh himself, on our CP-31 sheet: www.tle-eliminators.com/cp-sheet
Solution Codes:
Problem A: codeforces.com/contest/1978/s...
Problem B: codeforces.com/contest/1978/s...
Problem C: codeforces.com/contest/1978/s...
Problem D: codeforces.com/contest/1978/s...
Problem E: codeforces.com/contest/1978/s...
Be sure to check out TLE Eliminators.
Website: www.tle-eliminators.com/
Instagram: / tle_eliminators
Linkedin: / tle-eliminators
Twitter: / tle_eliminators
TLE Community Discord Server: / discord
Timestamps:-
0:00 Problem A
8:30 Problem B
25:00 Problem C
50:34 Problem D
1:19:03 Problem E
Please fill the feedback form: forms.gle/z8u7vtMJUXQFhKKy8
the way of his teaching and his sound is great.
Just listening the idea a lttle bit I can able to implement whole code. That how his intitution made. Thanks abhi
This guy just nailed a div 2 comtest like div 4
abhinanv your explanation is amazing. Keep it up.
In E, no need of running for loop from l to l+1, only checking for l+1 suffices the condition, because for i==l if s[i]=='0', req[i].first can never lie in l to r
You and @nicspyy are the only masters that can demystify Division 2 Codeforce Challenges for dummies like me ❤ from NY
Hi Bhaiya, when is the next batch for level 1 starting?
what generation mic are you using?
What was all that about E the way Abhinav explained it made it sooo easy
Batch 10.0 enrollment when?
When will next batch starts.badly needed.
hello, thank you for your incredible efforts in CP. I would to inform you that there is a problem in CP-31 sheet as all the problems disappeared and showing that there is an error in fetching problems
Me too, I hope fix this problem as soon as possible
@@mohamedtamer9041 جرب تمسح الcookies اللي في الموقع و جرب تاني
انا عملتها اشتغلت معايا
for B i have done turnary search
In D's first test case (2,0,3), if 3rd candidate (3) is max, why does it needs to remove 2 more candidates for making him win ? and if that's the case then in last test case, 4th candidate (3) would have needed 3 candidates to win not 0.
I think u didn't understand the problem statement well. Please read it again or rewatch the explanation.
here, in the 1st test case, there is also "c=1", which means that "1 person" who is undecided would vote for the candidate with lowest number (i.e. candidate 1), so votes of 1 also becomes 3, and he being lower numbered would win (not 3).
while in the last test case, c=0.. so there is no undecided people.. so candidate 4 wins having most votes(and lowest no. among tied people).
The logic to E about we only needing to check l,l+1 and r-1,r is not clear
🔥 🔥
why is the audio so bad
if(b-a>=n-1){
int ans=b*(b+1)/2 - (b-n)*(b-n+1)/2;
cout
It's nothing but addition of b to b-n+1
@@ym-kg7so not that wanna ask why we re doing this b-a>=a what is the intuition
@@ankitghosh9873 if diff between b and a is greater than or equal to n then it's better to take b , b-1 , ....b-n+1(all are greater than a). If the diff between b and a is less than n you take all elements between b to a and rest all elements as a to maximize.
@@ym-kg7so Got it,thanks buddy.
how you took int K , it is 10^12
you can define "int" as "long long" using #define
@@harshitshukla1974 may be he is using it like that 😮💨
@@Rlxn5yepp.. i've done that only.
#include
using namespace std;
#define int long long
void solve(){
int n,k; cin>>n>>k;
vector v(n);
for(int i=0;i
*if(v[l] + (k/2) > n)* should be replced by *if(v[l] + (k/2) > n-l)*
@@abhinavkumariitism thanks bro it got accepted