yyyvvvyyy's blog

By yyyvvvyyy, history, 2 years ago, In English

Given n integer positive numbers ,find the minimum numbers of operations such that no two numbers have their product making a perfect square. In 1 operation you can pick any number and add or subtract one from it. All the numbers must be positive after all the operations are performed. 1<n<=100 and value of numbers are in range of 1 to 100000. Any help/discussion will be appreciated!!

Read more »

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

By yyyvvvyyy, history, 4 years ago, In English

CS ACADEMY ROUND 38

Can anyone explain what the dp states are as there is no explanation in the editorial? The problem is very interesting and only few people managed to solve it so i hope you enjoy it! Problem:https://csacademy.com/contest/archive/task/checkroom-hooks/ Solution:https://csacademy.com/contest/archive/task/checkroom-hooks/solution/

Thank you!

Read more »

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

By yyyvvvyyy, history, 4 years ago, In English

I was solving this problem which seemed like a pretty much standard problem of persistent segment tree but i came across this solution which seems to use some dfs ordering of nodes and i'm unable to figure out what is going on?

Problem: Given a tree (100000 nodes) and a value in each node, and for each query you are given 2 nodes and a value V , you have to find number of nodes whose value is less than V.

solution: https://www.hackerearth.com/challenge/college/programmers-parliament/algorithm/freaky-frequencies/submission/7492012/

This is my first time on codeforces. Thanks in advance

Read more »

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