You have a resource leak in the C++ implementation, you forgot to close the file.
Besides, I'd avoid adding #include "bits/stdc++.h" in any code example. It's not portable and it bloats your binary size. Include what you need and know in which header it is.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
You have a resource leak in the C++ implementation, you forgot to close the file.
Besides, I'd avoid adding
#include "bits/stdc++.h"
in any code example. It's not portable and it bloats your binary size. Include what you need and know in which header it is.