firstly,in the error its coming std:: cout,what is std its not known till now.
secondly code is being compiled but test cases are being failed and it does not show what are the test cases…have wasted hours on a single question pls tell the solution.