+ 2
Failed third test case?(New driving license )(Have a look)
New driving license https://code.sololearn.com/cYij01FzL1ww/?ref=app
3 Answers
+ 2
The reason why that is not correct cout<<(((it-v.begin()+1)/n)*20)+(((it-v.begin()+1)%n)*20)<<endl; in wrong shift. Try input 5 agents and 3d or 4th name, you will see problem. In general all will be free after 20 min, but if we count shift like this we have wrong answer.
+ 2
I try to write cout<<(((it-v.begin())/n + 1)*20)<<endl; in 20 line and get it with your code
+ 2
Thanks buddy it works.