Codeforces Round 117 (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
182 Codeforces Round 117 (Div. 2) FINISHED False 7200 402590986 April 24, 2012, 3:10 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 751 ) C Optimal Sum PROGRAMMING data structures greedy 2300

B"And here goes another problem on arrays. You are given positive integer len and array a which consists of n integers a1, a2, ..., an. Let's introduce two characteristics for the given array. Your task is to calculate the optimal sum of the given array a. However, before you do the calculations, you are allowed to produce no more than k consecutive operations of the following form with this array: one operation means taking an arbitrary number from array ai and multiply it by -1. In other words, no more than k times you are allowed to take an arbitrary number ai from the array and replace it with xe2 x80 x89- xe2 x80 x89ai. Each number of the array is allowed to choose an arbitrary number of times. Your task is to calculate the maximum possible optimal sum of the array after at most k operations described above are completed. The first line contains two integers n, len (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89len xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89105) -- the number of elements in the array and the length of the chosen subinterval of the array, correspondingly. The second line contains a sequence consisting of n integers a1, a2, ..., an (|ai| xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89109) -- the original array. The third line contains a single integer k (0 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89k xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n) -- the maximum allowed number of operations. All numbers in lines are separated by a single space. In a single line print the maximum possible optimal sum after no more than k acceptable operations are fulfilled. Please do not use the %lld specifier to read or write 64-bit integers in xd0 xa1++. It is preferred to use cin, cout streams or the %I64d specifier."...

