Solutions are presented as using the least memory and the fastest execution time. It also takes the top
10 most recent solutions from each language. If you want to limit to a specific index, click the
"Solved" button and go to that problem.
ContestId |
Name |
Phase |
Frozen |
Duration (Seconds) |
Relative Time |
Start Time |
13
|
Codeforces Beta Round 13 |
FINISHED |
False |
7200 |
458668799 |
May 6, 2010, 2 p.m. |
Problems
B'Little Petya likes to play very much. And most of all he likes to play the following game: He is given a sequence of N integer numbers. At each step it is allowed to increase the value of any number by 1 or to decrease it by 1. The goal of the game is to make the sequence non-decreasing with the smallest number of steps. Petya is not good at math, so he asks for your help. The sequence a is called non-decreasing if a1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89a2 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89... xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89aN holds, where N is the length of the sequence. The first line of the input contains single integer N (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89N xe2 x80 x89 xe2 x89 xa4 xe2 x80 x895000) -- the length of the initial sequence. The following N lines contain one integer each -- elements of the sequence. These numbers do not exceed 109 by absolute value. Output one integer -- minimum number of steps required to achieve the goal.'... |
Tutorials
Submissions
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
56502 |
tourist |
C |
May 6, 2010, 2:29 p.m. |
OK |
Delphi |
TESTS |
34 |
230 |
921600 |
|
2200 |
56818 |
taras.klaskovsky |
C |
May 6, 2010, 2:45 p.m. |
OK |
FPC |
TESTS |
34 |
440 |
1126400 |
|
2200 |
57181 |
LayCurse |
C |
May 6, 2010, 3:03 p.m. |
OK |
GNU C |
TESTS |
34 |
280 |
1433600 |
|
2200 |
56504 |
cuiaoxiang |
C |
May 6, 2010, 2:29 p.m. |
OK |
GNU C++ |
TESTS |
34 |
30 |
1536000 |
|
2200 |
57873 |
oioi98 |
C |
May 6, 2010, 3:33 p.m. |
OK |
GNU C++ |
TESTS |
34 |
50 |
1536000 |
|
2200 |
57645 |
arti |
C |
May 6, 2010, 3:23 p.m. |
OK |
GNU C++ |
TESTS |
34 |
130 |
1433600 |
|
2200 |
56751 |
alkaid |
C |
May 6, 2010, 2:42 p.m. |
OK |
GNU C++ |
TESTS |
34 |
140 |
1433600 |
|
2200 |
56381 |
dsh |
C |
May 6, 2010, 2:22 p.m. |
OK |
GNU C++ |
TESTS |
34 |
140 |
1536000 |
|
2200 |
57430 |
233519971 |
C |
May 6, 2010, 3:14 p.m. |
OK |
GNU C++ |
TESTS |
34 |
160 |
1433600 |
|
2200 |
57390 |
voover |
C |
May 6, 2010, 3:12 p.m. |
OK |
GNU C++ |
TESTS |
34 |
160 |
1433600 |
|
2200 |
56619 |
cgy4ever |
C |
May 6, 2010, 2:36 p.m. |
OK |
GNU C++ |
TESTS |
34 |
160 |
1433600 |
|
2200 |
56578 |
jaaro |
C |
May 6, 2010, 2:34 p.m. |
OK |
GNU C++ |
TESTS |
34 |
160 |
1433600 |
|
2200 |
57835 |
chhung6 |
C |
May 6, 2010, 3:32 p.m. |
OK |
GNU C++ |
TESTS |
34 |
160 |
1638400 |
|
2200 |
57080 |
Egor |
C |
May 6, 2010, 2:58 p.m. |
OK |
Java 6 |
TESTS |
34 |
300 |
33792000 |
|
2200 |
57185 |
eireksten |
C |
May 6, 2010, 3:03 p.m. |
OK |
Java 6 |
TESTS |
34 |
310 |
33792000 |
|
2200 |
57087 |
ivan.metelsky |
C |
May 6, 2010, 2:58 p.m. |
OK |
Java 6 |
TESTS |
34 |
470 |
33792000 |
|
2200 |
58448 |
alex_tolstov |
C |
May 6, 2010, 3:54 p.m. |
OK |
Java 6 |
TESTS |
34 |
580 |
33792000 |
|
2200 |
57713 |
vot |
C |
May 6, 2010, 3:26 p.m. |
OK |
Java 6 |
TESTS |
34 |
610 |
33792000 |
|
2200 |
57851 |
mr146 |
C |
May 6, 2010, 3:33 p.m. |
OK |
MS C++ |
TESTS |
34 |
160 |
1536000 |
|
2200 |
57442 |
Ferlon |
C |
May 6, 2010, 3:14 p.m. |
OK |
MS C++ |
TESTS |
34 |
160 |
1536000 |
|
2200 |
57438 |
tomekkulczynski |
C |
May 6, 2010, 3:14 p.m. |
OK |
MS C++ |
TESTS |
34 |
160 |
2560000 |
|
2200 |
57359 |
kyno.yang |
C |
May 6, 2010, 3:10 p.m. |
OK |
MS C++ |
TESTS |
34 |
170 |
1433600 |
|
2200 |
56168 |
dzhulgakov |
C |
May 6, 2010, 2:13 p.m. |
OK |
MS C++ |
TESTS |
34 |
170 |
1433600 |
|
2200 |
56931 |
Anton_Lunyov |
C |
May 6, 2010, 2:51 p.m. |
OK |
MS C++ |
TESTS |
34 |
170 |
1536000 |
|
2200 |
58044 |
diver_ru |
C |
May 6, 2010, 3:41 p.m. |
OK |
MS C++ |
TESTS |
34 |
190 |
1433600 |
|
2200 |
57153 |
Alexus |
C |
May 6, 2010, 3:02 p.m. |
OK |
MS C++ |
TESTS |
34 |
190 |
1433600 |
|
2200 |
58550 |
forest |
C |
May 6, 2010, 3:58 p.m. |
OK |
MS C++ |
TESTS |
34 |
200 |
1433600 |
|
2200 |
58463 |
sdya |
C |
May 6, 2010, 3:55 p.m. |
OK |
MS C++ |
TESTS |
34 |
200 |
1536000 |
|
2200 |
remove filters
Back to search problems