- Видео 17
- Просмотров 11 504
Armaan Dutt
Индия
Добавлен 25 сен 2016
Codechef Starters 130 | Contest Screencast & Solution | Armaan Dutt
contest link - www.codechef.com/START130B
Social media & coding profiles -
- Linkedin - www.linkedin.com/in/armaan48/
- codeforces - codeforces.com/profile/Armaan48
- codechef - www.codechef.com/users/armaan48
- leetcode - leetcode.com/Armaan48/
Chapters
00:00 - ALBS ( thinking and coding )
5:37 - MKEQ ( thinking and coding )
9:57 - UPDA ( thinking and coding )
25:36- GDST ( thinking and coding )
58:28 - DFGF ( thinking and coding )
1:54:20 - ALBS ( solution )
2:04:02 - MKEQ ( solution )
2:12:20 - GDST ( solution )
2:27:50 - UPDA ( solution )
2:40:40 - DFGF ( solution )
algorithms
coding
programming
competitive programming
dsa
Codechef screencast
Codechef solutions
Codechef
Starters 130 screencast
Starte...
Social media & coding profiles -
- Linkedin - www.linkedin.com/in/armaan48/
- codeforces - codeforces.com/profile/Armaan48
- codechef - www.codechef.com/users/armaan48
- leetcode - leetcode.com/Armaan48/
Chapters
00:00 - ALBS ( thinking and coding )
5:37 - MKEQ ( thinking and coding )
9:57 - UPDA ( thinking and coding )
25:36- GDST ( thinking and coding )
58:28 - DFGF ( thinking and coding )
1:54:20 - ALBS ( solution )
2:04:02 - MKEQ ( solution )
2:12:20 - GDST ( solution )
2:27:50 - UPDA ( solution )
2:40:40 - DFGF ( solution )
algorithms
coding
programming
competitive programming
dsa
Codechef screencast
Codechef solutions
Codechef
Starters 130 screencast
Starte...
Просмотров: 256
Видео
Codeforces educational round 159 | Contest Screencast & Solution | Armaan Dutt
Просмотров 9546 месяцев назад
contest link - codeforces.com/contest/1902 chapters 00:00 - problem A ( thinking and coding ) 3:55 - problem B ( thinking and coding ) 23:38 - problem C ( wrong idea ) 49:13 - problem C ( thinking and coding ) 1:00:34 - problem D ( thinking and coding ) 1:25:50 - problem E ( thinking and trying ) 2:02:44 - problem A solution 2:05:08 - problem B solution 2:12:06 - problem C solution 2:25:44 - pr...
GYM #1 | Screencast and Solution | Armaan Dutt
Просмотров 1216 месяцев назад
problem links 1 - leetcode.com/problems/minimum-swaps-to-arrange-a-binary-grid 2 - leetcode.com/problems/minimum-number-of-days-to-make-m-bouquets 3 - leetcode.com/problems/get-the-maximum-score/ chapters 00:00 - Finding Problems 1:33 - problem 1 thinking 9:13 - problem 1 coding 18:53 - problem 2 ( thinking , coding ) 26:17 - problem 3 ( misunderstanding ) 38:47 - problem 3 ( thinking correctly...
Weekly contest 202 | Virtual Contest Screencast & Solution | Armaan Dutt
Просмотров 1226 месяцев назад
Weekly contest 202 | Virtual Contest Screencast & Solution | Armaan Dutt
Weekly contest 262 | Virtual Contest Screencast & Solution | Armaan Dutt
Просмотров 1016 месяцев назад
Weekly contest 262 | Virtual Contest Screencast & Solution | Armaan Dutt
expert in explanation too !!
2:34:32 What if we have same triplet like [1,3,6] and [1,3,6] is this case it wont satisfy the conditions right.
yes, that's why I am subtracting 3*cnt1[ same ]. Since exact same occurrence will be counted as 3 candidates, thus I removed all of its contribution.
@@armaan1610 Sorry, I didn't saw that part😅
why do you start from C and not A
problem A and B of div 3 are usually too easy, thus participants make a lot of submissions during first 10-20 mins resulting in longer queues. Thus, I start from C ( which usually takes me 10-15mins to solve ). But i dont recommend this to a rated participant.
Thanks for the explanations, it was really helpful.
were you streaming during the contest, why though!?
nah, he posted it after contest
i stream during contest. but stream remains private until the contest gets over. this makes the stream available to viewers asap. On the other hand, if i record and then upload, processing will take up to 4hr.
@@armaan1610 fair enough, now I understand, it's also good for us to learn what goes in your mind during the contest. Thanks for being honest.
Really helpful video broo
Glad it helped
many a times I am able to make a correct logic for the questions but fail in implementation , either it take a lot time to implement the logic or sometimes I can't implement it, Please suggest something to overcome, I will definitely work on that.
Do leetcode easy, medium for which you can make logic easily.. Then try to implement ki yourself.. If you can't or get stuck start reading editorial but in any case don't copy paste code... Understand and Implement ki yourself
User #include <bits/stdc++.h> using namespace std; void sol() { int n1,n2; cin>>n1>>n2; vector<int>v1(n1,0),v2(n2,0); int ans = 0; for(int i = 0; i < n1; i++) { int x; cin>>x; v1[i] = x; } for(int i = 0; i < n2; i++) { int x; cin>>x; v2[i] = x; } sort(v1.begin(),v1.end()); sort(v2.begin(),v2.end()); reverse(v1.begin(),v1.end()); reverse(v2.begin(),v2.end()); ans+=v1[0]+v1[1]+v1[2]+v1[3]+ v2[0]+v2[1]+v2[2]+v2[3]; if(n1 < 4 || n2 < 4 || n1+n2 < 11) { cout<<-1<<endl; return ; } int i = 4 ,j=4; for(int k = 0 ; k < 3; k++) { if(i < n1 && j < n2) { if(v1[i] >= v2[j]) { ans+=v1[i]; i++; } else { ans+=v2[j]; j++; } } else { if(i < n1) { ans+=v1[i]; i++; } else { ans+=v2[j]; j++; } } } cout<<ans<<endl; return; } int main() { int t; cin>>t; while(t--) { sol(); } } what is the difference between between my code and your code
if no diff then why it is not accepted
@@gauravpunia4527 your code is absolutely correct. but the thing is 'ans' variable is overflowing . make it long long . then it will 'accepted'
@@gauravpunia4527 code link: codeshare.io/XLK4Vn
Nice 👍
brother since how long you're coding and giving contests? How to improve logic building mere bhai? Pls tips dedo
I have been giving contests from last 3 years ig. about improving logic i think practicing harder problems than your comfortable rating range, makes you kill lower rating problem easily and fastly. so, just do problems 1. which are not unsolvable by you currently 2. and also not which you already can solve easily.
what is the problem in my code?????? ignore the commented part import java.util.*; class Codechef { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int t = sc.nextInt(); for (int i = 0; i < t; i++) { int n = sc.nextInt(); // Number of batsmen int m = sc.nextInt(); // Number of bowlers if(n>=4 && m>=4 && (n+m)>=11) { //permit to select the team members int batsman[]=new int[n]; for(int j=0;j<n;j++) { batsman[j]=sc.nextInt(); } int bowler[]=new int[m]; for(int j=0;j<m;j++) { bowler[j]=sc.nextInt(); } Arrays.sort(batsman); Arrays.sort(bowler); int bat=n-1; int bow=m-1; int sum=0; int c=4; while(c>0) { sum+=(batsman[bat]+bowler[bow]); bat--; bow--; c--; } //int pn=3;players neded is 3 as 8 are summed up //3---->bowlers //3---->batsman //3 bowlers or batsman for(int pn=0;pn<3;pn++) { if(bat>=0 && bow>=0) { if(batsman[bat]>=bowler[bow]) { sum+=batsman[bat]; bat--; }else{ sum+=bowler[bow]; bow--; } }else if(bat>=0) { sum+=batsman[bat]; bat--; }else{ sum+=bowler[bow]; bow--; } } System.out.println(sum); } else{ System.out.println("-1"); } } } }
bro i tried. and modified the code a bit. now it gives AC for first two and then runtime code ( I really don't know why ) - codeshare.io/nAPYjE
how your snippet is autosaved in the codechef ide
in codechef code editor, there is a button 'save as template' in top right corner of the editor.
Just always waiting for your videos guru !!!
Bhaiya pls guide me i want to do an internship but dont know how to crack it pls make a separate video on it 😢
Assignment kijiye aap
nice explanation but improve sound quality
I will try my best
Bhaiya,wanted to ask a question where to ask? Mail or anything?
You can message me in LinkedIn. Profile link given in description
Premium access maangra
brother, i wanna to start cp woth Codeforces. Could you guide me
cant guide much through RUclips replies. but I surely will consider to make some video like "codeforces beginner's guide" soon. till then you can search RUclips for someone else's tutorial ig. thanks for watching this video💖
what is the name of the vscode extension which is having inputs ?
competitive programming helper - vs code Competitive Companion - chrome
Orz
Bhaiya i visited your linkedin profile, can you explain your protects too if possible, it would be a great thing 😅
I was actually thinking about making a playlist/tutorial of both my projects. I will definitely try to make this.🥰
Keep posting bro, i am also learning from you ❤
Thank you🥰, I will
how you setup vs code i am new in cp
there's nothing special in my setup, just a extension 'competitive programming helper', below is the installation guide ruclips.net/video/y87op-XjNqE/видео.html
Good bro
For the last problem instead of a mask is it possible to use set or visited map something like that to store the song that I have visited. I mean what is the purpose of using mask here?
you can do it using visited map also, but then how will u do dp? mask is used to represent visited array in integer format and using mask u can do dp too.
@armaan1610 So basically by using mask, we can actually represent the list of visited elements and incorporate it in dp
yes.. you are right
nice explanation
try speaking english please
i will try🤝
very good explanation. but also include the codes in ur description as pastebin link. then entire video will be complete
Added the codes. Thanks
Thanks for such a nice explanation
Glad it was helpful!
Explained very well 👍
Please stop providing solutions during contests Otherwise you'll be banned from codeforces
All of my streams are private during the contest. I make them public 1-2hr after the contest is over. popular competitive programmers, also do the same. neal wu , umnik , second thread etc
@@armaan1610 Ok then I'm really sorry :(
its ok bro💖🤝. Enjoy the videos
How did you come to the conclusion that you can't use DP for C so quickly? Was it because of the constraints? I kept thinking that it was DP on trees question during the contest 😅
brute force dp, i figured out cant be used mainly because of constraints only( n and k were too big) . but the my final answer for C was kind of dp only.
Great explanation!
It's really helpful 👍
I want to also start dsa preparation From where should I start any resource
recommending resources for dsa is very hard, you gotta try options and choose what fits you best Regardless of the course you choose, make sure to practice solving the problems yourself on platforms like LeetCode and GFG (initially at least).
Orz
Problem D can be solved without 2 segment trees ( we can utilise left and right array for checking if a range has all element same ) submission link - codeforces.com/contest/1923/submission/248037070
I was waiting for your very informative video 🙏🙏
Very helpful 🙏👍
learned new insights on how to approach a question like an expert!! I don't know if you're intentionally doing it for some reason but I just wanna highlight that instead of doing manual debugging using debugger can speed up the process : )
Thanks! means alot!💖 and nah😅 , not doing manual debugging intentionally, I just don't know how to use the debugger. will try this thing for sure
🙏 Like the way of explanation sir
Minimise maximum subarray code: if(x-1 > y) { int division = ceil( (1.0)*x / (y+1) ); if(division >= 3) { division = x-2*y; } ans = division; } else { ans = 1; }
yeah i also thought O(1) solution must exist
5 star🤩🤩
Thank you sir 🙏
Very informative 👍
approach is good for D ques
OP sir🔥🔥
in batgrip tumhe kese pta chla ki n ko starting mein laa skte h
BATGRIP wala question.. mostly intuition.greedy se hi kiya h...
Bro thoda explanation de skte ho ya insta dede wha pt smjha do
@@ghostbadfame2800 arma.an0804 .. dm me
Fuck tourist, i'll watch this..
😂❤
Nice 👍
Thankyou sir