Codeforces Round 972 (Div 2) | Video Solutions - A to E | by Gaurish Baliga | TLE Eliminators

Поделиться
HTML-код
  • Опубликовано: 9 ноя 2024

Комментарии • 33

  • @TLE_Eliminators
    @TLE_Eliminators  Месяц назад +1

    Please fill the Feedback form for PCD: forms.gle/7bQH8sLcTpFDQGU26

  • @shreyanshjain1595
    @shreyanshjain1595 Месяц назад +5

    best ever PCD ❣
    keep him in every pcd please😭

  • @mursalinhawlader6407
    @mursalinhawlader6407 Месяц назад +8

    this teacher ka solution daily chai

  • @nemesis5391
    @nemesis5391 Месяц назад +1

    In B for the case when David is between teachers we know that David is going to the middle of left and right values optimally so we can just use that and our answer will be min(distance of mid from left, distance of mid from right)

  • @achintyachauhan350
    @achintyachauhan350 Месяц назад +1

    For A. i created an empty string s, and a vowels consisting all vowels, then ran a looop from i to n and added vowels[i%%5] to the s string , and at last sorted the s string , and all done .

  • @ramchhabra1223
    @ramchhabra1223 Месяц назад +1

    nice solution and elegant explanation

  • @vikassharma4-yearb.tech.mi375
    @vikassharma4-yearb.tech.mi375 Месяц назад +2

    For solution B1 & B2 -
    if (right ==m ) cout

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

    For A we can just use a frequency array and set count of every vowel as n/5 and then increase each vowel for each extra required ie n%5, and use ans+=string (freq[i], vowel [i])

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

      would u please provide me your code

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

      @@hitesh1800 #include
      using namespace std;
      #define ll long long
      int main(){
      int t;
      cin>>t;
      while(t--){
      int n;cin>>n;
      string str="";
      string vowel="aeiou";
      if(n>5){
      int freq1=n/5;
      int extra=n%5;
      vector freq(5);
      for(int i=0;i

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

      @@hitesh1800 #include
      using namespace std;
      #define ll long long
      int main(){
      int t;
      cin>>t;
      while(t--){
      int n;cin>>n;
      string str="";
      string vowel="aeiou";
      if(n>5){
      int freq1=n/5;
      int extra=n%5;
      vector freq(5);
      for(int i=0;i

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

      @@hitesh1800 #include
      using namespace std;
      #define ll long long
      int main(){
      int t;
      cin>>t;
      while(t--){
      int n;cin>>n;
      string str="";
      string vowel="aeiou";
      if(n>5){
      int freq1=n/5;
      int extra=n%5;
      vector freq(5);
      for(int i=0;i

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

    Thank you so much

  • @sukumarsawant
    @sukumarsawant Месяц назад +1

    Upsolving A & B

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

    will the approach to C work if the strings have different lengths?

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

    In your C solution you also get WA just bcz of not taking letter in a variable name temp . But I don't understand why. Can you please tell why?

  • @shreyanshjain1595
    @shreyanshjain1595 Месяц назад +1

    PLEASE UPLOAD ATCODER SOLUTIONS ALSO😭

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

    for the first question i used this :
    cout

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

    I'm not getting B1 at all . If the teachers are moving simulatenously then the gap just keeps increasing lets say we have the teachers at 2 and 60 and david at 4 . Now if the teachers want to close in the gap , if one teacher goes to 3 the other teacher will go to 61 . Like david can keep going ahead in the case . How will the gap close ? if we are moving david to the middle how will the gap close ??

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

      Its not necessary that all teachers move in the same direction. 2 teachers can move in different directions. So one teacher would move to 3 and the other to 59

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

      @@gaurishbaliga3723 Oh shoot . I read the statement wrong sorry . After your comment I tried to configure out the approach by myself I don't get it why it's wrong can you please help me ?? What I'm basically doing is calculating the middle value of both the teachers for the last case . T1 + T2 / 2 and then I know that david will definitely move to this middle value and those steps would be counted and also along with that the distance between the min teacher and david will also be counted . So the final distance is (T1 + T2)/2 + minDis of david from either of the teacher . I tried really hard to find the issue but I can't think of any : (

  • @studyplanet4656
    @studyplanet4656 Месяц назад +2

    Bro,
    Recently Open AI launched their new model which can solve codeforces problem rated upto 1600 -1800 with ease , there are a lot of cheaters which will use this for their advantage . But for tier3 person getting a good rank will help in getting referral for off campus placements . People who don't want to cheat focus solely on improving their problem solving and get good ranks which ultimately help in getting referrals , but due to cheating all these rankings will be considered of no use because there might be some people who have cheated to get those ranks . So what should we do . Please have some discussion on it . Will there be any credibility of these ratings in futures or all hardwork will go in vain .

    • @sachinboreoffl
      @sachinboreoffl Месяц назад +1

      Cheaters can solve using AI in contests but will struggle in interviews...
      So just Focus on improving ourselves rather than focusing on the rank we get in the contests

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

      Then tell your tier 3 groups to stop cheating cause it's not iit nit iiit guys that used to cheat (even if they did numbers were still low)

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

      If your sole purpose of cp is landing a job then lets be honest even you would have cheated atleast once in your life in cp.

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

      @@anonymousduel7370 Bro , actually it's not about IIT , NIT or IIIT or any tier 3 college .
      It's more about the credibility of those rankings or ratings . At the end , who will suffer especially the hard working ones .

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

      @@sachinboreoffl Yes you are saying correct .

  • @shreyanshjain1595
    @shreyanshjain1595 Месяц назад +1

    how is solution to the problem C is getting accepted?
    tc->O(n*m*5*t)==10^11??

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

      The sum of all n * m over all testcases is

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

      Because of the constraint "The sum of values of n⋅m over all test cases does not exceed 1e6."
      So over all TCs we have Summation(n*m)

  • @mursalinhawlader6407
    @mursalinhawlader6407 Месяц назад +1

    this teacher ka solution daily chai

  • @mursalinhawlader6407
    @mursalinhawlader6407 Месяц назад +3

    this teacher ka solution daily chai