Codeforces Round 966 (Div. 3) || Editorial for Problem A,B,C,D,E

Поделиться
HTML-код
  • Опубликовано: 12 сен 2024
  • A. Primary Task || B. Seating in a Bus || C. Numeric String Template || D. Right Left Wrong || E. Photoshoot for Gorillas
    contest URL: codeforces.com...
    Contact me:-
    LinkedIn - / swapnil-tayal-53a5b4221
    Instagram - / swapnil_tayal
    #codeforces #cp #cpp #educational #EducationalCodeforces #div3 #div2 #codeforcessolutions #editorial #educationalstory #Codeforces966 #966

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

  • @mr.kamina3364
    @mr.kamina3364 Месяц назад +1

    nice explanation bro keep it up

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

      @@mr.kamina3364 thanks bro ✨

  • @PratikDongare-bh2vs
    @PratikDongare-bh2vs Месяц назад +1

    good explaination

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

      thanks bro💕💕

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

    good job

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

      @@blackvelta1913 thanks ✨

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

    nice explanation bhaiya

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

      @@ashish3487 thanks bro ✨

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

    Hey bro , could you make a video on how to get started with competitive programming? It would be great if you could also share how you manage to solve all four questions in LeetCode contests, along with tips for improving problem-solving skills and practicing effectively. If making a video isn't possible, a detailed reply would be much appreciated!

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

      @@GAGGZz Hii,
      actually I was planning to make such video from long time ago, will be releasing too, but I guess not now,
      Instead we can talk on LinkedIn I will surely help you in the way I can

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

      Ok bro
      I will message you on LinkedIn

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

      @@GAGGZz sure

  • @Entertainmentexe
    @Entertainmentexe 29 дней назад +1

    Expected difficulty level of D and E?

    • @nicspyy
      @nicspyy  29 дней назад +2

      @@Entertainmentexe D 1200, E 1400-1500

  • @AnshGupta-cq2rr
    @AnshGupta-cq2rr Месяц назад +1

    I have doubt in e can't I right bottom as min(n,i+k-1)

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

      @@AnshGupta-cq2rr think once more like we are calculating the bottom value, not necessarily every time bottom will be in "bottom of the current cell" but can be above also

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

      @@AnshGupta-cq2rr hope you get it 🤔

    • @AnshGupta-cq2rr
      @AnshGupta-cq2rr Месяц назад +1

      @@nicspyy sorry but I couldn't get it

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

      @@AnshGupta-cq2rr dm on LinkedIn we will discuss

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

    D solution:
    void solve(){

    int n;
    cin>>n;

    vi a(n);
    forn(i,0,n) cin>>a[i];

    string s;
    cin>>s;

    vector pre(n, 0);
    pre[0] = a[0];
    for(int i=1; i= 0) sum -= pre[i-1];
    i++;
    j--;
    }
    }
    cout m >> k;
    int w;
    cin >> w;
    vector heights(w);
    for (int i = 0; i < w; ++i) {
    cin >> heights[i];
    }
    sort(rall(heights));

    vector contributions(n * m, 0);
    for (int i = 0; i < n; ++i) {
    for (int j = 0; j < m; ++j) {
    int top = max(0ll, i - k + 1);
    int bottom = min(n - k, i);
    int left = max(0ll, j - k + 1);
    int right = min(m - k, j);

    // cout