Codeforces Round 228 (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
388 Codeforces Round 228 (Div. 1) FINISHED False 7500 346170004 Feb. 3, 2014, 3:40 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 3463 ) C Fox and Card Game PROGRAMMING games greedy sortings 2000

B"Fox Ciel is playing a card game with her friend Fox Jiro. There are n piles of cards on the table. And there is a positive integer on each card. The players take turns and Ciel takes the first turn. In Ciel's turn she takes a card from the top of any non-empty pile, and in Jiro's turn he takes a card from the bottom of any non-empty pile. Each player wants to maximize the total sum of the cards he took. The game ends when all piles become empty. Suppose Ciel and Jiro play optimally, what is the score of the game? The first line contain an integer n (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89100). Each of the next n lines contains a description of the pile: the first integer in the line is si (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89si xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89100) -- the number of cards in the i-th pile; then follow si positive integers c1, c2, ..., ck, ..., csi (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89ck xe2 x80 x89 xe2 x89 xa4 xe2 x80 x891000) -- the sequence of the numbers on the cards listed from top of the current pile to bottom of the pile. Print two integers: the sum of Ciel's cards and the sum of Jiro's cards if they play optimally. In the first example, Ciel will take the cards with number 100 and 1, Jiro will take the card with number 10. In the second example, Ciel will take cards with numbers 2, 8, 6, 5, 9 and Jiro will take cards with numbers 4, 7, 1, 3."...

Tutorials

