+ 13
Hey everyone! Can somebody help me to solve New Driver's License problem?
I have implemented this code in c++ but unable to pass some test cases. https://code.sololearn.com/cVl34zLx757i/?ref=app Thanks!
6 odpowiedzi
+ 1
If agents > 4 or you are the first -> output 20.
+ 7
Ohh yes! I missed that condition. Now the code is working perfectly. Thank you so much!
+ 1
Viren Varma
Your welcome :)
0
Your problem is that you can have more than 5 agents.
I am not sure but maybe it is enough if you change nagets == 5 to nagents >= 5.
0
Thank you for your help! But it did not worked. Now I have updated the code by sorting the names and just failing 1 test case. Can somebody please help?
0
But it is a fact that you can get more than 5 agents.
And yes, sorting the names is important. Sorry that I did not see that you missed this in your former code.