- Видео 44
- Просмотров 10 242
Unfiltered Programmer
Индия
Добавлен 22 май 2023
I'm a software engineer, graduated from IIT ROPAR.
Uploading easy to understand tutorials for Codechef, Codeforces, Geeksforgeeks, and Leetcode Problems.
Uploading easy to understand tutorials for Codechef, Codeforces, Geeksforgeeks, and Leetcode Problems.
Transform string Codechef starters 172 solutions
Transform string Codechef starters 172 solutions
Просмотров: 177
Видео
Problem B - Cost of the Array codeforces round 1002 (Div. 2) solutions
Просмотров 34512 часов назад
Problem B - Cost of the Array codeforces round 1002 (Div. 2) solutions
Problem A - Milya and Two Arrays codeforces round 1002 (Div. 2) solutions
Просмотров 15212 часов назад
Problem A - Milya and Two Arrays codeforces round 1002 (Div. 2) solutions
White wall Codechef starters 171 solutions
Просмотров 25621 час назад
White wall Codechef starters 171 solutions
Swish Game Codechef starters 171 solutions
Просмотров 16221 час назад
Swish Game Codechef starters 171 solutions
Problem - B Clockwork codeforces round 1001 (Div 1 + Div 2) solutions
Просмотров 567День назад
Problem - B Clockwork codeforces round 1001 (Div 1 Div 2) solutions
Problem - A String codeforces round 1001 (Div 1 + Div 2) solutions
Просмотров 177День назад
Problem - A String codeforces round 1001 (Div 1 Div 2) solutions
Crazy jumping frogs Codechef starters 170 solutions
Просмотров 40614 дней назад
Crazy jumping frogs Codechef starters 170 solutions
Monster Monster Codechef starters 170 solutions
Просмотров 20214 дней назад
Monster Monster Codechef starters 170 solutions
Problem B - Kevin and Geometry codeforces round 999 (Div 1 + Div 2) solutions
Просмотров 27614 дней назад
Problem B - Kevin and Geometry codeforces round 999 (Div 1 Div 2) solutions
Problem A - Kevin and Arithmetic codeforces round 999 (Div 1 + Div 2) solutions
Просмотров 23914 дней назад
Problem A - Kevin and Arithmetic codeforces round 999 (Div 1 Div 2) solutions
Problem C - Game of Mathletes codeforces round 998 (Div. 3) solutions
Просмотров 22514 дней назад
Problem C - Game of Mathletes codeforces round 998 (Div. 3) solutions
Problem B - Farmer John's Card Game codeforces round 998 (Div. 3) solutions
Просмотров 52414 дней назад
Problem B - Farmer John's Card Game codeforces round 998 (Div. 3) solutions
Problem A - Fibonacciness codeforces round 998 (Div. 3) solutions
Просмотров 22014 дней назад
Problem A - Fibonacciness codeforces round 998 (Div. 3) solutions
Minimum cost to Make Arrays Identical Leetcode biweekly contest 148 solutions
Просмотров 11214 дней назад
Minimum cost to Make Arrays Identical Leetcode biweekly contest 148 solutions
Problem B - Find the Permutation codeforces round 997 (Div. 2) solutions
Просмотров 40121 день назад
Problem B - Find the Permutation codeforces round 997 (Div. 2) solutions
Problem A - Shape Perimeter Codeforces round 997 (Div. 2) solutions
Просмотров 36021 день назад
Problem A - Shape Perimeter Codeforces round 997 (Div. 2) solutions
Make K most frequent codechef starters 169 solution || Codechef starters 169 solutions
Просмотров 29221 день назад
Make K most frequent codechef starters 169 solution || Codechef starters 169 solutions
Hamming equivalent codechef starters 169 solution || Codechef starters 169 solutions
Просмотров 55921 день назад
Hamming equivalent codechef starters 169 solution || Codechef starters 169 solutions
Problem B. Crafting codeforces round 996 solution || Codeforces round 996 Div-2 solutions
Просмотров 63821 день назад
Problem B. Crafting codeforces round 996 solution || Codeforces round 996 Div-2 solutions
Problem A. Two Frogs codeforces round 996 solutions
Просмотров 14421 день назад
Problem A. Two Frogs codeforces round 996 solutions
zigzag grid traversal with skip Leetcode weekly contest 432 solution
Просмотров 10821 день назад
zigzag grid traversal with skip Leetcode weekly contest 432 solution
Count distinct elements in every window gfg potd solution
Просмотров 2028 дней назад
Count distinct elements in every window gfg potd solution
Indexes of subarray sum gfg potd solution || Geeksforgeeks potd solutions
Просмотров 5028 дней назад
Indexes of subarray sum gfg potd solution || Geeksforgeeks potd solutions
Binary removals codechef solution || Codechef starters 168 solutions
Просмотров 20228 дней назад
Binary removals codechef solution || Codechef starters 168 solutions
Make odd codechef solution || Codechef starters 168 solutions
Просмотров 13228 дней назад
Make odd codechef solution || Codechef starters 168 solutions
Big Achiever codechef solution || Codechef starters 168 solutions
Просмотров 4428 дней назад
Big Achiever codechef solution || Codechef starters 168 solutions
Count the number of possible Triangles gfg potd solution || gfg potd solutions
Просмотров 10828 дней назад
Count the number of possible Triangles gfg potd solution || gfg potd solutions
3412. Find Mirror score of a string leetcode
Просмотров 61Месяц назад
3412. Find Mirror score of a string leetcode
Problem B - Gorilla and the exam codeforces solution || Hello 2024 codeforces solutions
Просмотров 185Месяц назад
Problem B - Gorilla and the exam codeforces solution || Hello 2024 codeforces solutions
upload more of these...good explanation in short time.. straight to the point. love from Bangladesh
Thanks 😊
I was thinking about creating videos but not getting time, you are explaining well, keep it up. 😊
thank you sir
bhaiya please solve the problem no. 5, 6, 7
Bhai maine set ke jagha vector use kiya and mathmatically solve kiya two index to substrate kaar ke and multiply kaar ke ek hi baar but error aya
Bhai please tell me which rating range ai should practice the most to get pupil on cf ? Matlab pupil ke liye div 2 A and B Krna hota hai toh div 2 B ki on average rating Kya hoti hai ?
If you want to become pupil then you should practice problems with rating 1200, 1300, and 1400... And there is a sheet CP 31 where you can find the best problems to practice. I'm going to start a playlist on that soon...
@@UnfilteredProgrammer thanks a lot!!! I am already doing 1000 rated from ACD ladder
Thanks for explanation
nice explanation
CODE ??
Great explanation...keep the work up snd try to upload codeforces A B solutions too 🎉
I upload solutions for codeforces also...
Bro cp 31 apne explanation se upload kardo pls 🙏
Sure I will make a playlist for that.
nice explanation , I follow your channel for codeforces . If possible to share a code with explanation so can you do this
@@roshankawale720 sure... I will do that.
what will be the output for 1,1,3 with k=2
Here output will be 1.
bhaiya code v provide kra dijiye
#include <bits/stdc++.h> using namespace std; int main() { int t; cin>>t; while(t--){ int n,temp,odd=0; cin>>n; for(int i=0; i<n; i++){ cin>>temp; //Count odd elements... (n-odd will be the even elements) if(temp&1) odd++; } //Checking if even elements zero... then output will be odd-1 if(odd==n){ cout<<odd-1<<endl; continue; } //if there are some even elements... then output will be odd+1 cout<<odd+1<<endl; } }
brother your teaching is soo good but if possible please try to improve the voice quality thank you soo much
Thanks for the feedback! 😃
give me your codefroces handle name
Hey Guys, I missed one point while explaining the solution.. 😊 6:05 at this point we need to check for a2, a3, and a4 if one of them is not equal to 1 then output will be 1 otherwise 2. Because a4 can be the first element of the even index subarray so we need to check for a4 also. 8:38 here also we need to check from a2 to a6... If one of them is not equal to 1 then output will be 1 otherwise 2. We need to check from a2 to the first element of the k-1 elements. Thanks!
thanks bro
Sir like given suppose 1 1 1 1 1 1 1 1 2 n=9, k=2 So sir acc to you i will leave the k-1 element from last like i left(2-1) elemnent from last let it be element 2 which i left.. Now so i will check from a2 which is 1 till a8 now here all element are equal to 1 so i will output 2 But sir the ans should be 1 n ?? as i can do partion from a1 to a8 element in index 1 and element 2 at index 2 so while making array b I will push index 2 element which is 2 and 0 So at first position only my 2 is not equal to index 1 so print 1 ?? Please tell sir
@@Vivekrathore6294 yes you are right... I missed one point while explaining... We leave k-1 elements from left and now if remaining elements are a1 to ai.... Then we need to check from a2 to a(i+1) if any of them is not equal to 1 then output will be one otherwise it will be 2. Ex: 1 1 1 1 1 1 2 3 4 n=9 and k=4 So we skip k-1(i.e 3) elements from left [2,3,4]... Now we need to check for these elements a2 to a7.... Because a7 can be the first element of the even index subarray here! Thanks for pointing out this mistake! 😄 We are leaving the k-1 elements but checking from a2 to first element of the k-1 elements... I hope this helps!
@@UnfilteredProgrammer yes sir got it
Bhai b ka solution post kro
Uploaded
Did u get q2.
Last Testcase messed entire logic
Uploaded
how should we know that we should use setor map for any question
please respond
If you want to store only unique keys then we use set and if you want to store the data in key-value pair then we use a map. Ex: Given an array print all unique elements... In this case we can use a set... Because it will store all the unique elements. Ex-2: Given an array... Print the frequency of all the elements.. In this case we need to store both elements and their frequency... That means we need a key-value pair... So we will use a map here... I hope this helps... Thanks!
Sir, Can you please nake a playlist for learning DSA ... you're explaining very well... nice work..
@@NitinSharma-xy6fx Bro I have a plan for that... To make playlist for DSA and Competitive programming.... But currently I don't have that much subscribers.... So that's my future plan... Once we have a significant amount of subscribers...
sir please explain the code part also so that we could also build our implementation skill
Sure... I will do that... Thanks for your feedback...
sir ese hi video bnate rho ... your channel will grow exponetially after some time
Thanks 😊
@@UnfilteredProgrammer Your channel will grow soon....Just wait and watch 👍 Keep doing... Also please provide A and B also from further contest 👍
@@catspeaking7 Thanks for your support 😊
Bhai apne ye approach socha kaise? muze samz mai hi nahi ata konsa approach lagana hai?
@@aniruddhadabade4198 just by following the given two conditions..
@@UnfilteredProgrammer aap contest ke problems kaise solve kr sakte ho muze codechef contest mai sirf first 2 hi ate hai baki ke nahi ate kuch suggest kr sakte ho kya ki mai kaise improve kru? please help krdo?
@@aniruddhadabade4198 brother you need to solve more problems for practice.... Try to solve problems with the Rating=your current rating + (100, 200, and 300)... Firstly try to solve it by yourself with atleast 2 or 3 attempts... If you are not able to solve the problem then watch the video tutorial.... And even if you are able to solve the go and analyze the others code...
@@UnfilteredProgrammer ok bro
Thanks bro
How can you take n=8
To prove the second condition that it is impossible to win if we have n=8 and given M moves like this: SSPSP
@UnfilteredProgrammer but if we take n=7 it is also possible to lose the game
@@AnujKumar-y5q9o yes you are right... But we are considering the edge case here.
#include <bits/stdc++.h> using namespace std; int check(string &s, string pattern) { int count=0; int n=s.length(); for(int i =0; i<n; i++){ if(s[i]!= pattern[i%3]) count++; } return count; } int main() { int t; cin>>t; while(t--){ int n, min_changes = INT_MAX; cin >> n; string s; cin >> s; vector<string> patterns = {"RGB", "RBG", "GRB", "GBR", "BRG", "BGR"}; for(string pattern : patterns){ min_changes = min(min_changes, check(s, pattern)); } cout<<min_changes<<endl; } return 0; }
B number please explain
Uploaded video
can you give me your code because i am anable to implement it
#include <bits/stdc++.h> using namespace std; #define int long long signed main() { int t; cin >> t; while (t--) { int n; cin >> n; vector<int> v(n); map<int, int> mp; for (int i = 0; i < n; i++) { cin >> v[i]; mp[v[i]]++; } vector<int> d; int flag = 0; for (auto it : mp) { if (it.second > 3) { cout << it.first << " " << it.first << " " << it.first << " " << it.first << endl; flag = 1; break; } if (it.second >= 2) { d.push_back(it.first); } } if (flag) continue; if (d.size() == 0) { cout << -1 << endl; continue; } if (d.size() > 1) { cout << d[0] << " " << d[0] << " " << d[1] << " " << d[1] << endl; continue; } vector<int> ans; int duplicate = d[0]; int count = 0; sort(v.begin(), v.end()); for (int i = 0; i < n; i++) { if (v[i] == duplicate) { if (count >= 2) ans.push_back(v[i]); count++; } else { ans.push_back(v[i]); } } for (int i = 1; i < ans.size(); i++) { if (ans[i] - ans[i - 1] < 2 * duplicate) { cout << duplicate << " " << duplicate << " " << ans[i - 1] << " " << ans[i] << endl; flag = 1; break; } } if (!flag) { cout << -1 << endl; } } return 0; }
Sir, when we move forward, I understand difference will be n-i-1 but when going backwards ahould it not be i-1 and not just i.
We are using zero based indexing here.... So it will be i.... in this case here...
sir provide the code also so that we could understand better... your teaching style is amazing you can make a place in competetive programming .. just provide the solution also as we are begineer's
@@Mukul-k4o bro code is added in the comment section!
Sir try to upload the solution of c and d problem of codeforces also along with a and b as your explanation are very crystal clear please 😊😊
Sure bro!
thanks man! great explanation, bhai thoda ek doubt tha. I've reached specialist before on cf but I'm not able to do well on adhoc problems/ greedy and feel realy dumb sometimes, any tips on what or how do I improve would be really appreciated
You need practice... Try to solve problems with rating = Your Current Rating + (100, 200, 300)....
Thank you bhai, i was very close to solving this but my dumbass couldnt figure out the formula
thanks bro👍👍
Great explanation bro!!
You have great skills but try to teach on some excalidraw or similar to grow more .
nice bhaiya❤❤❤❤
bhai +2 ka case keise , hamesha -2 ya 0 hi hoga na (difference between indexes)
Because they are moving away. Suppose i =2 and j=6 then in the next case i=1 and j =7 so initially it is 6-2=4 and now it is 7-1=6
@@tanujagoli3625 if i is 2 and j is 6 shouldn't lower index move right and higher index move left i.e. i =3 and j = 5
PLZ bro make a video on how to think when solving questions like these especially when graphs/maths is involved
Bhai ekdam badhiya explanation, bohot derr se confuse tha mai
My brain was lost during solving this question
great explanation
#include <bits/stdc++.h> using namespace std; int main() { int t; cin>>t; while(t--){ int n,temp,even=0,odd=0; cin>>n; for(int i=0; i<n; i++){ cin>>temp; if(temp&1) odd++; else even++; } cout<<max(odd,even)<<endl; } }
#include <bits/stdc++.h> using namespace std; #define int long long signed main() { int t; cin>>t; while(t--){ int n,x; cin>>n>>x; vector<int>v(n); for(int i=0; i<n; i++) cin>>v[i]; sort(v.begin(), v.end()); int mx=0; for(int i=0; i<n; i++){ v[i]=v[i]+x*(n-i-1); mx=max(mx,v[i]); } cout<<mx<<endl; } }
bro can you upload qUesTs (Easy) sol
please upload solution of qUiRkY qUesTs (Easy) problem . Thank you
Can u share ur cf profile?
Bhai, ye 2a>b-c condition kaha pata chali aapko
editorial