code: https://ide.codingblocks.com/s/422967
prob: https://hack.codingblocks.com/app/contests/2022/243/problem
I referred to this video and tried to implement their solution
code: https://ide.codingblocks.com/s/422967
prob: https://hack.codingblocks.com/app/contests/2022/243/problem
I referred to this video and tried to implement their solution