|
|
вернуться в форумeasy translation if(a[i]<k){ ans+=k-a[i]; } else{ ans1+=a[i]-k; } Re: easy translation Послано Egor 20 сен 2015 18:33 I think that this problem is easy enough to try to make the solution as efficient as possible. My consideration notes: 1. You can make it without using arrays, because the local information that you get is enough to generate the answer. 2. I think that it is worth trying to make the speaking variable names. It will certainly require additional time, but I think, it should pay off in the future. Re: easy translation Any good book (about Pascal for example) will tell about it Re: easy translation Ho do they get 0.001 seconds? |
|
|