Codeforces Round #228 — Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
52375382 vjudge4 C April 6, 2019, 8:02 a.m. OK Clang++17 Diagnostics TESTS 43 62 102400 2000
52456485 Saleh.P C April 7, 2019, 11:56 a.m. OK Clang++17 Diagnostics TESTS 43 62 3174400 2000
7571380 vjudge1 C Aug. 25, 2014, 8:16 a.m. OK Delphi TESTS 43 15 0 2000
7571409 vjudge5 C Aug. 25, 2014, 8:21 a.m. OK Delphi TESTS 43 15 0 2000
6103443 Misha100896 C March 22, 2014, 9 a.m. OK Delphi TESTS 43 15 0 2000
7571365 vjudge3 C Aug. 25, 2014, 8:14 a.m. OK Delphi TESTS 43 15 0 2000
10494451 vjudge4 C March 27, 2015, 9:08 p.m. OK Delphi TESTS 43 31 0 2000
5900369 ruban C Feb. 5, 2014, 3:37 a.m. OK Delphi TESTS 43 31 88576000 2000
7571067 403369233 C Aug. 25, 2014, 7:23 a.m. OK FPC TESTS 43 15 0 2000
27893479 vv_sswwww C June 19, 2017, 1:36 a.m. OK FPC TESTS 43 15 0 2000
6726919 wenj C May 28, 2014, 11:43 a.m. OK FPC TESTS 43 15 0 2000
5905692 ZeRoGerc C Feb. 5, 2014, 5:20 p.m. OK FPC TESTS 43 15 0 2000
5885509 loli C Feb. 3, 2014, 5:18 p.m. OK FPC TESTS 43 15 0 2000
5896265 Fedosik C Feb. 4, 2014, 2:39 p.m. OK FPC TESTS 43 15 102400 2000
7572962 vjudge5 C Aug. 25, 2014, 12:44 p.m. OK FPC TESTS 43 30 0 2000
5893719 zhzq123 C Feb. 4, 2014, 9:22 a.m. OK FPC TESTS 43 30 0 2000
5894649 vietdoan C Feb. 4, 2014, 11:53 a.m. OK FPC TESTS 43 30 102400 2000
13187376 vjudge2 C Sept. 23, 2015, 1:44 p.m. OK FPC TESTS 43 31 0 2000
6056443 festivus C March 17, 2014, 4:05 p.m. OK GNU C TESTS 43 15 0 2000
7044452 vjudge4 C July 8, 2014, 3:42 a.m. OK GNU C TESTS 43 31 0 2000
6252001 flare C April 3, 2014, 4:50 p.m. OK GNU C TESTS 43 31 0 2000
27892928 samjia2000 C June 19, 2017, 12:44 a.m. OK GNU C++ TESTS 43 15 0 2000
30098683 Ahmed_Morsy C Sept. 5, 2017, 12:09 p.m. OK GNU C++ TESTS 43 15 0 2000
27893558 kqp C June 19, 2017, 1:42 a.m. OK GNU C++ TESTS 43 15 0 2000
27602955 cbhcbh C June 6, 2017, 1:43 a.m. OK GNU C++ TESTS 43 15 0 2000
27417842 yah01 C May 28, 2017, 6:05 p.m. OK GNU C++ TESTS 43 15 0 2000
22918735 14020130063 C Dec. 13, 2016, 3:14 a.m. OK GNU C++ TESTS 43 15 0 2000
22042517 abdelkarim C Nov. 4, 2016, 7:52 p.m. OK GNU C++ TESTS 43 15 0 2000
21918105 YTMartian C Oct. 31, 2016, 1:16 p.m. OK GNU C++ TESTS 43 15 0 2000
19369919 bgrm C July 23, 2016, 6:02 p.m. OK GNU C++ TESTS 43 15 0 2000
19364864 vjudge4 C July 23, 2016, 12:36 p.m. OK GNU C++ TESTS 43 15 0 2000
9493695 AllCatsAreBeautiful C Jan. 21, 2015, 2:31 p.m. OK GNU C++0x TESTS 43 15 0 2000
9288532 saketh C Dec. 28, 2014, 4:30 a.m. OK GNU C++0x TESTS 43 15 0 2000
9229866 Dr.I_m_possible C Dec. 23, 2014, 4:17 a.m. OK GNU C++0x TESTS 43 15 0 2000
9013643 aliasadiiii C Dec. 7, 2014, 9:22 p.m. OK GNU C++0x TESTS 43 15 0 2000
8105117 krismaz C Oct. 6, 2014, 11:10 a.m. OK GNU C++0x TESTS 43 15 0 2000
7143831 Stubird C July 18, 2014, 2:53 a.m. OK GNU C++0x TESTS 43 15 0 2000
7050385 Amor727 C July 9, 2014, 3:45 a.m. OK GNU C++0x TESTS 43 15 0 2000
6999759 marat.snowbear C July 2, 2014, 9:22 p.m. OK GNU C++0x TESTS 43 15 0 2000
6567511 delta_4d C May 7, 2014, 1:47 p.m. OK GNU C++0x TESTS 43 15 0 2000
6483187 Gullesnuffs C April 27, 2014, 9:24 a.m. OK GNU C++0x TESTS 43 15 0 2000
44714609 Luiso C Oct. 22, 2018, 8:44 p.m. OK GNU C11 TESTS 43 30 0 2000
44843712 everfgmolinas C Oct. 25, 2018, 1:42 p.m. OK GNU C11 TESTS 43 31 0 2000
44822842 huehuehue96 C Oct. 25, 2018, 3:51 a.m. OK GNU C11 TESTS 43 31 0 2000
69274914 vjudge3 C Jan. 22, 2020, 1:08 a.m. OK GNU C11 TESTS 43 31 0 2000
44889678 ivan.02 C Oct. 26, 2018, 2:15 a.m. OK GNU C11 TESTS 43 31 0 2000
44888639 usrosv C Oct. 26, 2018, 1:07 a.m. OK GNU C11 TESTS 43 31 0 2000
44888104 g2klxzkhhxz C Oct. 26, 2018, 12:32 a.m. OK GNU C11 TESTS 43 31 0 2000
44888055 jc71 C Oct. 26, 2018, 12:29 a.m. OK GNU C11 TESTS 43 31 0 2000
44877889 francisco.bogado C Oct. 25, 2018, 5:48 p.m. OK GNU C11 TESTS 43 31 0 2000
44860269 nildag C Oct. 25, 2018, 3:23 p.m. OK GNU C11 TESTS 43 31 0 2000
30775289 RedNextCentury C Sept. 27, 2017, 11:32 a.m. OK GNU C++11 TESTS 43 15 0 2000
27916079 2360 C June 20, 2017, 2:52 a.m. OK GNU C++11 TESTS 43 15 0 2000
27602643 AbstractKangaroo C June 6, 2017, 1:08 a.m. OK GNU C++11 TESTS 43 15 0 2000
27289523 Cache C May 22, 2017, 6:28 p.m. OK GNU C++11 TESTS 43 15 0 2000
22871908 ulna C Dec. 11, 2016, 7:28 a.m. OK GNU C++11 TESTS 43 15 0 2000
22711949 m.Sina C Dec. 5, 2016, 1:05 p.m. OK GNU C++11 TESTS 43 15 0 2000
22290428 compiler_101 C Nov. 17, 2016, 2:14 p.m. OK GNU C++11 TESTS 43 15 0 2000
22001763 NewbieYet C Nov. 2, 2016, 8:45 p.m. OK GNU C++11 TESTS 43 15 0 2000
22001074 artxdmaster C Nov. 2, 2016, 7:56 p.m. OK GNU C++11 TESTS 43 15 0 2000
22001044 bilau_de_campina C Nov. 2, 2016, 7:54 p.m. OK GNU C++11 TESTS 43 15 0 2000
27650281 AmberFrame C June 7, 2017, 2:47 p.m. OK GNU C++14 TESTS 43 15 0 2000
57069771 stagezer0 C July 15, 2019, 1:49 a.m. OK GNU C++14 TESTS 43 15 0 2000
38573237 mredigonda C May 23, 2018, 10:59 p.m. OK GNU C++14 TESTS 43 15 0 2000
32148369 jtnydv25 C Nov. 8, 2017, 11:37 p.m. OK GNU C++14 TESTS 43 15 0 2000
30691044 UoA_ZQC C Sept. 24, 2017, 9:34 p.m. OK GNU C++14 TESTS 43 15 0 2000
30248823 internom C Sept. 10, 2017, 2:57 p.m. OK GNU C++14 TESTS 43 15 0 2000
27893380 YxuanwKeith C June 19, 2017, 1:26 a.m. OK GNU C++14 TESTS 43 15 0 2000
27893083 fanzhirui C June 19, 2017, 12:59 a.m. OK GNU C++14 TESTS 43 15 0 2000
27623421 RNS_JKS C June 7, 2017, 12:58 a.m. OK GNU C++14 TESTS 43 15 0 2000
27623246 RNS3 C June 7, 2017, 12:32 a.m. OK GNU C++14 TESTS 43 15 0 2000
53743989 lienquanpc C May 4, 2019, 3:31 p.m. OK GNU C++17 TESTS 43 15 102400 2000
35609908 vjudge3 C Feb. 23, 2018, 9:17 p.m. OK GNU C++17 TESTS 43 15 1945600 2000
37664908 vjudge5 C April 27, 2018, 2:55 p.m. OK GNU C++17 TESTS 43 15 3379200 2000
62072182 zahra..d C Oct. 7, 2019, 5:05 p.m. OK GNU C++17 TESTS 43 30 0 2000
53119845 idsigma C April 22, 2019, 10:40 a.m. OK GNU C++17 TESTS 43 30 0 2000
49877957 NikanGh C Feb. 13, 2019, 4:47 p.m. OK GNU C++17 TESTS 43 30 0 2000
47104445 dimchee C Dec. 16, 2018, 12:15 p.m. OK GNU C++17 TESTS 43 30 0 2000
62624329 jahangard C Oct. 15, 2019, 1:39 p.m. OK GNU C++17 TESTS 43 30 0 2000
66484117 jhdonghj112 C Dec. 8, 2019, 5:16 a.m. OK GNU C++17 TESTS 43 30 0 2000
69273265 vjudge4 C Jan. 21, 2020, 11:14 p.m. OK GNU C++17 TESTS 43 30 0 2000
6016263 GR1n C March 14, 2014, 6:01 p.m. OK Java 6 TESTS 43 62 0 2000
6019770 mashinist C March 15, 2014, 9:58 a.m. OK Java 6 TESTS 43 78 0 2000
5881219 shilov C Feb. 3, 2014, 4:30 p.m. OK Java 6 TESTS 43 108 0 2000
8511032 islam-al-aarag C Nov. 1, 2014, 11:16 a.m. OK Java 6 TESTS 43 109 102400 2000
8131217 bnuvjudge C Oct. 7, 2014, 1:44 p.m. OK Java 6 TESTS 43 109 102400 2000
8131189 AlwaysNewbie C Oct. 7, 2014, 1:42 p.m. OK Java 6 TESTS 43 109 102400 2000
8842467 vjudge5 C Nov. 25, 2014, 5:50 a.m. OK Java 6 TESTS 43 124 102400 2000
5881291 mkirsche C Feb. 3, 2014, 4:31 p.m. OK Java 6 TESTS 43 202 18432000 2000
5888631 uwi C Feb. 3, 2014, 6:42 p.m. OK Java 7 TESTS 43 77 0 2000
6064330 DoublePointer C March 19, 2014, 2:47 a.m. OK Java 7 TESTS 43 77 0 2000
5905586 kraskevich C Feb. 5, 2014, 5:04 p.m. OK Java 7 TESTS 43 77 0 2000
5898050 upsolving C Feb. 4, 2014, 6:53 p.m. OK Java 7 TESTS 43 77 0 2000
5889386 bendyna.ivan C Feb. 3, 2014, 7:32 p.m. OK Java 7 TESTS 43 77 0 2000
5888449 Sinner C Feb. 3, 2014, 6:35 p.m. OK Java 7 TESTS 43 77 0 2000
5888058 simenl C Feb. 3, 2014, 6:18 p.m. OK Java 7 TESTS 43 77 0 2000
5886899 Vbifial C Feb. 3, 2014, 5:35 p.m. OK Java 7 TESTS 43 77 0 2000
5885889 littlesheep2012 C Feb. 3, 2014, 5:23 p.m. OK Java 7 TESTS 43 77 0 2000
5888304 fetetriste C Feb. 3, 2014, 6:31 p.m. OK Java 7 TESTS 43 77 204800 2000
64108580 arsh1598 C Nov. 2, 2019, 5:41 p.m. OK Java 8 TESTS 43 109 0 2000
51440719 Anonymous C March 18, 2019, 9:45 a.m. OK Java 8 TESTS 43 109 0 2000
46645761 ankurdua15 C Dec. 5, 2018, 11:52 a.m. OK Java 8 TESTS 43 109 0 2000
10230412 Pimpom C March 10, 2015, 7:43 p.m. OK Java 8 TESTS 43 109 0 2000
45074272 guptautkarsh028 C Oct. 29, 2018, 10:11 p.m. OK Java 8 TESTS 43 124 0 2000
69551814 sakt_coder C Jan. 26, 2020, 6:51 a.m. OK Java 8 TESTS 43 124 0 2000
64106437 sumit_yadav C Nov. 2, 2019, 4:49 p.m. OK Java 8 TESTS 43 124 0 2000
55400952 Hoda_Hisham C June 10, 2019, 2:02 p.m. OK Java 8 TESTS 43 124 0 2000
19590416 poikniok C Aug. 3, 2016, 3:29 a.m. OK Java 8 TESTS 43 124 0 2000
25780654 Kammola C March 24, 2017, 6:31 p.m. OK Java 8 TESTS 43 124 20582400 2000
11232690 gio05 C May 23, 2015, 5:20 a.m. OK Mono C# TESTS 43 46 716800 2000
11905920 ilyoan C July 3, 2015, 5:13 a.m. OK Mono C# TESTS 43 62 1126400 2000
64125775 dev8546 C Nov. 3, 2019, 4:38 a.m. OK Mono C# TESTS 43 77 4403200 2000
5885425 vers C Feb. 3, 2014, 5:17 p.m. OK MS C# TESTS 43 61 819200 2000
5876338 EmK C Feb. 3, 2014, 3:53 p.m. OK MS C# TESTS 43 77 3379200 2000
23664781 camypaper C Jan. 9, 2017, 2:09 p.m. OK MS C# TESTS 43 77 11571200 2000
18732128 vjudge5 C June 26, 2016, 9:13 a.m. OK MS C++ TESTS 43 15 0 2000
18732117 vjudge3 C June 26, 2016, 9:12 a.m. OK MS C++ TESTS 43 15 0 2000
18732000 vjudge4 C June 26, 2016, 9:02 a.m. OK MS C++ TESTS 43 15 0 2000
18731972 vjudge2 C June 26, 2016, 8:59 a.m. OK MS C++ TESTS 43 15 0 2000
18731488 vjudge3 C June 26, 2016, 8:15 a.m. OK MS C++ TESTS 43 15 0 2000
14100991 Ne0n25 C Nov. 6, 2015, 8:02 a.m. OK MS C++ TESTS 43 15 0 2000
10638294 dotorya C April 9, 2015, 9:35 a.m. OK MS C++ TESTS 43 15 0 2000
9075451 LVA007 C Dec. 10, 2014, 7 p.m. OK MS C++ TESTS 43 15 0 2000
7691080 adream C Sept. 6, 2014, 1:46 a.m. OK MS C++ TESTS 43 15 0 2000
7279229 Awa149 C July 28, 2014, 3:32 p.m. OK MS C++ TESTS 43 15 0 2000
60195941 VagrantAC C Sept. 7, 2019, 1:44 a.m. OK MS C++ 2017 TESTS 43 31 0 2000
63656314 YHHxBULIATANIA C Oct. 28, 2019, 12:49 p.m. OK MS C++ 2017 TESTS 43 31 0 2000
41949059 Onesh0t C Aug. 21, 2018, 9:56 p.m. OK PyPy 2 TESTS 43 155 819200 2000
69272542 fzanutto C Jan. 21, 2020, 10:28 p.m. OK PyPy 3 TESTS 43 156 1536000 2000
69272504 vjudge1 C Jan. 21, 2020, 10:26 p.m. OK PyPy 3 TESTS 43 156 1536000 2000
64126214 sauravsihag C Nov. 3, 2019, 4:54 a.m. OK PyPy 3 TESTS 43 156 1536000 2000
69274346 breno C Jan. 22, 2020, 12:31 a.m. OK PyPy 3 TESTS 43 170 1536000 2000
69274312 vjudge2 C Jan. 22, 2020, 12:28 a.m. OK PyPy 3 TESTS 43 171 1536000 2000
6484865 nwi C April 27, 2014, 2:54 p.m. OK Python 2 TESTS 43 46 102400 2000
5891857 Nero C Feb. 4, 2014, 3:37 a.m. OK Python 2 TESTS 43 46 102400 2000
5900571 stoundmire C Feb. 5, 2014, 4:38 a.m. OK Python 2 TESTS 43 46 204800 2000
8807663 nab C Nov. 22, 2014, 11:57 p.m. OK Python 2 TESTS 43 46 307200 2000
10865696 Lei_Xufei C April 26, 2015, 4:49 a.m. OK Python 2 TESTS 43 46 4812800 2000
7044344 vjudge5 C July 8, 2014, 3:20 a.m. OK Python 2 TESTS 43 61 102400 2000
11612994 marianneL C June 16, 2015, 10:10 p.m. OK Python 2 TESTS 43 62 102400 2000
10574188 vjudge3 C April 4, 2015, 1:47 p.m. OK Python 2 TESTS 43 62 102400 2000
5892806 136873448 C Feb. 4, 2014, 6:33 a.m. OK Python 2 TESTS 43 62 102400 2000
25132457 yaoshimax C March 1, 2017, 6:08 p.m. OK Python 2 TESTS 43 62 4710400 2000
6014489 yugle7 C March 14, 2014, 11:12 a.m. OK Python 3 TESTS 43 62 307200 2000
7557079 learningmou C Aug. 23, 2014, 5:17 a.m. OK Python 3 TESTS 43 77 307200 2000
54828440 spellstaker C May 30, 2019, 7:44 a.m. OK Python 3 TESTS 43 109 0 2000
45488658 matusf C Nov. 9, 2018, 6:06 p.m. OK Python 3 TESTS 43 109 0 2000
42135411 Mk_Python_v1 C Aug. 26, 2018, 11:08 p.m. OK Python 3 TESTS 43 109 0 2000
64126155 sauravsihag C Nov. 3, 2019, 4:51 a.m. OK Python 3 TESTS 43 109 307200 2000
54056488 Ricky_pon C May 13, 2019, 8:36 a.m. OK Python 3 TESTS 43 109 307200 2000
66072317 MatMar C Nov. 30, 2019, 8:13 p.m. OK Python 3 TESTS 43 124 204800 2000
64148486 manish_khurana C Nov. 3, 2019, 10:39 a.m. OK Python 3 TESTS 43 124 307200 2000
5892833 Timer C Feb. 4, 2014, 6:38 a.m. OK Python 3 TESTS 43 124 512000 2000
5885945 limed C Feb. 3, 2014, 5:24 p.m. OK Scala TESTS 43 265 204800 2000

remove filters

Back to search problems