Educational Codeforces Round 169 | Video Solutions - A to D | by Abhinav Kumar | TLE Eliminators

แชร์
ฝัง
  • เผยแพร่เมื่อ 17 ก.ย. 2024

ความคิดเห็น • 13

  • @TLE_Eliminators
    @TLE_Eliminators  หลายเดือนก่อน

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

  • @pratyushdubey5362
    @pratyushdubey5362 หลายเดือนก่อน +1

    Great explanation!!

  • @jagadeeshbarla5422
    @jagadeeshbarla5422 หลายเดือนก่อน +1

    In problem - c
    Why line83 if(n%2) ans+=a[n+1];
    Came after
    Line82 ans=max(ans-k,0LL);
    Test case:
    3 k=1
    4 4 1
    In this solution it is mentioned about an odd case but unable to figure it out through what basis from that question this an odd case is generated.

  • @aryanrawat3494
    @aryanrawat3494 หลายเดือนก่อน +1

    🔥🔥🔥

  • @udaytripathi623
    @udaytripathi623 8 วันที่ผ่านมา

    Hi,
    Regarding Problem D,
    Can anyone explain why did we considered only the 'i' from query for calculating 'l' and 'r', do we not need the index which is just greater than 'j'? If so why?

  • @sasi5917
    @sasi5917 หลายเดือนก่อน +1

    Sir when will the TLE 12.0 will be launched. can u please give me the expected month of launching 12.0 plz. consider this comment🙏🙏🙏🙏

  • @AnkitRaj-ux7lv
    @AnkitRaj-ux7lv หลายเดือนก่อน +1

    Sir can I solve D without graph concept ????????

    • @faiqueibrahimi6359
      @faiqueibrahimi6359 หลายเดือนก่อน +1

      yes

    • @surajmishra6900
      @surajmishra6900 หลายเดือนก่อน

      yes, it's easily solvable using binary search

    • @shubh625
      @shubh625 หลายเดือนก่อน

      @@faiqueibrahimi6359 ok

    • @akshatsharma5426
      @akshatsharma5426 หลายเดือนก่อน

      yup this is how I solved it using binary search
      #include
      #include
      #include
      #include
      #include
      #include
      #include
      #include
      #include
      #define ll long long int
      using namespace std;
      int main(){
      ios_base::sync_with_stdio(false);
      cin.tie(NULL);
      int t=1;
      cin>>t;
      while(t--){
      int n,q;
      cin>>n>>q;
      //mapm;
      mapm;
      vectorv(n+1);
      for(int i=1;i>v[i];
      m[v[i]].push_back(i);
      //m[v[i][0]].push_back(i);
      //m[v[i][1]].push_back(i);
      }
      //vectorans
      while(q--){
      int a,b;
      cin>>a>>b;
      int x=min(a,b);
      int y=max(a,b);
      if(v[x][0]==v[y][0] || v[x][1]==v[y][1] || v[x][0]==v[y][1] || v[x][1]==v[y][0]){
      cout