Can Anybody Please help Me with a Solution i am getting TLE For this Problem !
Problem Solution Link :CodeChef: Practical coding for everyone
Can Anybody Please help Me with a Solution i am getting TLE For this Problem !
Problem Solution Link :CodeChef: Practical coding for everyone
@lucky_guy
U missed out two more conditions
else if(b > c and b < a)
cout << b << endl;
else if(a < b and a > c)
cout << a << endl;
add these two.
my pleasure
Can you suggest any tutorials for improving data structures and algorithm
Geeksforgeeks for tutorials and
codechef,codeforces,atcoder for practice
Thanks bro
I am recieving a RUNTIME ERROR(SIGPE) in FLOW016 problem .Can you tell me what is the problem with my solution…
My solution is : CodeChef: Practical coding for everyone
@lucky_guy
change gcd condition in your solution
if(b is zero)
return a;
because when a becomes zero
gcd(b,a%b)
=>gcd(b,0%b)
=>gcd(b,0)
here second parameter becomes zero so your condition (if a = 0) return b is already
been checked here so you need not check that one explicitly whereas b = 0 case is not covered in your solution.
Thanks bro for helping