Tutorials

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

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
1624701 BaJIuK C April 24, 2012, 5:07 p.m. OK Delphi TESTS 68 90 19763200 2300
3294016 MrJigan1488 C March 12, 2013, 10:32 a.m. OK Delphi TESTS 68 187 45465600 2300
1627614 Toshik C April 25, 2012, 3:01 p.m. OK Delphi TESTS 68 250 32972800 2300
1624174 Rubanenko C April 24, 2012, 4:49 p.m. OK Delphi TESTS 68 390 11366400 2300
4165113 ZeRoGerc C July 25, 2013, 5:02 p.m. OK FPC TESTS 68 156 3174400 2300
11271218 Amr_Hassan C May 25, 2015, 10:14 p.m. OK FPC TESTS 68 186 32051200 2300
1723085 whitetooth C May 27, 2012, 2:05 a.m. OK FPC TESTS 68 200 4710400 2300
1624557 Miriam C April 24, 2012, 5:02 p.m. OK FPC TESTS 68 200 20275200 2300
1837483 RazeN C June 29, 2012, 6:37 a.m. OK FPC TESTS 68 200 20377600 2300
1623732 vlad107 C April 24, 2012, 4:35 p.m. OK FPC TESTS 68 220 17100800 2300
1624829 rookie1 C April 24, 2012, 5:09 p.m. OK FPC TESTS 68 220 20275200 2300
4054167 Nik_Storm_2010 C July 12, 2013, 9:28 a.m. OK FPC TESTS 68 234 22528000 2300
1670426 blackapple C May 9, 2012, 7:54 a.m. OK FPC TESTS 68 250 5939200 2300
1623120 Sereja C April 24, 2012, 4:16 p.m. OK FPC TESTS 68 250 33075200 2300
1965078 vjudge1 C July 31, 2012, 1:11 p.m. OK GNU C TESTS 68 190 31129600 2300
1965065 pictureyong C July 31, 2012, 1:07 p.m. OK GNU C TESTS 68 190 31129600 2300
2040358 ChuckLin2014 C Aug. 21, 2012, 1:29 p.m. OK GNU C++ TESTS 68 80 3584000 2300
1626384 shinian C April 25, 2012, 7:52 a.m. OK GNU C++ TESTS 68 90 2867200 2300
1626383 shinian C April 25, 2012, 7:51 a.m. OK GNU C++ TESTS 68 90 2867200 2300
1628461 vietnam C April 26, 2012, 3:15 a.m. OK GNU C++ TESTS 68 90 6553600 2300
1809786 zcg.cs60 C June 19, 2012, 5:53 a.m. OK GNU C++ TESTS 68 90 7884800 2300
27356446 yash_15 C May 26, 2017, 1:30 p.m. OK GNU C++ TESTS 68 92 2457600 2300
4308360 xin5739 C Aug. 18, 2013, 12:30 p.m. OK GNU C++ TESTS 68 92 2457600 2300
9085934 RetiredAmrMahmoud C Dec. 11, 2014, 9:32 p.m. OK GNU C++ TESTS 68 92 2867200 2300
2995081 AstroConjecture C Jan. 23, 2013, 3:51 a.m. OK GNU C++ TESTS 68 93 3584000 2300
4047684 vjudge4 C July 10, 2013, 5:39 p.m. OK GNU C++ TESTS 68 109 2252800 2300
6999089 GaryYe C July 2, 2014, 6:32 p.m. OK GNU C++0x TESTS 68 92 3993600 2300
3365042 ishikado C March 21, 2013, 12:23 p.m. OK GNU C++0x TESTS 68 125 5017600 2300
1625881 jiangzhijie C April 25, 2012, 2:35 a.m. OK GNU C++0x TESTS 68 140 3379200 2300
3365142 ishikado C March 21, 2013, 12:41 p.m. OK GNU C++0x TESTS 68 140 5017600 2300
3365061 ishikado C March 21, 2013, 12:25 p.m. OK GNU C++0x TESTS 68 140 5017600 2300
3364588 ishikado C March 21, 2013, 11:15 a.m. OK GNU C++0x TESTS 68 140 5017600 2300
1705447 dianbei C May 20, 2012, 7:06 a.m. OK GNU C++0x TESTS 68 140 6860800 2300
1705443 dianbei C May 20, 2012, 7:06 a.m. OK GNU C++0x TESTS 68 140 6860800 2300
1628870 Archon.JK C April 26, 2012, 8:42 a.m. OK GNU C++0x TESTS 68 160 4812800 2300
8833121 hakobyan.tigran C Nov. 24, 2014, 10:15 a.m. OK GNU C++0x TESTS 68 186 3584000 2300
50427801 muhammedaly C Feb. 24, 2019, 12:27 p.m. OK GNU C++11 TESTS 68 124 1945600 2300
54525285 racoon C May 23, 2019, 2:12 p.m. OK GNU C++11 TESTS 68 124 2048000 2300
13226679 SaMer C Sept. 26, 2015, 1:36 a.m. OK GNU C++11 TESTS 68 124 2048000 2300
19918101 Daniar C Aug. 17, 2016, 2:09 a.m. OK GNU C++11 TESTS 68 124 4096000 2300
27948978 Superstorm4242 C June 21, 2017, 3:37 p.m. OK GNU C++11 TESTS 68 124 4198400 2300
25830026 KevinX C March 27, 2017, 1:51 a.m. OK GNU C++11 TESTS 68 124 4198400 2300
14117931 suckerr C Nov. 7, 2015, 6:56 a.m. OK GNU C++11 TESTS 68 154 2048000 2300
13224267 2360 C Sept. 25, 2015, 7:28 p.m. OK GNU C++11 TESTS 68 154 2355200 2300
40019730 RNS_MHB C July 6, 2018, 5:54 a.m. OK GNU C++11 TESTS 68 154 3481600 2300
20310032 tenshi_kanade C Aug. 31, 2016, 6:52 p.m. OK GNU C++11 TESTS 68 154 3481600 2300
21059830 McGinn C Oct. 1, 2016, 7:33 a.m. OK GNU C++14 TESTS 68 124 2252800 2300
50427868 muhammedaly C Feb. 24, 2019, 12:29 p.m. OK GNU C++14 TESTS 68 156 2150400 2300
50427746 mou3ly C Feb. 24, 2019, 12:25 p.m. OK GNU C++14 TESTS 68 156 2150400 2300
50427609 mou3ly C Feb. 24, 2019, 12:21 p.m. OK GNU C++14 TESTS 68 156 2150400 2300
46019475 vovanstrr C Nov. 21, 2018, 6:57 a.m. OK GNU C++14 TESTS 68 156 2150400 2300
39938103 Y.Almohandes C July 3, 2018, 11:47 p.m. OK GNU C++14 TESTS 68 156 2150400 2300
67698936 mota_haathi C Dec. 27, 2019, 1:51 p.m. OK GNU C++14 TESTS 68 156 2252800 2300
43412532 w446506278 C Sept. 25, 2018, 2:03 p.m. OK GNU C++14 TESTS 68 156 2252800 2300
27201654 wewark C May 18, 2017, 5:19 p.m. OK GNU C++14 TESTS 68 156 2560000 2300
56372010 rfpermen C July 1, 2019, 4:19 a.m. OK GNU C++14 TESTS 68 156 3276800 2300
55848613 chongryong C June 21, 2019, 1:12 a.m. OK GNU C++17 TESTS 68 122 2560000 2300
51777784 KKOOPP C March 24, 2019, 12:46 a.m. OK GNU C++17 TESTS 68 124 6451200 2300
40562683 islammohsen C July 20, 2018, 2:15 a.m. OK GNU C++17 TESTS 68 156 2150400 2300
66224252 lonerunner C Dec. 3, 2019, 11:58 a.m. OK GNU C++17 TESTS 68 156 2252800 2300
45324520 noelcowm C Nov. 5, 2018, 12:16 p.m. OK GNU C++17 TESTS 68 156 2252800 2300
45652932 ghoast C Nov. 13, 2018, 3:32 a.m. OK GNU C++17 TESTS 68 156 2355200 2300
44474905 ruo C Oct. 18, 2018, 8:23 a.m. OK GNU C++17 TESTS 68 156 3174400 2300
56430765 ish.ranga11 C July 2, 2019, 11:56 a.m. OK GNU C++17 TESTS 68 186 2252800 2300
55110131 Left_utkarsh C June 5, 2019, 5:45 a.m. OK GNU C++17 TESTS 68 186 2969600 2300
61229697 mrsac7 C Sept. 24, 2019, 4:13 p.m. OK GNU C++17 TESTS 68 186 3686400 2300
1626139 uwi C April 25, 2012, 5:27 a.m. OK Java 6 TESTS 68 220 43417600 2300
1623324 shevchen C April 24, 2012, 4:22 p.m. OK Java 6 TESTS 68 270 43417600 2300
1623530 SkorKNURE C April 24, 2012, 4:29 p.m. OK Java 6 TESTS 68 270 44544000 2300
1628024 Sinner C April 25, 2012, 5:33 p.m. OK Java 6 TESTS 68 300 45056000 2300
1624985 AlexanderBolshakov C April 24, 2012, 6:46 p.m. OK Java 6 TESTS 68 410 46592000 2300
1626606 Egor C April 25, 2012, 9:28 a.m. OK Java 6 TESTS 68 590 43622400 2300
1627282 Reshetnikov_Ivan C April 25, 2012, 1:36 p.m. OK Java 6 TESTS 68 730 43315200 2300
1627271 Reshetnikov_Ivan C April 25, 2012, 1:33 p.m. OK Java 6 TESTS 68 730 43315200 2300
1664195 zjut_DD C May 5, 2012, 12:51 p.m. OK Java 6 TESTS 68 860 45363200 2300
1652557 AlexanderBolshakov C May 4, 2012, 2:33 p.m. OK Java 6 TESTS 68 940 56422400 2300
1623346 mmaxio C April 24, 2012, 4:23 p.m. OK Java 7 TESTS 68 250 45158400 2300
4136783 gcd_fuck C July 22, 2013, 4:49 p.m. OK Java 7 TESTS 68 296 307200 2300
2420418 Uncia C Oct. 24, 2012, 8:19 a.m. OK Java 7 TESTS 68 328 307200 2300
12693809 free.dom C Aug. 25, 2015, 9:32 a.m. OK Java 7 TESTS 68 404 512000 2300
2310149 trunghieu11 C Oct. 7, 2012, 7:46 a.m. OK Java 7 TESTS 68 578 307200 2300
6904663 himalay C June 18, 2014, 10:02 a.m. OK Java 7 TESTS 68 684 307200 2300
16865788 xiaowuc1 C March 22, 2016, 3:43 a.m. OK Java 7 TESTS 68 686 45977600 2300
16850523 xiaowuc1 C March 21, 2016, 6:08 a.m. OK Java 7 TESTS 68 778 50585600 2300
1627272 Reshetnikov_Ivan C April 25, 2012, 1:33 p.m. OK Java 7 TESTS 68 780 45158400 2300
35974859 parth_15 C March 5, 2018, 6:50 p.m. OK Java 8 TESTS 68 404 20787200 2300
53143506 Verdusk C April 22, 2019, 3:21 p.m. OK Java 8 TESTS 68 530 4403200 2300
12080898 AndreiNet C July 16, 2015, 8:44 a.m. OK Java 8 TESTS 68 560 0 2300
53146675 Verdusk C April 22, 2019, 3:32 p.m. OK Java 8 TESTS 68 560 5017600 2300
26598216 Bruteforceman C April 23, 2017, 7:55 a.m. OK Java 8 TESTS 68 560 24780800 2300
58478128 adityagupta1089 C Aug. 9, 2019, 4:01 a.m. OK Java 8 TESTS 68 748 819200 2300
3998739 patkovskyi C July 1, 2013, 8:34 a.m. OK MS C# TESTS 68 625 27136000 2300
3998733 patkovskyi C July 1, 2013, 8:31 a.m. OK MS C# TESTS 68 640 27238400 2300
1623940 Scorpions C April 24, 2012, 4:42 p.m. OK MS C++ TESTS 68 90 5427200 2300
5817780 proVIDec C Jan. 27, 2014, 8:14 a.m. OK MS C++ TESTS 68 92 3276800 2300
1623119 emppu C April 24, 2012, 4:16 p.m. OK MS C++ TESTS 68 110 7270400 2300
40991326 ReaLNero1 C July 31, 2018, 12:34 a.m. OK MS C++ TESTS 68 124 4403200 2300
4037373 vjudge4 C July 8, 2013, 6:49 a.m. OK MS C++ TESTS 68 125 2252800 2300
1632567 PanZverski C April 27, 2012, 5:01 p.m. OK MS C++ TESTS 68 130 3379200 2300
1624984 luckyi C April 24, 2012, 6:46 p.m. OK MS C++ TESTS 68 130 3379200 2300
1764682 maksay C June 4, 2012, 6:07 p.m. OK MS C++ TESTS 68 140 4915200 2300
1625283 vsb C April 24, 2012, 7:28 p.m. OK MS C++ TESTS 68 140 5120000 2300
13212253 Hasan0540 C Sept. 25, 2015, 2:08 a.m. OK MS C++ TESTS 68 156 2150400 2300

remove filters

Back to search problems