TARS's blog

By TARS, 3 years ago, In English

whenever I try to copy-paste a very long string or array values on my vs code terminal it throws the unnecessary value(sometimes some character goes missing), it always happens when I have to take the input test case first then the string or array values. I don't know what goes wrong with it, although it works perfectly fine when I pass value one by one by typing not just copy-pasting. if anyone knows how to fix this please let me know.

Take a look at the below:-  ![ ](https://codeforces.com/4a01b6/Screenshot (112).png)

Full text and comments »

  • Vote: I like it
  • -2
  • Vote: I do not like it

By TARS, history, 4 years ago, In English

I'm solving a problem called number of smaller elements on the right side of an array. I saw stl solution based on the set they've used "distance(s.begin(), it)" I know how distance fn works on linear data structure but I don't know how it goes with a hierarchal structure like a set, etc.. Do you have an idea about how it works on trees?

Full text and comments »

  • Vote: I like it
  • -16
  • Vote: I do not like it

By TARS, history, 4 years ago, In English

I've tried to solve this using sieve and prime factorization but I got TLE for some cases. Here is the CSES problem:) (https://cses.fi/problemset/task/1713/)

Here is my solution)

I need a more efficient approach.

Full text and comments »

  • Vote: I like it
  • +16
  • Vote: I do not like it