Codeforces Round 204 (Div. 1)

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
351 Codeforces Round 204 (Div. 1) FINISHED False 7200 356625023 Oct. 4, 2013, 3:30 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 2944 ) A Jeff and Rounding PROGRAMMING dp greedy implementation math 1900

B'Jeff got 2n real numbers a1, xe2 x80 x89a2, xe2 x80 x89..., xe2 x80 x89a2n as a birthday present. The boy hates non-integer numbers, so he decided to slightly "adjust" the numbers he 's got. Namely, Jeff consecutively executes n operations, each of them goes as follows: Nevertheless, Jeff doesn 't want to hurt the feelings of the person who gave him the sequence. That 's why the boy wants to perform the operations so as to make the absolute value of the difference between the sum of elements before performing the operations and the sum of elements after performing the operations as small as possible. Help Jeff find the minimum absolute value of the difference. The first line contains integer n (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x892000). The next line contains 2n real numbers a1, a2, ..., a2n (0 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89ai xe2 x80 x89 xe2 x89 xa4 xe2 x80 x8910000), given with exactly three digits after the decimal point. The numbers are separated by spaces. In a single line print a single real number -- the required difference with exactly three digits after the decimal point. In the first test case you need to perform the operations as follows: (i xe2 x80 x89= xe2 x80 x891, xe2 x80 x89j xe2 x80 x89= xe2 x80 x894), (i xe2 x80 x89= xe2 x80 x892, xe2 x80 x89j xe2 x80 x89= xe2 x80 x893), (i xe2 x80 x89= xe2 x80 x895, xe2 x80 x89j xe2 x80 x89= xe2 x80 x896). In this case, the difference will equal |(0 xe2 x80 x89+ xe2 x80 x890.5 xe2 x80 x89+ xe2 x80 x890.75 xe2 x80 x89+ xe2 x80 x891 xe2 x80 x89+ xe2 x80 x892 xe2 x80 x89+ xe2 x80 x893) xe2 x80 x89- xe2 x80 x89(0 xe2 x80 x89+ xe2 x80 x890 xe2 x80 x89+ xe2 x80 x891 xe2 x80 x89+ xe2 x80 x891 xe2 x80 x89+ xe2 x80 x892 xe2 x80 x89+ xe2 x80 x893)| xe2 x80 x89= xe2 x80 x890.25. '...

Tutorials

