Your explanation is pretty straightforward and helpful ... Thanks a lot
@competitivecoding-newtonsc96012 жыл бұрын
Thanks Shivam :)
@mukundshah13142 жыл бұрын
Well Explained
@competitivecoding-newtonsc96012 жыл бұрын
Thanks Mukund
@ssv60552 жыл бұрын
thenks bhaiya!
@competitivecoding-newtonsc96012 жыл бұрын
No worries
@cristeinfuze85742 жыл бұрын
Your editorial helping me alot ..... Thank you !
@competitivecoding-newtonsc96012 жыл бұрын
Appreciate it Cristein :)
@maheriyajatinbharatbhai35382 жыл бұрын
best explanation keep it up 😍😇
@competitivecoding-newtonsc96012 жыл бұрын
Thanks Jatin
@thamidurandilbandara4152 жыл бұрын
sir, if i can't solve div2 C should i try to solve div2D so that i become good at div2C or keep practicing div2C?
@competitivecoding-newtonsc96012 жыл бұрын
Keep doing div2c, also this problem was bit harder than a normal div2c so don't worry that much.
@thamidurandilbandara4152 жыл бұрын
@@competitivecoding-newtonsc9601 thx
@AryanGupta-nt5qi2 жыл бұрын
I have a doubt, that why will long long underflow if the size of bad array is 0. Wouldn't it result in -1 ?
@competitivecoding-newtonsc96012 жыл бұрын
bad.size() returns unsigned int, and if you do -1 it will underflow.
@AryanGupta-nt5qi2 жыл бұрын
@@competitivecoding-newtonsc9601 okk thankyou got it
@AryanGupta-nt5qi2 жыл бұрын
@@competitivecoding-newtonsc9601 please share your discord link
@KCOpardeepkumarvishkarma2 жыл бұрын
why should we type cast v.size() I didn't get it how it will underflow In long long
@competitivecoding-newtonsc96012 жыл бұрын
What I meant to say was not long long, but return type of .size() is unsigned int so -1 will set it to INT_MAX.
@GAmil8902 жыл бұрын
Bro how we know wether we take that bad contest or not i cant understand it
@competitivecoding-newtonsc96012 жыл бұрын
You start with IQ q and try to attend all the contest starting from that bad contest. If while attending the contest your IQ drops less than 0, then you were not able to attend all the contests i.e. this bad contest doesn't obey the lemma and isn't part of the optimal solution.
@GAmil8902 жыл бұрын
Thx bro I understand it
@shantanukumar49582 жыл бұрын
Can you please make video on problem A of this contest ..i didn't get the concept 🥲
@competitivecoding-newtonsc96012 жыл бұрын
You can join the discord to discuss your doubt, will be hard to make a video now. discord.com/invite/aFBTauq
@shreyasjain93822 жыл бұрын
Going through your solutions after a bad contest really helps man :)
@competitivecoding-newtonsc96012 жыл бұрын
Glad to help
@kumaramit04-q6c2 жыл бұрын
I thought of backtracking first, where we can try by selecting or non selecting each of the elements to get the maximum. But i knew it'll give TLE😅
@competitivecoding-newtonsc96012 жыл бұрын
Yeah thats basically bruteforce lol
@boyidapumohit47152 жыл бұрын
@@competitivecoding-newtonsc9601 But I guess we can optimise that with dp? I tried to solve in dp, but couldnot implement in contest, BUt now got to know abut greedy sol\
@ahmednafis2 жыл бұрын
@@boyidapumohit4715 dp will have O(n ^2) solution which will also give TLE, also u cant store the DP under given constraints too.
@ganeshchowdhary30242 жыл бұрын
@@boyidapumohit4715 I tried DP knowing that it has a complexity of O(n^2). You have to find the total number of ones possible from each dp state and traverse the dp tree to find where we have taken one or zero. If nn then the answer is all ones. So it is O(n*n)
@sidharthdhiman45222 жыл бұрын
can you chnge your sublime theme if possible , like monokai if possible , in video sometimes not able to see the code clearly
@competitivecoding-newtonsc96012 жыл бұрын
You can see the code from CF profile. I will increase the font going forward.
@ankitghosh98732 жыл бұрын
Understood bt what is lemma!
@competitivecoding-newtonsc96012 жыл бұрын
Lemma is kind of a argument that proves a theorem.
@amchourasia2 жыл бұрын
10:50 got to know something that is really important for me
@competitivecoding-newtonsc96012 жыл бұрын
Glad it helped
@ganeshchowdhary30242 жыл бұрын
I think it is good to know both binary search and greedy solutions. Because, sometimes i felt that greedy solutions are quite intuitive and easy to get when compared to isPossible/checker function of binary search.
@competitivecoding-newtonsc96012 жыл бұрын
In this case, greedy was pretty hard to think about in my opinion. Almost all the top coders used binary search.
@kabboghosh18532 жыл бұрын
it's very hard to get this kind of lemma, i don't know how u find such kind of observations
@competitivecoding-newtonsc96012 жыл бұрын
I think what helped is that, if you give a bad contest, it will affect following contests and make some of them bad. So you want to give bad contests as late as possible. And don't be demotivated as this problem was way harder than a standard div2c, many Reds said the same thing so.
@kabboghosh18532 жыл бұрын
@@competitivecoding-newtonsc9601 thanks
@ganeshchowdhary30242 жыл бұрын
@@competitivecoding-newtonsc9601 Maximize - as late as possible, minimize - as early as possible. Makes sense
@realnight_bot25362 жыл бұрын
Wow🆒👍
@competitivecoding-newtonsc96012 жыл бұрын
:)
@realnight_bot25362 жыл бұрын
@@competitivecoding-newtonsc9601 could u please take a session on cf profile review, 🙂just for some advice and fun
@yourbestie41382 жыл бұрын
niceee
@competitivecoding-newtonsc96012 жыл бұрын
Thanks
@kuldeep-ju7iy Жыл бұрын
I have used lower bound but it is giving wa on test 3… I can also show my code can you pliss tell me why it is giving wrong ans… //Think twice code once :)) #include using namespace std; typedef long long ll; #define pb push_back typedef long double ld; //typedef __int128 lll; signed main(){ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); ll tt=1;cin>>tt;string pi = "3.141592653589793238462643383279"; while(tt--){ll n,q;cin>>n>>q;ll arr[n];ll a[n]={0};string s1="";ll b[n]; for(int i=0;i>arr[i];b[i]=arr[i]; }ll p=0; for(int i=0;i=n){u=n-1;} if(n-u>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>............................................ /*ll n,k;cin>>n>>k; if(n%2==0){ if(k%n)cout