Блог пользователя vintage_Petr_Mitrichev

Автор vintage_Petr_Mitrichev, история, 4 года назад, По-английски

Hello dreamoon_love_AA. Its been long time i didn't post anything. So posting this. Petr hello 300iq hello

doaraemon

Полный текст и комментарии »

  • Проголосовать: нравится
  • -35
  • Проголосовать: не нравится

Автор vintage_Petr_Mitrichev, история, 4 года назад, По-английски

Hey, can anyone give me some suggestions what should I name my handle or should I keep it same. 300iq any suggestions.

Полный текст и комментарии »

  • Проголосовать: нравится
  • +23
  • Проголосовать: не нравится

Автор vintage_Petr_Mitrichev, история, 4 года назад, По-английски

What happened to Legend Petr Mitrichev. Why he is not doing screencast of contests he gives. I really loved his SC's. It was very motivating.

Полный текст и комментарии »

  • Проголосовать: нравится
  • -32
  • Проголосовать: не нравится

Автор vintage_Petr_Mitrichev, история, 5 лет назад, По-английски

Why such strange behaviour while outputting the difference in sizes of two queues. When i am storing them in a diff variable its showing right answer, while just outputting the difference gives wrong answer.

code

#include<bits/stdc++.h>
using namespace std;
int main()
{
    priority_queue<int , vector<int> , greater<int> > pmin;
    priority_queue<int , vector<int> >pmax;
    pmin.push(5);
    pmin.push(9);
    pmin.push(10);
    pmax.push(1);
    cout << pmax.size() - pmin.size() << endl;
    int diff = pmax.size() - pmin.size();
    cout << diff <<endl;
    return 0 ;
}

**** TO DV : Since downvotes doesn't affects me, but I think this is a very good question whom most of have no idea about the flaw in this. So it would be good if some good answers known to other people.

Полный текст и комментарии »

  • Проголосовать: нравится
  • -23
  • Проголосовать: не нравится

Автор vintage_Petr_Mitrichev, история, 5 лет назад, По-английски

AC Solution 1

TLE SOL

the first solution which gets ac , also recur for all the four case , and my 2nd solution also recur for all four cases .

But why i am getting tle at TC 6 , is there something i am missing , or something which is increasing the time complexity of 2nd sol.

someone please tell the mistake .

Полный текст и комментарии »

  • Проголосовать: нравится
  • 0
  • Проголосовать: не нравится

Автор vintage_Petr_Mitrichev, история, 5 лет назад, По-английски

In problem Equivalent string , I am using Divide and Conquer approach to solve.

I am checking all four cases , left_left , right_right , left_right , right_left

by the code is giving time limit exeeded . Since we are not making more than log n divisions , why it is giving TLE and how to optimize it . Can anyone tell me . Thanks

Pseudo code

Полный текст и комментарии »

  • Проголосовать: нравится
  • 0
  • Проголосовать: не нравится

Автор vintage_Petr_Mitrichev, история, 5 лет назад, По-английски

In problem , symmetric grid , can anyone give the proof why the method given in the editorial works . how to perform all rows and column swapping operation .

Editorial

Anyone .

Полный текст и комментарии »

  • Проголосовать: нравится
  • -2
  • Проголосовать: не нравится

Автор vintage_Petr_Mitrichev, история, 5 лет назад, По-английски

Hello , can anyone please clarify what the author is saying in editorial of problem d . I am not getting the dp state . how to think it recursively ?

why is author taking at most case ? what it mean ?

Полный текст и комментарии »

  • Проголосовать: нравится
  • +4
  • Проголосовать: не нравится

Автор vintage_Petr_Mitrichev, история, 5 лет назад, По-английски

can someone guide me how to use topcoder arena for competitive programming. i wanna participate in toc. rounds but its arena is too tough to handle .

and how to view other solutions at topcoder? Please tell. help would be appreciated. Thanks!

Полный текст и комментарии »

  • Проголосовать: нравится
  • -20
  • Проголосовать: не нравится

Автор vintage_Petr_Mitrichev, история, 5 лет назад, По-английски

suppose u have to find a % b , i see many red coders solution instead of using directly a%b they do like ..

if (a >=mod) a-=mod ??

why so ?

Полный текст и комментарии »

  • Проголосовать: нравится
  • +28
  • Проголосовать: не нравится

Автор vintage_Petr_Mitrichev, история, 6 лет назад, По-английски
  • Проголосовать: нравится
  • 0
  • Проголосовать: не нравится

Автор vintage_Petr_Mitrichev, история, 6 лет назад, По-английски

Can anyone please help me in solving lizards and basement 2 ? link

Полный текст и комментарии »

Теги #dp
  • Проголосовать: нравится
  • 0
  • Проголосовать: не нравится