hi everybody i m trying to solve this problem but i can't sovle it ...plz suggest me algorithm to solve it . link http://students.iitk.ac.in/programmingclub/iopc/problems/ or problem itself is....
Two electron are confined in a 1D infinite potential well. Each start from opposite ends with different velocities towards each other. Whenever they meet they pass through each other and lets say a mesons is transferred from the electron we have marked A to electron B. Following classical mechanics and assuming that intersections does not changes the electron velocities ( velocities get reversed on reaching the wall of the potential well ) you have to find the no. of mesons that get accumulated in B after a certain time t. You are given the length of the potential well and speeds of each electron. *Input:* First line of input will consist of a single integer T = no. of test cases; Each test case will consist of 4 32-bit integers u,v,l,t in a single line. Where u= velocity of electron A v= velocity of electron B l=length of the 1D potential well t=time to consider *Output:* For each test case you have to print a single integer giving the number of intersections face to face or overtakes in a single line. *Sample Input:* 2 10 10 20 2 2 2 4 2 *Sample Output:* 1 1 ** --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/algogeeks -~----------~----~----~----~------~----~------~--~---