Codeforces Round #204 — tutorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
4685349 Misha100896 A Oct. 6, 2013, 6:16 a.m. OK Delphi TESTS 63 30 102400 1900
4674847 Casio A Oct. 4, 2013, 7:55 p.m. OK Delphi TESTS 63 30 102400 1900
4674831 Casio A Oct. 4, 2013, 7:53 p.m. OK Delphi TESTS 63 30 102400 1900
4688710 ruban A Oct. 6, 2013, 2:33 p.m. OK Delphi TESTS 63 30 42496000 1900
4927725 BLADEVILc A Oct. 29, 2013, 10:07 a.m. OK FPC TESTS 63 15 0 1900
4927492 Romantic_an A Oct. 29, 2013, 9:25 a.m. OK FPC TESTS 63 15 2252800 1900
6941071 SanSiroWaltz A June 22, 2014, 7:48 a.m. OK FPC TESTS 63 30 0 1900
5615967 zhzq123 A Jan. 4, 2014, 1:04 p.m. OK FPC TESTS 63 30 0 1900
5415631 yangsyp727 A Dec. 12, 2013, 3:32 p.m. OK FPC TESTS 63 30 0 1900
4823996 kamc A Oct. 19, 2013, 9:43 a.m. OK FPC TESTS 63 30 0 1900
4681215 RoundDog A Oct. 5, 2013, 1:27 p.m. OK FPC TESTS 63 30 0 1900
4673274 minhduc150496 A Oct. 4, 2013, 6:09 p.m. OK FPC TESTS 63 30 0 1900
4671681 Um_nik A Oct. 4, 2013, 5:26 p.m. OK FPC TESTS 63 30 0 1900
4663266 orzkac A Oct. 4, 2013, 4:05 p.m. OK FPC TESTS 63 30 0 1900
4709145 herotan24 A Oct. 8, 2013, 2:25 p.m. OK GNU C TESTS 63 30 0 1900
4709121 herotan24 A Oct. 8, 2013, 2:20 p.m. OK GNU C TESTS 63 30 0 1900
25809882 hongzhiyin A March 26, 2017, 3:28 a.m. OK GNU C TESTS 63 30 1843200 1900
4927499 gmcather A Oct. 29, 2013, 9:27 a.m. OK GNU C++ TESTS 63 15 0 1900
4922489 bunoi A Oct. 28, 2013, 5:42 p.m. OK GNU C++ TESTS 63 15 0 1900
4909875 lechjeda A Oct. 27, 2013, 7:34 a.m. OK GNU C++ TESTS 63 15 0 1900
4909856 lechjeda A Oct. 27, 2013, 7:31 a.m. OK GNU C++ TESTS 63 15 0 1900
4909643 fqw A Oct. 27, 2013, 6:23 a.m. OK GNU C++ TESTS 63 15 0 1900
4929840 HoangNguyen A Oct. 29, 2013, 3:54 p.m. OK GNU C++ TESTS 63 15 204800 1900
30203967 lllllllllllllllllllllll A Sept. 8, 2017, 2:03 p.m. OK GNU C++ TESTS 63 30 0 1900
21954354 nitvjudge2 A Nov. 1, 2016, 1:59 a.m. OK GNU C++ TESTS 63 30 0 1900
21863019 vjudge3 A Oct. 29, 2016, 4:07 a.m. OK GNU C++ TESTS 63 30 0 1900
21056211 XC_KiwiBerry A Oct. 1, 2016, 4:33 a.m. OK GNU C++ TESTS 63 30 0 1900
8899380 soda_beta A Nov. 30, 2014, 4:26 p.m. OK GNU C++0x TESTS 63 30 0 1900
8898389 Konoha A Nov. 30, 2014, 1:31 p.m. OK GNU C++0x TESTS 63 30 0 1900
7570743 zshi A Aug. 25, 2014, 6:03 a.m. OK GNU C++0x TESTS 63 30 0 1900
7352371 delta_4d A Aug. 5, 2014, 12:11 p.m. OK GNU C++0x TESTS 63 30 0 1900
6265502 Fcdkbear A April 5, 2014, 5:26 p.m. OK GNU C++0x TESTS 63 30 0 1900
6023279 whn6325689 A March 16, 2014, 2:24 a.m. OK GNU C++0x TESTS 63 30 0 1900
5343449 niklasb A Dec. 3, 2013, 3:25 p.m. OK GNU C++0x TESTS 63 30 0 1900
4949981 Archon.JK A Nov. 1, 2013, 9:29 a.m. OK GNU C++0x TESTS 63 30 0 1900
4725334 Shik A Oct. 10, 2013, 1:13 p.m. OK GNU C++0x TESTS 63 30 0 1900
4696708 ericpts A Oct. 6, 2013, 7:01 p.m. OK GNU C++0x TESTS 63 30 0 1900
58505525 rainboy A Aug. 9, 2019, 4:16 p.m. OK GNU C11 TESTS 63 62 0 1900
26875870 EsTer A May 5, 2017, 8:11 a.m. OK GNU C++11 TESTS 63 30 0 1900
21954429 787930982 A Nov. 1, 2016, 2:04 a.m. OK GNU C++11 TESTS 63 30 0 1900
20808254 mpgaillard A Sept. 22, 2016, 12:40 a.m. OK GNU C++11 TESTS 63 30 0 1900
20335192 zhanglanqing A Sept. 2, 2016, 5:34 a.m. OK GNU C++11 TESTS 63 30 0 1900
19393389 fitsh A July 25, 2016, 3:21 a.m. OK GNU C++11 TESTS 63 30 0 1900
32532721 RobeZH A Nov. 21, 2017, 5:56 p.m. OK GNU C++11 TESTS 63 30 0 1900
19145969 _TooNaive_ A July 15, 2016, 7:19 a.m. OK GNU C++11 TESTS 63 30 0 1900
19145568 vjudge1 A July 15, 2016, 7:03 a.m. OK GNU C++11 TESTS 63 30 0 1900
27225855 RNS_CUS A May 20, 2017, 12:38 a.m. OK GNU C++11 TESTS 63 30 0 1900
30940761 DTDT A Oct. 2, 2017, 11:18 a.m. OK GNU C++11 TESTS 63 30 0 1900
29642366 danya.smelskiy A Aug. 21, 2017, 11:40 a.m. OK GNU C++14 TESTS 63 30 0 1900
49691618 rdd6584 A Feb. 10, 2019, 11:33 a.m. OK GNU C++14 TESTS 63 30 0 1900
31287135 greenTick A Oct. 14, 2017, 1:38 a.m. OK GNU C++14 TESTS 63 30 0 1900
31238865 cscscs A Oct. 12, 2017, 11:12 a.m. OK GNU C++14 TESTS 63 30 0 1900
30859692 300iq A Sept. 30, 2017, 8:46 a.m. OK GNU C++14 TESTS 63 30 0 1900
30642325 Lucky_Sanae A Sept. 23, 2017, 1:05 p.m. OK GNU C++14 TESTS 63 30 0 1900
30322783 Kerim.K A Sept. 14, 2017, 8:22 a.m. OK GNU C++14 TESTS 63 30 0 1900
30322591 Kerim.K A Sept. 14, 2017, 8:07 a.m. OK GNU C++14 TESTS 63 30 0 1900
27226748 RNS3 A May 20, 2017, 2:30 a.m. OK GNU C++14 TESTS 63 30 0 1900
27225767 RNS_JKS A May 20, 2017, 12:27 a.m. OK GNU C++14 TESTS 63 30 0 1900
58784373 spectaclehong A Aug. 13, 2019, 9:10 p.m. OK GNU C++17 TESTS 63 62 0 1900
53474352 SGHD A April 28, 2019, 2:32 p.m. OK GNU C++17 TESTS 63 62 0 1900
49738836 oridya A Feb. 10, 2019, 6:20 p.m. OK GNU C++17 TESTS 63 62 0 1900
49737002 oridya A Feb. 10, 2019, 5:53 p.m. OK GNU C++17 TESTS 63 62 0 1900
49683231 whyamievenhere A Feb. 10, 2019, 4:58 a.m. OK GNU C++17 TESTS 63 62 0 1900
47720680 logic123 A Dec. 30, 2018, 11:03 a.m. OK GNU C++17 TESTS 63 62 0 1900
47357812 vjudge5 A Dec. 22, 2018, 7:09 a.m. OK GNU C++17 TESTS 63 62 0 1900
55317886 ruo A June 9, 2019, 1:01 a.m. OK GNU C++17 TESTS 63 62 0 1900
68704905 A_root_A A Jan. 13, 2020, 10:54 a.m. OK GNU C++17 TESTS 63 62 102400 1900
69671028 antontrygubO_o A Jan. 28, 2020, 1 p.m. OK GNU C++17 TESTS 63 62 204800 1900
4704935 sa1 A Oct. 7, 2013, 10:33 p.m. OK Haskell TESTS 63 62 1126400 1900
4704786 sa1 A Oct. 7, 2013, 9:48 p.m. OK Haskell TESTS 63 62 1126400 1900
4664722 autotaker A Oct. 4, 2013, 4:16 p.m. OK Haskell TESTS 63 62 1126400 1900
4663798 Vbifial A Oct. 4, 2013, 4:09 p.m. OK Java 6 TESTS 63 156 204800 1900
4663658 mkirsche A Oct. 4, 2013, 4:08 p.m. OK Java 6 TESTS 63 156 307200 1900
4661723 wackloner A Oct. 4, 2013, 3:55 p.m. OK Java 6 TESTS 63 156 307200 1900
9341688 xiaowuc1 A Jan. 1, 2015, 7:54 p.m. OK Java 6 TESTS 63 186 0 1900
4682081 Ljubitel A Oct. 5, 2013, 3:35 p.m. OK Java 6 TESTS 63 186 0 1900
6676436 monyone A May 21, 2014, 6:06 p.m. OK Java 6 TESTS 63 186 307200 1900
4679022 llaki A Oct. 5, 2013, 8:48 a.m. OK Java 6 TESTS 63 186 2252800 1900
4669243 coderbd A Oct. 4, 2013, 5 p.m. OK Java 6 TESTS 63 218 204800 1900
4668781 bohuss A Oct. 4, 2013, 4:55 p.m. OK Java 6 TESTS 63 312 204800 1900
4761576 jsannemo A Oct. 12, 2013, 8:03 p.m. OK Java 6 TESTS 63 560 409600 1900
5482543 miguelmaurizio A Dec. 20, 2013, 6:42 p.m. OK Java 7 TESTS 63 124 102400 1900
4664344 Sinner A Oct. 4, 2013, 4:13 p.m. OK Java 7 TESTS 63 156 0 1900
4659797 ilyakor A Oct. 4, 2013, 3:44 p.m. OK Java 7 TESTS 63 156 0 1900
5639993 DoublePointer A Jan. 8, 2014, 9:58 p.m. OK Java 7 TESTS 63 156 307200 1900
4950225 Saguntoz A Nov. 1, 2013, 10:29 a.m. OK Java 7 TESTS 63 156 307200 1900
4672585 chavit A Oct. 4, 2013, 5:52 p.m. OK Java 7 TESTS 63 156 307200 1900
4666136 mrNobody A Oct. 4, 2013, 4:29 p.m. OK Java 7 TESTS 63 156 307200 1900
4706870 mostafa_fahim A Oct. 8, 2013, 7:55 a.m. OK Java 7 TESTS 63 186 0 1900
4663536 sweiss A Oct. 4, 2013, 4:07 p.m. OK Java 7 TESTS 63 186 0 1900
4661961 Egor A Oct. 4, 2013, 3:56 p.m. OK Java 7 TESTS 63 186 0 1900
45084813 hongquanntct A Oct. 30, 2018, 6:35 a.m. OK Java 8 TESTS 63 218 0 1900
10308618 fnch A March 17, 2015, 9:43 a.m. OK Java 8 TESTS 63 248 0 1900
25696037 pitfall A March 21, 2017, 5:05 p.m. OK Java 8 TESTS 63 248 20889600 1900
40906963 KulikAlex A July 29, 2018, 6:25 a.m. OK Java 8 TESTS 63 310 0 1900
11408182 hama-du A June 4, 2015, 1:33 a.m. OK Java 8 TESTS 63 310 0 1900
11128808 AlexFetisov A May 17, 2015, 5:38 p.m. OK Java 8 TESTS 63 310 0 1900
58505524 Dukkha A Aug. 9, 2019, 4:16 p.m. OK Java 8 TESTS 63 404 0 1900
17917917 duckladydinh A May 15, 2016, 9:51 a.m. OK Java 8 TESTS 63 436 65228800 1900
17917939 duckladydinh A May 15, 2016, 9:53 a.m. OK Java 8 TESTS 63 436 65331200 1900
28936768 kunalk A July 27, 2017, 7:06 p.m. OK Java 8 TESTS 63 498 40345600 1900
11411267 lydxlx A June 4, 2015, 8:37 a.m. OK Mono C# TESTS 63 92 921600 1900
4724376 helper A Oct. 10, 2013, 11:02 a.m. OK MS C# TESTS 63 62 409600 1900
4723441 helper A Oct. 10, 2013, 8:56 a.m. OK MS C# TESTS 63 92 307200 1900
4676881 dwoolley3 A Oct. 5, 2013, 3:06 a.m. OK MS C# TESTS 63 92 307200 1900
4724279 helper A Oct. 10, 2013, 10:48 a.m. OK MS C# TESTS 63 92 307200 1900
4673361 QuantumKnight A Oct. 4, 2013, 6:12 p.m. OK MS C# TESTS 63 92 409600 1900
4664904 Eugene A Oct. 4, 2013, 4:18 p.m. OK MS C# TESTS 63 92 2662400 1900
4662469 fiver A Oct. 4, 2013, 4 p.m. OK MS C# TESTS 63 92 70553600 1900
5808866 EmK A Jan. 25, 2014, 8:12 p.m. OK MS C# TESTS 63 124 2560000 1900
15385314 og.kostya A Jan. 15, 2016, 8:50 a.m. OK MS C# TESTS 63 154 2457600 1900
9733149 azukun A Feb. 6, 2015, 3:16 a.m. OK MS C# TESTS 63 154 3276800 1900
4927390 lyre_rabbit A Oct. 29, 2013, 9:05 a.m. OK MS C++ TESTS 63 15 0 1900
5829774 maozaozao A Jan. 29, 2014, 5:14 a.m. OK MS C++ TESTS 63 30 0 1900
5663035 jimmykobe1171 A Jan. 12, 2014, 5:43 a.m. OK MS C++ TESTS 63 30 0 1900
5611469 dolboeb A Jan. 3, 2014, 4:48 p.m. OK MS C++ TESTS 63 30 0 1900
5097939 Tom. A Nov. 14, 2013, 1:58 p.m. OK MS C++ TESTS 63 30 0 1900
4979151 tomlau A Nov. 3, 2013, 12:35 p.m. OK MS C++ TESTS 63 30 0 1900
4942378 serglag A Oct. 31, 2013, 10:13 a.m. OK MS C++ TESTS 63 30 0 1900
4826756 genadz A Oct. 19, 2013, 6:26 p.m. OK MS C++ TESTS 63 30 0 1900
7446330 redjohn A Aug. 14, 2014, 2:33 p.m. OK MS C++ TESTS 63 30 0 1900
6105644 vjudge4 A March 22, 2014, 1:53 p.m. OK MS C++ TESTS 63 30 0 1900
55129374 CtrlAlt A June 5, 2019, 2:27 p.m. OK MS C++ 2017 TESTS 63 62 0 1900
4678060 nealzane A Oct. 5, 2013, 6:48 a.m. OK Python 2 TESTS 63 62 409600 1900
4677241 equation314 A Oct. 5, 2013, 4:24 a.m. OK Python 2 TESTS 63 62 409600 1900
4672830 nwi A Oct. 4, 2013, 5:56 p.m. OK Python 2 TESTS 63 92 307200 1900
4723062 spy A Oct. 10, 2013, 7:54 a.m. OK Python 2 TESTS 63 92 409600 1900
7453834 olive A Aug. 15, 2014, 1:52 p.m. OK Python 2 TESTS 63 92 409600 1900
5055312 Unlenin A Nov. 10, 2013, 8:01 p.m. OK Python 2 TESTS 63 92 409600 1900
4704549 Thomas_Ahle A Oct. 7, 2013, 8:39 p.m. OK Python 2 TESTS 63 92 409600 1900
4704540 Thomas_Ahle A Oct. 7, 2013, 8:37 p.m. OK Python 2 TESTS 63 92 409600 1900
4702270 rentlong A Oct. 7, 2013, 2:02 p.m. OK Python 2 TESTS 63 92 409600 1900
4700709 Luxo A Oct. 7, 2013, 10:11 a.m. OK Python 2 TESTS 63 92 409600 1900
31280847 darkkcyan A Oct. 13, 2017, 5:09 p.m. OK Python 3 TESTS 63 124 307200 1900
5341169 yugle7 A Dec. 3, 2013, 9:06 a.m. OK Python 3 TESTS 63 124 307200 1900
4710577 ZhNV A Oct. 8, 2013, 5:34 p.m. OK Python 3 TESTS 63 124 307200 1900
4876669 iCode0410 A Oct. 25, 2013, 11:12 a.m. OK Python 3 TESTS 63 124 512000 1900
4876642 iCode0410 A Oct. 25, 2013, 11:08 a.m. OK Python 3 TESTS 63 124 512000 1900
4789102 alex_mat A Oct. 15, 2013, 11:06 a.m. OK Python 3 TESTS 63 124 614400 1900
28285738 BenL A July 4, 2017, 4:59 p.m. OK Python 3 TESTS 63 124 5529600 1900
34803918 Taxman A Feb. 1, 2018, 1:23 p.m. OK Python 3 TESTS 63 124 5836800 1900
5341193 yugle7 A Dec. 3, 2013, 9:13 a.m. OK Python 3 TESTS 63 156 307200 1900
41984365 Mk_Python_v1 A Aug. 23, 2018, 4:56 a.m. OK Python 3 TESTS 63 218 307200 1900
4686057 limed A Oct. 6, 2013, 9:11 a.m. OK Scala TESTS 63 560 409600 1900
4671783 limed A Oct. 4, 2013, 5:27 p.m. OK Scala TESTS 63 560 409600 1900

remove filters

Back to search problems