in the problem (A): even if the same is leading before and after Dima saw the score, there is still a scenario where the scores gets equalised... for instance initial score: 3:2 final score : 4:3 3:2 *3:3*(equal) 4:3 and so on.... explain?
the question was is there a chance two teams were not equalized. Not is there a chance two teams are equalized. if the score was 3 : 2 before and the score became 4 : 3 later. There is a scenario where the score was not equal. for example :- 3 : 2 -> 4 : 2 -> 4 : 3
for(int i = 0, j = 0; j < n;){ if(total < l) total += a[j++]; if(total >= l and total r and i < j) total -= a[i++]; } can some one find the corner case for this ? its getting wrong on case 96.
Sir I gave the contest yesterday and I wasn't able to solve any of these questions ..I have been learning DSA since 1-2 month ..Sir should I continue giving these contests or should I only practice in Leetcode?? Though I understood your explanations.. I have I doubt that is looking solution making me weaker or stronger in coding.. Sir what do you suggest??
See, When u give the contests.. then only u can know.. how much u know. U can practise a lot.. but, solving problems in practise, and during a live contest (under time pressure and all), are different things. That's y giving contests is important. Now, since u r beginning.. there is no problem if u aren't able to solve any ques during the contest.. as u give more contests, u will start to improve there. What i would advise is, u can start with codechef and atcoder(beginner contest) 1st.. in CF u can give div3/div4.. but, div2 is a bit higher level for a beginner, u can leave that for now.
i have a doubt for soccer quetion if initial score are 1,2 and final goals are 4,5 so according to CF No draw can happen but i can prove that draw is possible 1 2 2 2 3 2 4 2 4 3 4 4 4 5
Can anyone tell why wrong answer 475th numbers differ - expected: '1', found: '0' void solve() { ll n, l, r; cin >> n >> l >> r; v(n); stackst; for (int i = n - 1; i >= 0; i--) st.push(v[i]); ll cnt = 0; while (!st.empty()) { if (st.top() >= l && st.top() = l && st.top() = l && sum
You are not counting all the cases for example take this test case 3 8 11 2 3 7 your code will give 0 but the answer should be 1 as 3 + 7 is in the given range but you don't consider this by this method as you are adding 2 and 3 and then checking for 5 + 7 and popping out all of them dry run if you didn't understood
Please fill the feedback form: forms.gle/8nWcWEMQqBGshTH66
Best channel for promoting CP culture in India
The way u explained Problem D is so awesome. Tx
Great Intuition and Explanation for D.
please increase audio quality
Damnn so smooth explanation of D... Lot's of love ❤❤
Very good explanation . Thankss !
ur explenation is too good
thanks. very good explanation of A,B
Awesome explanation
Thanks for the solution video ❤
Thanks a lot
Good explanation
in the problem (A):
even if the same is leading before and after Dima saw the score, there is still a scenario where the scores gets equalised...
for instance
initial score: 3:2
final score : 4:3
3:2
*3:3*(equal)
4:3
and so on....
explain?
same doubt
the question was is there a chance two teams were not equalized. Not is there a chance two teams are equalized.
if the score was 3 : 2 before and the score became 4 : 3 later. There is a scenario where the score was not equal. for example :-
3 : 2 -> 4 : 2 -> 4 : 3
Thanks bro!
for(int i = 0, j = 0; j < n;){
if(total < l) total += a[j++];
if(total >= l and total r and i < j) total -= a[i++];
}
can some one find the corner case for this ? its getting wrong on case 96.
can we solve the third question using prefix sum
Sir I gave the contest yesterday and I wasn't able to solve any of these questions ..I have been learning DSA since 1-2 month ..Sir should I continue giving these contests or should I only practice in Leetcode?? Though I understood your explanations.. I have I doubt that is looking solution making me weaker or stronger in coding.. Sir what do you suggest??
How much DSA u have completed
See, When u give the contests.. then only u can know.. how much u know. U can practise a lot.. but, solving problems in practise, and during a live contest (under time pressure and all), are different things. That's y giving contests is important.
Now, since u r beginning.. there is no problem if u aren't able to solve any ques during the contest.. as u give more contests, u will start to improve there.
What i would advise is, u can start with codechef and atcoder(beginner contest) 1st.. in CF u can give div3/div4.. but, div2 is a bit higher level for a beginner, u can leave that for now.
Awesome
what would be difficulty rating of problem b
kya pata kue ye 1200 ka hai but i think it must be 1400
i have a doubt
for soccer quetion
if initial score are 1,2 and final goals are 4,5 so according to CF No draw can happen but i can prove that draw is possible
1 2
2 2
3 2
4 2
4 3
4 4
4 5
bro they are not saying that draw will happen never they are asking whether there is any scenario when draw will not happen😂
@@Noob_Coder1234 yep aab saamjh aa gya
Ye loog bdi ajeeb statement likhte hain saare english ki aaise ki taise ho jati hai😭
@@user-nt8cn3pp5f ha sahi kaha muze bhi kal ka statement padhke samaj nahi aaya so sidha test cases pe gaya fir lages samjha kya Krna hain
@@Noob_Coder1234 wo to aacha hua kal contest nahi diya maine 😢
@@user-nt8cn3pp5f ha hamne diya mera gir gaya 🥲
Can anyone tell why wrong answer 475th numbers differ - expected: '1', found: '0'
void solve() {
ll n, l, r;
cin >> n >> l >> r;
v(n);
stackst;
for (int i = n - 1; i >= 0; i--) st.push(v[i]);
ll cnt = 0;
while (!st.empty()) {
if (st.top() >= l && st.top() = l && st.top() = l && sum
You are not counting all the cases
for example take this test case
3 8 11
2 3 7
your code will give 0 but the answer should be 1 as 3 + 7 is in the given range but you don't consider this by this method as you are adding 2 and 3 and then checking for 5 + 7 and popping out all of them dry run if you didn't understood
@@paarthjindal4100 ohh! got it Thank you 🙂