### yyyvvvyyy's blog

By yyyvvvyyy, history, 2 years ago,

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!!

• +21

By yyyvvvyyy, history, 4 years ago,

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!

• -2

By yyyvvvyyy, history, 4 years ago,

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.

This is my first time on codeforces. Thanks in advance