+ 2

Failed third test case?(New driving license )(Have a look)

New driving license https://code.sololearn.com/cYij01FzL1ww/?ref=app

30th Dec 2019, 5:15 PM
Opeeyum
Opeeyum - avatar
3 odpowiedzi
+ 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.
23rd Jan 2020, 5:58 AM
sankot
sankot - avatar
+ 2
I try to write cout<<(((it-v.begin())/n + 1)*20)<<endl; in 20 line and get it with your code
23rd Jan 2020, 5:41 AM
sankot
sankot - avatar
+ 2
Thanks buddy it works.
25th Jan 2020, 2:49 AM
Opeeyum
Opeeyum - avatar