Why are you using <bits/stdc++.h>???
https://www.geeksforgeeks.org/bitsstdc-h-c/
It is nonstandard, like <conio.h>, <unistd.h>, or <windows.h>. IMO headers like those should be avoided unless you're
absolutely sure they will
only be used with compilers that support them.
According to geeksforgeeks, it apparently just includes every standard C++ library, which, while it does eliminate the need to type in every library that you want, it will slow down compiling and may cause issues.
It's kind of like
using namespace std;
. It is a one-size-fits-all, comprehensive solution to laziness on the part of people who don't want to type std:: for every standard object, or don't want to put
using std::cout;
, etc. Or it might have just been what they were taught, in which case that applies to their teacher.
In addition, it can cause problems, like with namespace std, if you call a variable something like "string" then that will cause a compiler error with the std::string library. If it doesn't, there is something wrong with your compiler.
To end my rant, solutions like this are ok for just dinking around on your own, or if you are absolutely sure it won't cause problems, but they should never find their way into production code where they can cause errors that can be extremely hard to find and fix.