i would like an explanation of the given inputs and outputs
parking[user tasks]
In first line you have 3 integers that represent the price of staying for 1, 2 and 3 trucks at the time. And you have 3 time intervals [T1,T2) when the trucks were at the parking, and you should output the cost of their staying.
i know that, but when i calculate how much they would pay, i get wrong result
could you tell me for every truck and every minut how much is it paying
could you tell me for every truck and every minut how much is it paying
Ok, give me a minute to type it.
Here is the array that represent number of cars that were at the parking at i-th minute. [ For the first case! ]
1 2 3 3 2 1 1 0
So we have 1 * 5 + 2 * 3 + 3 * 1 + 3 * 1 + 2 * 3 + 1 * 5 + 1 * 5 = 5 + 6 + 3 + 3 + 6 + 5 + 5 = 33
1 2 3 3 2 1 1 0
So we have 1 * 5 + 2 * 3 + 3 * 1 + 3 * 1 + 2 * 3 + 1 * 5 + 1 * 5 = 5 + 6 + 3 + 3 + 6 + 5 + 5 = 33
thanks, i had same calculations, but wrong result because i was tired. I hope I did well on the competition today because i'm really tired. 2 easy tasks and i have problems with both of them :-)
No problem. =)
I've done 2 tasks on the competition and I'll try to do remaining tasks for the weekend. Good Luck ;)
I've done 2 tasks on the competition and I'll try to do remaining tasks for the weekend. Good Luck ;)
tnx, but i've allready solved them, now i can just wait
good luck to you
good luck to you