Codeforces Round 159 (Div. 2)

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
257 Codeforces Round 159 (Div. 2) FINISHED False 7200 374164199 Jan. 8, 2013, 3:30 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 1610 ) D Sum PROGRAMMING greedy math 1900

B'Vasya has found a piece of paper with an array written on it. The array consists of n integers a1, xe2 x80 x89a2, xe2 x80 x89..., xe2 x80 x89an. Vasya noticed that the following condition holds for the array ai xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89ai xe2 x80 x89+ xe2 x80 x891 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x892 xc2 xb7ai for any positive integer i (i xe2 x80 x89< xe2 x80 x89n). Vasya wants to add either a "+" or a "-" before each number of array. Thus, Vasya will get an expression consisting of n summands. The value of the resulting expression is the sum of all its elements. The task is to add signs "+" and "-" before each number so that the value of expression s meets the limits 0 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89s xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89a1. Print a sequence of signs "+" and "-", satisfying the given limits. It is guaranteed that the solution for the problem exists. The first line contains integer n (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89105) -- the size of the array. The second line contains space-separated integers a1, xe2 x80 x89a2, xe2 x80 x89..., xe2 x80 x89an (0 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89ai xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89109) -- the original array. It is guaranteed that the condition ai xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89ai xe2 x80 x89+ xe2 x80 x891 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x892 xc2 xb7ai fulfills for any positive integer i (i xe2 x80 x89< xe2 x80 x89n). In a single line print the sequence of n characters "+" and "-", where the i-th character is the sign that is placed in front of number ai. The value of the resulting expression s must fit into the limits 0 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89s xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89a1. If there are multiple solutions, you are allowed to print any of them.'...

Tutorials

