gWhat's wrong now with this... on my computer everything is okay, but on z-trening I got none correct result ! :(
this is the code :S
http://www.z-trening.com/new/www/html/submit.php?submit=7100047558&subm_code=1
hFirst, erase uses crt and clrscr; no need. And readln.
I think your idea is not good and therefore the solution is complicated and vast. Try to solve task without the use of a series (array...). I think it will be easier.
gWithout arrays :S
Hm...okay, I'll try. If something goes wrong, I will write here :)
DCan somebody please explain the examples of the task Semafori. How the sum goes?
DOn first case you have
2 10
3 5 5
5 2 2
so for now the time is 10 cause he needs at least 10 seconds to go through whole road and then the first light is on 3 meter and red is on for 5 secs so now there are 2 secs left and then now he is on second light and red is lasting for 2 secs so now the green is on and he can pass...