Armaan Dutt
Armaan Dutt
  • Видео 17
  • Просмотров 11 504
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...
Просмотров: 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

Комментарии

  • @harshmittal6461
    @harshmittal6461 17 дней назад

    expert in explanation too !!

  • @vikasseervi1500
    @vikasseervi1500 17 дней назад

    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.

    • @armaan1610
      @armaan1610 17 дней назад

      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.

    • @vikasseervi1500
      @vikasseervi1500 16 дней назад

      @@armaan1610 Sorry, I didn't saw that part😅

  • @rohitkumarpilania94
    @rohitkumarpilania94 17 дней назад

    why do you start from C and not A

    • @armaan1610
      @armaan1610 17 дней назад

      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.

  • @kshitiz6376
    @kshitiz6376 18 дней назад

    Thanks for the explanations, it was really helpful.

  • @manasandmohit
    @manasandmohit 19 дней назад

    were you streaming during the contest, why though!?

    • @codingalley6229
      @codingalley6229 19 дней назад

      nah, he posted it after contest

    • @armaan1610
      @armaan1610 19 дней назад

      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.

    • @manasandmohit
      @manasandmohit 19 дней назад

      @@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.

  • @harshmittal6461
    @harshmittal6461 Месяц назад

    Really helpful video broo

  • @top_10_2.O
    @top_10_2.O Месяц назад

    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.

    • @armaan1610
      @armaan1610 Месяц назад

      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

  • @gauravpunia4527
    @gauravpunia4527 Месяц назад

    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

    • @gauravpunia4527
      @gauravpunia4527 Месяц назад

      if no diff then why it is not accepted

    • @armaan1610
      @armaan1610 Месяц назад

      @@gauravpunia4527 your code is absolutely correct. but the thing is 'ans' variable is overflowing . make it long long . then it will 'accepted'

    • @armaan1610
      @armaan1610 Месяц назад

      @@gauravpunia4527 code link: codeshare.io/XLK4Vn

  • @meenadhoundiyal3212
    @meenadhoundiyal3212 Месяц назад

    Nice 👍

  • @TheAI-Tutor
    @TheAI-Tutor Месяц назад

    brother since how long you're coding and giving contests? How to improve logic building mere bhai? Pls tips dedo

    • @armaan1610
      @armaan1610 Месяц назад

      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.

  • @saradagarwal7734
    @saradagarwal7734 Месяц назад

    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"); } } } }

    • @armaan1610
      @armaan1610 Месяц назад

      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

  • @top_10_2.O
    @top_10_2.O Месяц назад

    how your snippet is autosaved in the codechef ide

    • @armaan1610
      @armaan1610 Месяц назад

      in codechef code editor, there is a button 'save as template' in top right corner of the editor.

  • @harshmittal6461
    @harshmittal6461 Месяц назад

    Just always waiting for your videos guru !!!

  • @019_princeraj9
    @019_princeraj9 Месяц назад

    Bhaiya pls guide me i want to do an internship but dont know how to crack it pls make a separate video on it 😢

    • @armaan1610
      @armaan1610 Месяц назад

      Assignment kijiye aap

  • @tanjimahmed213
    @tanjimahmed213 Месяц назад

    nice explanation but improve sound quality

  • @AnshPr2311
    @AnshPr2311 2 месяца назад

    Bhaiya,wanted to ask a question where to ask? Mail or anything?

    • @armaan1610
      @armaan1610 2 месяца назад

      You can message me in LinkedIn. Profile link given in description

    • @AnshPr2311
      @AnshPr2311 2 месяца назад

      Premium access maangra

  • @GB-su9gu
    @GB-su9gu 2 месяца назад

    brother, i wanna to start cp woth Codeforces. Could you guide me

    • @armaan1610
      @armaan1610 2 месяца назад

      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💖

  • @mohd.tabishkhan4868
    @mohd.tabishkhan4868 2 месяца назад

    what is the name of the vscode extension which is having inputs ?

    • @armaan1610
      @armaan1610 2 месяца назад

      competitive programming helper - vs code Competitive Companion - chrome

  • @083_tusharsachdeva6
    @083_tusharsachdeva6 2 месяца назад

    Orz

  • @jesussavedme3507
    @jesussavedme3507 2 месяца назад

    Bhaiya i visited your linkedin profile, can you explain your protects too if possible, it would be a great thing 😅

    • @armaan1610
      @armaan1610 2 месяца назад

      I was actually thinking about making a playlist/tutorial of both my projects. I will definitely try to make this.🥰

  • @jesussavedme3507
    @jesussavedme3507 2 месяца назад

    Keep posting bro, i am also learning from you ❤

    • @armaan1610
      @armaan1610 2 месяца назад

      Thank you🥰, I will

  • @bollywoodboxoffice7017
    @bollywoodboxoffice7017 2 месяца назад

    how you setup vs code i am new in cp

    • @armaan1610
      @armaan1610 2 месяца назад

      there's nothing special in my setup, just a extension 'competitive programming helper', below is the installation guide ruclips.net/video/y87op-XjNqE/видео.html

  • @mayuradhayge9289
    @mayuradhayge9289 2 месяца назад

    Good bro

  • @rev_krakken70
    @rev_krakken70 2 месяца назад

    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?

    • @armaan1610
      @armaan1610 2 месяца назад

      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.

    • @rev_krakken70
      @rev_krakken70 2 месяца назад

      @armaan1610 So basically by using mask, we can actually represent the list of visited elements and incorporate it in dp

    • @armaan1610
      @armaan1610 2 месяца назад

      yes.. you are right

  • @shashankpandey6230
    @shashankpandey6230 2 месяца назад

    nice explanation

  • @achraffares3513
    @achraffares3513 2 месяца назад

    try speaking english please

  • @obamaengineer4806
    @obamaengineer4806 2 месяца назад

    very good explanation. but also include the codes in ur description as pastebin link. then entire video will be complete

    • @armaan1610
      @armaan1610 2 месяца назад

      Added the codes. Thanks

  • @harshmittal6461
    @harshmittal6461 2 месяца назад

    Thanks for such a nice explanation

    • @armaan1610
      @armaan1610 2 месяца назад

      Glad it was helpful!

  • @meenadhoundiyal3212
    @meenadhoundiyal3212 2 месяца назад

    Explained very well 👍

  • @xenon1787
    @xenon1787 2 месяца назад

    Please stop providing solutions during contests Otherwise you'll be banned from codeforces

    • @armaan1610
      @armaan1610 2 месяца назад

      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

    • @xenon1787
      @xenon1787 2 месяца назад

      @@armaan1610 Ok then I'm really sorry :(

    • @armaan1610
      @armaan1610 2 месяца назад

      its ok bro💖🤝. Enjoy the videos

  • @therawringkitty
    @therawringkitty 2 месяца назад

    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 😅

    • @armaan1610
      @armaan1610 2 месяца назад

      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.

  • @harshmittal6461
    @harshmittal6461 2 месяца назад

    Great explanation!

  • @meenadhoundiyal3212
    @meenadhoundiyal3212 3 месяца назад

    It's really helpful 👍

  • @respect-editz6918
    @respect-editz6918 3 месяца назад

    I want to also start dsa preparation From where should I start any resource

    • @armaan1610
      @armaan1610 3 месяца назад

      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).

  • @083_tusharsachdeva6
    @083_tusharsachdeva6 3 месяца назад

    Orz

  • @armaan1610
    @armaan1610 3 месяца назад

    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

  • @meenadhoundiyal3212
    @meenadhoundiyal3212 4 месяца назад

    I was waiting for your very informative video 🙏🙏

  • @meenadhoundiyal3212
    @meenadhoundiyal3212 5 месяцев назад

    Very helpful 🙏👍

  • @shashankpandey6230
    @shashankpandey6230 5 месяцев назад

    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 : )

    • @armaan1610
      @armaan1610 5 месяцев назад

      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

  • @meenadhoundiyal3212
    @meenadhoundiyal3212 5 месяцев назад

    🙏 Like the way of explanation sir

  • @B-NikhilRichhariya
    @B-NikhilRichhariya 5 месяцев назад

    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; }

    • @armaan1610
      @armaan1610 5 месяцев назад

      yeah i also thought O(1) solution must exist

  • @anishhazra2204
    @anishhazra2204 5 месяцев назад

    5 star🤩🤩

  • @meenadhoundiyal3212
    @meenadhoundiyal3212 5 месяцев назад

    Thank you sir 🙏

  • @meenadhoundiyal3212
    @meenadhoundiyal3212 5 месяцев назад

    Very informative 👍

  • @RohitKumar-dy2gc
    @RohitKumar-dy2gc 5 месяцев назад

    approach is good for D ques

  • @ayanroy4383
    @ayanroy4383 6 месяцев назад

    OP sir🔥🔥

  • @ghostbadfame2800
    @ghostbadfame2800 6 месяцев назад

    in batgrip tumhe kese pta chla ki n ko starting mein laa skte h

    • @armaan1610
      @armaan1610 6 месяцев назад

      BATGRIP wala question.. mostly intuition.greedy se hi kiya h...

    • @ghostbadfame2800
      @ghostbadfame2800 6 месяцев назад

      Bro thoda explanation de skte ho ya insta dede wha pt smjha do

    • @armaan1610
      @armaan1610 6 месяцев назад

      @@ghostbadfame2800 arma.an0804 .. dm me

  • @vapor-zd2rn
    @vapor-zd2rn 6 месяцев назад

    Fuck tourist, i'll watch this..

  • @SarojSharma-tc6nr
    @SarojSharma-tc6nr 6 месяцев назад

    Nice 👍

  • @SarojSharma-tc6nr
    @SarojSharma-tc6nr 6 месяцев назад

    Thankyou sir