Codeforces Round #159 (Div. 2) Разбор Задач

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
47137377 Pashechka D Dec. 16, 2018, 5:48 p.m. OK Clang++17 Diagnostics TESTS 38 1154 2355200 1900
2892875 Gassa D Jan. 8, 2013, 5:29 p.m. OK D TESTS 38 265 614400 1900
2911087 nmakeenkov D Jan. 13, 2013, 12:24 p.m. OK Delphi TESTS 38 31 716800 1900
3226828 Mosyagin D March 1, 2013, 6:43 p.m. OK Delphi TESTS 38 46 921600 1900
2891032 nmakeenkov D Jan. 8, 2013, 4:59 p.m. OK Delphi TESTS 38 46 1024000 1900
2893234 nmakeenkov D Jan. 8, 2013, 5:59 p.m. OK Delphi TESTS 38 46 1024000 1900
2890485 Shaykhutdinov-T-I D Jan. 8, 2013, 4:49 p.m. OK Delphi TESTS 38 46 1638400 1900
2893873 egorova_plus_plus D Jan. 8, 2013, 6:46 p.m. OK Delphi TESTS 38 46 8192000 1900
4316508 Misha100896 D Aug. 20, 2013, 3:52 p.m. OK Delphi TESTS 38 62 512000 1900
2889827 NickAltair D Jan. 8, 2013, 4:37 p.m. OK Delphi TESTS 38 62 512000 1900
2951912 AleksanderBalobanov D Jan. 17, 2013, 9:29 a.m. OK Delphi TESTS 38 62 3276800 1900
2893659 ruban D Jan. 8, 2013, 6:23 p.m. OK Delphi TESTS 38 62 8089600 1900
2893639 i_love_gold_and_nt D Jan. 8, 2013, 6:22 p.m. OK FPC TESTS 38 31 921600 1900
2899736 Arthur D Jan. 9, 2013, 2:38 p.m. OK FPC TESTS 38 46 512000 1900
2898816 ig_dug D Jan. 9, 2013, 9:42 a.m. OK FPC TESTS 38 46 512000 1900
2893045 hiepsieunhan D Jan. 8, 2013, 5:51 p.m. OK FPC TESTS 38 46 614400 1900
2893527 scorpion D Jan. 8, 2013, 6:14 p.m. OK FPC TESTS 38 46 819200 1900
3298851 bdsql D March 13, 2013, 1:45 p.m. OK FPC TESTS 38 46 921600 1900
2893380 con_nha_ngheo D Jan. 8, 2013, 6:06 p.m. OK FPC TESTS 38 46 921600 1900
2891260 vav_brs D Jan. 8, 2013, 5:03 p.m. OK FPC TESTS 38 46 921600 1900
2903682 Stalker D Jan. 10, 2013, 11:02 p.m. OK FPC TESTS 38 46 1024000 1900
2890993 JustN D Jan. 8, 2013, 4:58 p.m. OK FPC TESTS 38 46 1228800 1900
2900380 triveni D Jan. 9, 2013, 7:08 p.m. OK GNU C TESTS 38 46 512000 1900
2895347 NoSoul D Jan. 9, 2013, 6:17 a.m. OK GNU C TESTS 38 46 512000 1900
2888410 abhineet08 D Jan. 8, 2013, 4:14 p.m. OK GNU C TESTS 38 46 512000 1900
2893077 kawatea D Jan. 8, 2013, 5:54 p.m. OK GNU C TESTS 38 46 819200 1900
4532813 helloworld123 D Sept. 21, 2013, 5:49 p.m. OK GNU C TESTS 38 62 512000 1900
3987390 pedolove420 D June 28, 2013, 9:52 p.m. OK GNU C TESTS 38 62 512000 1900
2899746 A.K.Goharshady D Jan. 9, 2013, 2:47 p.m. OK GNU C TESTS 38 62 512000 1900
2899161 hARRAY D Jan. 9, 2013, 11:20 a.m. OK GNU C TESTS 38 62 512000 1900
2899122 hariprasath D Jan. 9, 2013, 11:10 a.m. OK GNU C TESTS 38 62 512000 1900
2893795 abdulrais_41 D Jan. 8, 2013, 6:36 p.m. OK GNU C TESTS 38 62 512000 1900
3326527 lxgsbqylbk D March 16, 2013, 3:53 p.m. OK GNU C++ TESTS 38 15 512000 1900
2927331 ACMonster D Jan. 15, 2013, 2:52 p.m. OK GNU C++ TESTS 38 15 512000 1900
2894475 savinov D Jan. 8, 2013, 10:05 p.m. OK GNU C++ TESTS 38 15 819200 1900
2899315 hhddff2 D Jan. 9, 2013, 12:05 p.m. OK GNU C++ TESTS 38 31 512000 1900
3561849 atrista D April 18, 2013, 7:55 p.m. OK GNU C++ TESTS 38 31 512000 1900
3259659 baharSalamatian D March 6, 2013, 5:40 p.m. OK GNU C++ TESTS 38 31 512000 1900
3206823 -XraY- D Feb. 28, 2013, 12:22 p.m. OK GNU C++ TESTS 38 31 512000 1900
3019933 Slayer_ D Jan. 28, 2013, 2:22 p.m. OK GNU C++ TESTS 38 31 512000 1900
2902983 Ibragimov_Bauyrzhan D Jan. 10, 2013, 4:37 p.m. OK GNU C++ TESTS 38 31 512000 1900
2893514 hime D Jan. 8, 2013, 6:13 p.m. OK GNU C++ TESTS 38 31 512000 1900
2899778 Xerxes D Jan. 9, 2013, 2:55 p.m. OK GNU C++0x TESTS 38 15 512000 1900
2902707 BOBAS D Jan. 10, 2013, 2:56 p.m. OK GNU C++0x TESTS 38 31 819200 1900
2999326 stan D Jan. 23, 2013, 9:20 p.m. OK GNU C++0x TESTS 38 31 8089600 1900
3236012 EarlOfDitches D March 3, 2013, 9:01 p.m. OK GNU C++0x TESTS 38 46 512000 1900
2887406 Andrew_Makar D Jan. 8, 2013, 3:59 p.m. OK GNU C++0x TESTS 38 46 716800 1900
2898386 Archon.JK D Jan. 9, 2013, 7:37 a.m. OK GNU C++0x TESTS 38 46 819200 1900
2890083 yukim D Jan. 8, 2013, 4:41 p.m. OK GNU C++0x TESTS 38 46 819200 1900
2900080 cacophonix D Jan. 9, 2013, 5:04 p.m. OK GNU C++0x TESTS 38 46 1126400 1900
2891938 Tune D Jan. 8, 2013, 5:15 p.m. OK GNU C++0x TESTS 38 46 1228800 1900
2893868 BryantMark D Jan. 8, 2013, 6:45 p.m. OK GNU C++0x TESTS 38 46 1331200 1900
59121605 coderbd D Aug. 20, 2019, 5:54 a.m. OK GNU C11 TESTS 38 92 512000 1900
19836767 khatribiru D Aug. 12, 2016, 8:39 p.m. OK GNU C++11 TESTS 38 60 5324800 1900
15094006 last_one D Dec. 30, 2015, 8:17 a.m. OK GNU C++11 TESTS 38 62 512000 1900
40990370 ReaLNero1 D July 30, 2018, 11:51 p.m. OK GNU C++11 TESTS 38 62 512000 1900
14682634 fengsuiyan D Dec. 7, 2015, 5:42 a.m. OK GNU C++11 TESTS 38 62 819200 1900
19607240 ZWY D Aug. 4, 2016, 1:20 a.m. OK GNU C++11 TESTS 38 62 921600 1900
31071603 IHate24CharactersLimit D Oct. 6, 2017, 1:49 p.m. OK GNU C++11 TESTS 38 62 1024000 1900
18974659 Melnyk D July 8, 2016, 6:57 p.m. OK GNU C++11 TESTS 38 62 1228800 1900
19554890 RunningPhoton D Aug. 1, 2016, 8:24 a.m. OK GNU C++11 TESTS 38 62 1740800 1900
15333391 RVS D Jan. 13, 2016, 3:56 p.m. OK GNU C++11 TESTS 38 62 2457600 1900
23407429 guga D Dec. 29, 2016, 8:43 p.m. OK GNU C++11 TESTS 38 62 2560000 1900
27552124 Momentaiii D June 3, 2017, 9:23 p.m. OK GNU C++14 TESTS 38 62 819200 1900
31055215 tnilesh02 D Oct. 6, 2017, 5:57 a.m. OK GNU C++14 TESTS 38 62 819200 1900
30316110 wp32pw D Sept. 13, 2017, 8:21 p.m. OK GNU C++14 TESTS 38 62 2252800 1900
46045378 Uzumaki_Narutoo D Nov. 22, 2018, 1:04 a.m. OK GNU C++14 TESTS 38 92 512000 1900
26952974 satan_nightmare D May 8, 2017, 8:39 a.m. OK GNU C++14 TESTS 38 92 512000 1900
22981479 Mohammad.Sj D Dec. 14, 2016, 7:34 p.m. OK GNU C++14 TESTS 38 92 512000 1900
21831576 Veboy D Oct. 27, 2016, 6:21 p.m. OK GNU C++14 TESTS 38 92 512000 1900
49681349 vjudge5 D Feb. 10, 2019, 2:15 a.m. OK GNU C++14 TESTS 38 92 512000 1900
21859042 MohamedZain D Oct. 28, 2016, 8:54 p.m. OK GNU C++14 TESTS 38 92 614400 1900
31191726 Minnakhmetov D Oct. 10, 2017, 1:59 p.m. OK GNU C++14 TESTS 38 92 614400 1900
54548838 vjudge5 D May 24, 2019, 7:52 a.m. OK GNU C++17 TESTS 38 92 512000 1900
43429482 vjudge4 D Sept. 25, 2018, 11:28 p.m. OK GNU C++17 TESTS 38 92 512000 1900
64370800 18net18 D Nov. 6, 2019, 2:15 p.m. OK GNU C++17 TESTS 38 92 819200 1900
39057318 this-is-abandoned D June 9, 2018, 1:14 a.m. OK GNU C++17 TESTS 38 92 819200 1900
65486590 Rian_5900 D Nov. 21, 2019, 1:35 p.m. OK GNU C++17 TESTS 38 92 921600 1900
40109900 3agwa D July 9, 2018, 11:05 a.m. OK GNU C++17 TESTS 38 92 921600 1900
39070103 ag_orz D June 9, 2018, 1:16 p.m. OK GNU C++17 TESTS 38 92 921600 1900
54724894 quake0 D May 27, 2019, 7:42 p.m. OK GNU C++17 TESTS 38 92 1024000 1900
64369286 vjudge4 D Nov. 6, 2019, 1:51 p.m. OK GNU C++17 TESTS 38 92 1024000 1900
66599142 Bloody_Yulii D Dec. 10, 2019, 3:51 p.m. OK GNU C++17 TESTS 38 92 1638400 1900
2922882 often D Jan. 14, 2013, 3:06 a.m. OK Haskell TESTS 38 62 7372800 1900
2901024 ILJ D Jan. 10, 2013, 3:46 a.m. OK Haskell TESTS 38 62 7372800 1900
2891950 rst76 D Jan. 8, 2013, 5:15 p.m. OK Haskell TESTS 38 78 7372800 1900
2887860 watashi D Jan. 8, 2013, 4:05 p.m. OK Haskell TESTS 38 78 10649600 1900
2922892 often D Jan. 14, 2013, 3:09 a.m. OK Haskell TESTS 38 687 21094400 1900
2961234 musically.ut D Jan. 19, 2013, 10:37 p.m. OK Haskell TESTS 38 733 30617600 1900
2891481 uwi D Jan. 8, 2013, 5:07 p.m. OK Java 6 TESTS 38 93 204800 1900
2887603 bsrkaditya D Jan. 8, 2013, 4:01 p.m. OK Java 6 TESTS 38 109 2560000 1900
2903020 farnetto D Jan. 10, 2013, 4:51 p.m. OK Java 6 TESTS 38 140 204800 1900
2899655 foreverbell D Jan. 9, 2013, 2:01 p.m. OK Java 6 TESTS 38 156 204800 1900
2890942 olgngy D Jan. 8, 2013, 4:57 p.m. OK Java 6 TESTS 38 156 204800 1900
2892241 anujtemp D Jan. 8, 2013, 5:21 p.m. OK Java 6 TESTS 38 156 307200 1900
2888853 luckman D Jan. 8, 2013, 4:21 p.m. OK Java 6 TESTS 38 156 307200 1900
2923513 Ahmed.Ibrahem D Jan. 14, 2013, 9:55 a.m. OK Java 6 TESTS 38 156 2252800 1900
5614053 alibaba D Jan. 4, 2014, 6:05 a.m. OK Java 6 TESTS 38 156 4915200 1900
3096623 I_love_Malika D Feb. 11, 2013, 3:53 p.m. OK Java 6 TESTS 38 171 204800 1900
2887788 alexey.enkov D Jan. 8, 2013, 4:04 p.m. OK Java 7 TESTS 38 140 102400 1900
2893922 phantom11 D Jan. 8, 2013, 6:51 p.m. OK Java 7 TESTS 38 156 0 1900
2906124 yarrr D Jan. 11, 2013, 8:31 p.m. OK Java 7 TESTS 38 156 0 1900
2980621 gh_ost D Jan. 21, 2013, 5:48 p.m. OK Java 7 TESTS 38 156 102400 1900
2888348 riadwaw D Jan. 8, 2013, 4:13 p.m. OK Java 7 TESTS 38 156 102400 1900
2887661 Leonidas2 D Jan. 8, 2013, 4:02 p.m. OK Java 7 TESTS 38 156 307200 1900
2890246 Sylvanas D Jan. 8, 2013, 4:45 p.m. OK Java 7 TESTS 38 156 7782400 1900
2891514 qwerty787788 D Jan. 8, 2013, 5:07 p.m. OK Java 7 TESTS 38 171 102400 1900
2890120 ocelopilli D Jan. 8, 2013, 4:42 p.m. OK Java 7 TESTS 38 171 102400 1900
2893874 KNIGHT0X300 D Jan. 8, 2013, 6:46 p.m. OK Java 7 TESTS 38 171 204800 1900
51539957 Ajudiya_13 D March 19, 2019, 5:58 p.m. OK Java 8 TESTS 38 248 0 1900
30868654 xracer108 thesis_007 Owwee D Sept. 30, 2017, 2:05 p.m. OK Java 8 TESTS 38 248 0 1900
16886060 Sumeet.Varma D March 23, 2016, 12:26 p.m. OK Java 8 TESTS 38 248 20684800 1900
57903697 Ahmed.Shawky D July 28, 2019, 4:44 p.m. OK Java 8 TESTS 38 280 0 1900
12677864 poikniok D Aug. 23, 2015, 10:06 p.m. OK Java 8 TESTS 38 280 0 1900
25013407 Kammola D Feb. 25, 2017, 1:19 p.m. OK Java 8 TESTS 38 280 24883200 1900
24605996 Ahmad_Elsagheer D Feb. 12, 2017, 10:11 a.m. OK Java 8 TESTS 38 280 24883200 1900
60676579 ISSAM_LAKOUAM D Sept. 16, 2019, 12:37 p.m. OK Java 8 TESTS 38 310 0 1900
10637562 fnch D April 9, 2015, 8:05 a.m. OK Java 8 TESTS 38 310 0 1900
9287593 AStepanov D Dec. 27, 2014, 10:36 p.m. OK Java 8 TESTS 38 310 0 1900
2890662 kolya1999 D Jan. 8, 2013, 4:52 p.m. OK Mono C# TESTS 38 62 15462400 1900
2904620 suxing11 D Jan. 11, 2013, 9:50 a.m. OK Mono C# TESTS 38 156 16281600 1900
2894840 dwoolley3 D Jan. 9, 2013, 2:18 a.m. OK Mono C# TESTS 38 171 13721600 1900
2894116 stifff D Jan. 8, 2013, 7:27 p.m. OK Mono C# TESTS 38 171 14028800 1900
51943535 hongquanntct D March 28, 2019, 3:36 p.m. OK Mono C# TESTS 38 186 16998400 1900
2898474 NickSerg D Jan. 9, 2013, 8:05 a.m. OK Mono C# TESTS 38 187 15360000 1900
2896381 jonyrock D Jan. 9, 2013, 6:43 a.m. OK Mono C# TESTS 38 218 19251200 1900
2896387 jonyrock D Jan. 9, 2013, 6:47 a.m. OK Mono C# TESTS 38 218 19251200 1900
2909440 Eugene D Jan. 12, 2013, 8:26 p.m. OK Mono C# TESTS 38 234 67276800 1900
2887564 olpetOdessaONU D Jan. 8, 2013, 4:01 p.m. OK MS C++ TESTS 38 31 512000 1900
2896282 heianzhixiang D Jan. 9, 2013, 6:26 a.m. OK MS C++ TESTS 38 31 512000 1900
3011269 tomas.svab D Jan. 26, 2013, 9:20 a.m. OK MS C++ TESTS 38 46 512000 1900
2899621 illuminator D Jan. 9, 2013, 1:53 p.m. OK MS C++ TESTS 38 46 512000 1900
2899359 illuminator D Jan. 9, 2013, 12:21 p.m. OK MS C++ TESTS 38 46 512000 1900
2888177 Milanin D Jan. 8, 2013, 4:10 p.m. OK MS C++ TESTS 38 46 512000 1900
3226812 GeKa D March 1, 2013, 6:40 p.m. OK MS C++ TESTS 38 46 614400 1900
2889558 Hohol D Jan. 8, 2013, 4:33 p.m. OK MS C++ TESTS 38 46 716800 1900
2894889 HIR180 D Jan. 9, 2013, 2:45 a.m. OK MS C++ TESTS 38 46 716800 1900
2894812 alexander-nsk94 D Jan. 9, 2013, 1:53 a.m. OK MS C++ TESTS 38 46 921600 1900
2894058 Darooha D Jan. 8, 2013, 7:16 p.m. OK Ocaml TESTS 38 78 1126400 1900
2890024 navi D Jan. 8, 2013, 4:40 p.m. OK Perl TESTS 38 218 24985600 1900
3233944 treshaque D March 3, 2013, 10:58 a.m. OK Python 2 TESTS 38 171 6451200 1900
2960173 Gzs_iceberg D Jan. 19, 2013, 3:20 p.m. OK Python 2 TESTS 38 187 5529600 1900
2928646 goooooooopan D Jan. 16, 2013, 6:16 a.m. OK Python 2 TESTS 38 187 5632000 1900
3828166 tryPython D June 6, 2013, 2:05 p.m. OK Python 2 TESTS 38 203 5529600 1900
2899361 TempuX D Jan. 9, 2013, 12:21 p.m. OK Python 2 TESTS 38 203 5734400 1900
3482304 daidailanlan D April 7, 2013, 2:45 p.m. OK Python 2 TESTS 38 218 5529600 1900
2905511 nealzane D Jan. 11, 2013, 3:52 p.m. OK Python 2 TESTS 38 218 5734400 1900
2979739 vapour18 D Jan. 21, 2013, 2:51 p.m. OK Python 2 TESTS 38 218 5836800 1900
2894077 tyamgin D Jan. 8, 2013, 7:20 p.m. OK Python 2 TESTS 38 218 5836800 1900
3097512 I_love_Malika D Feb. 11, 2013, 4:04 p.m. OK Python 2 TESTS 38 234 5836800 1900
5475356 yugle7 D Dec. 19, 2013, 1:27 p.m. OK Python 3 TESTS 38 248 9728000 1900
14249489 tflave D Nov. 14, 2015, 7:12 a.m. OK Python 3 TESTS 38 310 9113600 1900
4365444 __ivan__ D Aug. 29, 2013, 10:26 a.m. OK Python 3 TESTS 38 312 9830400 1900
45133235 prakhar17252 madhav_1999 Savit_Gupta D Oct. 31, 2018, 11:17 a.m. OK Python 3 TESTS 38 374 8806400 1900
68467604 SinKing D Jan. 9, 2020, 9:39 p.m. OK Python 3 TESTS 38 374 9523200 1900
2928997 YoriK D Jan. 16, 2013, 8:35 a.m. OK Ruby TESTS 38 359 6860800 1900
2891859 cgy4ever D Jan. 8, 2013, 5:14 p.m. OK Scala TESTS 38 468 512000 1900
3142332 peking2 D Feb. 18, 2013, 7:22 a.m. OK Scala TESTS 38 484 819200 1900
3142342 peking2 D Feb. 18, 2013, 7:26 a.m. OK Scala TESTS 38 500 819200 1900
3142348 peking2 D Feb. 18, 2013, 7:27 a.m. OK Scala TESTS 38 531 819200 1900
2994782 ixxa D Jan. 23, 2013, 1:45 a.m. OK Scala TESTS 38 859 11161600 1900

remove filters

Back to search problems