1 test case failed as it did’nt account for all input cases,but i cant understand why this happen.Please help me out
Hostel visit (stl challange)
use long long instead of int you wont get wa … but you will get tle this time beacuse your are taking q*k time optimize your solution.
i have tried using sorting ,but still i am getting tle;please tell me what kind of optimisations i should make
please have a look of my code… for better optimization
i get your optimizastion trick and thanks for it ;but please help me to find out the bug in my code…i have used long long int but still it cant handle 10^6 as x&y cordinate…
class hostel
{
public:
long long int x, y;
long long dis()
{
return x * x + y * y;
}
void setcor()
{
cin >> x >> y;
}
};
dis () must return long long
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.