Codeforces Round 233 (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
398 Codeforces Round 233 (Div. 1) FINISHED False 7200 338135399 March 1, 2014, 3:30 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 926 ) A Cards PROGRAMMING constructive algorithms implementation

B'User ainta loves to play with cards. He has a cards containing letter "o" and b cards containing letter "x". He arranges the cards in a row, and calculates the score of the deck by the formula below. For example, if a xe2 x80 x89= xe2 x80 x896, xe2 x80 x89b xe2 x80 x89= xe2 x80 x893 and ainta have arranged the cards in the order, that is described by string "ooxoooxxo", the score of the deck equals 22 xe2 x80 x89- xe2 x80 x8912 xe2 x80 x89+ xe2 x80 x8932 xe2 x80 x89- xe2 x80 x8922 xe2 x80 x89+ xe2 x80 x8912 xe2 x80 x89= xe2 x80 x899. That is because the deck has 5 blocks in total: "oo", "x", "ooo", "xx", "o". User ainta likes big numbers, so he wants to maximize the score with the given cards. Help ainta make the score as big as possible. Note, that he has to arrange all his cards. The first line contains two space-separated integers a and b (0 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89a, xe2 x80 x89b xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89105; a xe2 x80 x89+ xe2 x80 x89b xe2 x80 x89 xe2 x89 xa5 xe2 x80 x891) -- the number of "o" cards and the number of "x" cards. In the first line print a single integer v -- the maximum score that ainta can obtain. In the second line print a xe2 x80 x89+ xe2 x80 x89b characters describing the deck. If the k-th card of the deck contains "o", the k-th character must be "o". If the k-th card of the deck contains "x", the k-th character must be "x". The number of "o" characters must be equal to a, and the number of "x " characters must be equal to b. If there are many ways to maximize v, print any. Please, do not write the %lld specifier to read or write 64-bit integers in xd0 xa1++. It is preferred to use the cin, cout streams or the %I64d specifier.'...

Tutorials

Codeforces Round #233 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
6347016 Nik_Storm_2010 A April 13, 2014, 3:45 p.m. OK Delphi TESTS 62 31 0
5961212 graceoflives A March 8, 2014, 6:53 a.m. OK FPC TESTS 62 30 409600
5924906 Alex_2oo8 A March 4, 2014, 3:28 p.m. OK FPC TESTS 62 295 102400
5963895 SanSiroWaltz A March 8, 2014, 4:31 p.m. OK FPC TESTS 62 296 0
6060757 ZeRoGerc A March 18, 2014, 12:09 p.m. OK FPC TESTS 62 327 0
5929934 sdlzx A March 5, 2014, 9:11 a.m. OK GNU C TESTS 62 30 0
22847954 vjudge4 A Dec. 10, 2016, 3:58 a.m. OK GNU C++ TESTS 62 15 0
20547875 AkaneSasu A Sept. 12, 2016, 11:34 a.m. OK GNU C++ TESTS 62 15 0
16306276 vjudge4 A Feb. 24, 2016, 9:43 a.m. OK GNU C++ TESTS 62 15 0
14020897 130705009 A Nov. 2, 2015, 10:38 a.m. OK GNU C++ TESTS 62 15 0
8895955 Pudge123 A Nov. 30, 2014, 6:34 a.m. OK GNU C++ TESTS 62 15 0
8102345 curabis A Oct. 6, 2014, 7:16 a.m. OK GNU C++ TESTS 62 15 0
7673966 NEIL74 A Sept. 3, 2014, 11:56 a.m. OK GNU C++ TESTS 62 15 0
7621435 chenrui9551 A Aug. 29, 2014, 1 p.m. OK GNU C++ TESTS 62 15 0
7003097 RNS A July 3, 2014, 9:27 a.m. OK GNU C++ TESTS 62 15 0
6573008 vjudge3 A May 8, 2014, 2:58 p.m. OK GNU C++ TESTS 62 15 0
9296359 RealEyes A Dec. 29, 2014, 8:26 a.m. OK GNU C++0x TESTS 62 15 0
6008857 FancyCoder A March 13, 2014, 11:23 a.m. OK GNU C++0x TESTS 62 15 0
5960367 ishikado A March 8, 2014, 3:15 a.m. OK GNU C++0x TESTS 62 15 0
5931803 MinakoKojima A March 5, 2014, 12:53 p.m. OK GNU C++0x TESTS 62 15 0
6985596 Duxar A June 30, 2014, 11:26 a.m. OK GNU C++0x TESTS 62 15 204800
6262254 BIT_silence A April 5, 2014, 6:13 a.m. OK GNU C++0x TESTS 62 15 204800
5925631 Fdg A March 4, 2014, 5:28 p.m. OK GNU C++0x TESTS 62 15 204800
7399812 hogloid A Aug. 9, 2014, 2:45 a.m. OK GNU C++0x TESTS 62 15 512000
7569038 pmarecki A Aug. 24, 2014, 8:54 p.m. OK GNU C++0x TESTS 62 15 614400
7061463 wx2486 A July 11, 2014, 3:29 a.m. OK GNU C++0x TESTS 62 30 0
30306370 ditoly A Sept. 13, 2017, 12:12 p.m. OK GNU C++11 TESTS 62 15 0
17314579 fengsuiyan A April 14, 2016, 1:02 p.m. OK GNU C++11 TESTS 62 15 0
14843201 hippie A Dec. 17, 2015, 8:24 a.m. OK GNU C++11 TESTS 62 15 0
20654705 nobystander A Sept. 16, 2016, 7:27 a.m. OK GNU C++11 TESTS 62 15 102400
21811754 vjudge2 A Oct. 27, 2016, 4:19 a.m. OK GNU C++11 TESTS 62 15 204800
14960065 .I. A Dec. 23, 2015, 8:11 p.m. OK GNU C++11 TESTS 62 15 512000
34599215 OrangePlus A Jan. 27, 2018, 8:27 a.m. OK GNU C++11 TESTS 62 15 2048000
24630121 mshokry10 A Feb. 13, 2017, 2:48 p.m. OK GNU C++11 TESTS 62 15 2150400
28321520 lifan A July 6, 2017, 8:55 a.m. OK GNU C++11 TESTS 62 15 2252800
26160746 MZuev A April 6, 2017, 1:28 a.m. OK GNU C++11 TESTS 62 15 2355200
27605039 LiChenKoh A June 6, 2017, 4:42 a.m. OK GNU C++14 TESTS 62 15 0
27443702 vjudge3 A May 30, 2017, 8:58 a.m. OK GNU C++14 TESTS 62 15 1331200
24627999 code_play nishant_coder sdnr1 A Feb. 13, 2017, 12:53 p.m. OK GNU C++14 TESTS 62 15 1945600
23543632 Ali.Pi A Jan. 4, 2017, 8:36 p.m. OK GNU C++14 TESTS 62 15 2048000
25469333 AhmedHamed A March 14, 2017, 9:27 a.m. OK GNU C++14 TESTS 62 15 2150400
25232327 jcvb A March 5, 2017, 4:19 a.m. OK GNU C++14 TESTS 62 15 2252800
27443965 joisino A May 30, 2017, 9:12 a.m. OK GNU C++14 TESTS 62 30 1433600
24636629 code_play A Feb. 13, 2017, 8:04 p.m. OK GNU C++14 TESTS 62 30 1945600
28359116 Key_v2 A July 8, 2017, 1:56 a.m. OK GNU C++14 TESTS 62 30 2150400
23557625 r3gz3n A Jan. 5, 2017, 3:24 p.m. OK GNU C++14 TESTS 62 30 2457600
47877134 charity A Jan. 3, 2019, 4:05 p.m. OK GNU C++17 TESTS 62 30 409600
68001884 lotfimatarbecha A Dec. 31, 2019, 11:17 a.m. OK GNU C++17 TESTS 62 31 0
65709424 sysulby A Nov. 25, 2019, 1:47 p.m. OK GNU C++17 TESTS 62 31 0
51817109 CoffeeDog A March 25, 2019, 9:54 a.m. OK GNU C++17 TESTS 62 31 0
51760085 vjudge2 A March 23, 2019, 1:22 p.m. OK GNU C++17 TESTS 62 31 0
43616385 Martin53 A Sept. 30, 2018, 4:40 p.m. OK GNU C++17 TESTS 62 31 0
53860807 doroteja A May 7, 2019, 7:56 p.m. OK GNU C++17 TESTS 62 31 102400
52036008 aleonov A March 30, 2019, 5:30 p.m. OK GNU C++17 TESTS 62 31 102400
58334517 Sali_adelkhah A Aug. 5, 2019, 10:55 a.m. OK GNU C++17 TESTS 62 31 204800
49517714 SamuelLim A Feb. 6, 2019, 5:06 a.m. OK GNU C++17 TESTS 62 31 307200
69477999 WangJialei A Jan. 24, 2020, 4:48 p.m. OK Go TESTS 62 654 0
5972437 erikr A March 10, 2014, 4:04 a.m. OK Haskell TESTS 62 31 1024000
9433324 ctunoku A Jan. 15, 2015, 3:59 a.m. OK Java 7 TESTS 62 77 0
6063847 PlayLikeNeverB4 A March 18, 2014, 11 p.m. OK Java 7 TESTS 62 77 0
6054408 twds A March 17, 2014, 11:28 a.m. OK Java 7 TESTS 62 77 0
5928009 nitegazer A March 5, 2014, 3:16 a.m. OK Java 7 TESTS 62 78 409600
6200202 larvaboy A March 31, 2014, 6:56 p.m. OK Java 7 TESTS 62 93 0
6062785 DoublePointer A March 18, 2014, 5:58 p.m. OK Java 7 TESTS 62 93 0
5957752 delphifirst A March 7, 2014, 3:05 p.m. OK Java 7 TESTS 62 93 0
5932801 net12k44 A March 5, 2014, 2:22 p.m. OK Java 7 TESTS 62 93 0
5924442 indy256 A March 4, 2014, 2:31 p.m. OK Java 7 TESTS 62 93 0
6200208 larvaboy A March 31, 2014, 6:58 p.m. OK Java 7 TESTS 62 93 102400
10239002 Pimpom A March 11, 2015, 3:51 p.m. OK Java 8 TESTS 62 124 0
41469618 KulikAlex A Aug. 11, 2018, 12:49 p.m. OK Java 8 TESTS 62 139 0
38581398 Golmol A May 24, 2018, 9:08 a.m. OK Java 8 TESTS 62 140 0
36723242 Noureldin A March 29, 2018, 2:19 p.m. OK Java 8 TESTS 62 140 20684800
26335540 eomole A April 13, 2017, 11:22 a.m. OK Java 8 TESTS 62 156 20992000
5932842 LowB A March 5, 2014, 2:26 p.m. OK JavaScript TESTS 62 46 2252800
5946848 megaspazz A March 6, 2014, 12:20 a.m. OK MS C# TESTS 62 77 1433600
5924923 SAKT A March 4, 2014, 3:31 p.m. OK MS C++ TESTS 62 15 614400
8548498 shaonianguai A Nov. 4, 2014, 3:21 p.m. OK MS C++ TESTS 62 15 716800
7452974 pps789 A Aug. 15, 2014, 11:56 a.m. OK MS C++ TESTS 62 30 0
6095752 a654889339 A March 21, 2014, 1:46 a.m. OK MS C++ TESTS 62 30 0
6093021 Radi4 A March 20, 2014, 5:14 p.m. OK MS C++ TESTS 62 30 0
5933305 lijianlong A March 5, 2014, 3:04 p.m. OK MS C++ TESTS 62 30 0
16305149 vjudge1 A Feb. 24, 2016, 8:23 a.m. OK MS C++ TESTS 62 31 0
10209596 Kazim A March 8, 2015, 3:51 p.m. OK MS C++ TESTS 62 31 0
9513740 Ilya_ A Jan. 23, 2015, 1:38 p.m. OK MS C++ TESTS 62 31 0
7453509 csehydrogen A Aug. 15, 2014, 1:09 p.m. OK MS C++ TESTS 62 31 0
50342283 thoseblueshoes A Feb. 23, 2019, 3:27 a.m. OK MS C++ 2017 TESTS 62 46 0
68646359 cs1190380 A Jan. 12, 2020, 9:11 a.m. OK PyPy 3 TESTS 62 187 9830400
14930601 minimario A Dec. 22, 2015, 8:49 p.m. OK PyPy 3 TESTS 62 296 2662400
6484952 nwi A April 27, 2014, 3:07 p.m. OK Python 2 TESTS 62 124 921600
5963787 yugle7 A March 8, 2014, 3:58 p.m. OK Python 2 TESTS 62 171 1638400
6201611 yanhailin117 A April 1, 2014, 2:44 a.m. OK Python 2 TESTS 62 187 1638400
5954743 jackowitzd2 A March 7, 2014, 4:19 a.m. OK Python 2 TESTS 62 202 1843200
26335086 kusano A April 13, 2017, 10:55 a.m. OK Python 2 TESTS 62 420 10752000
6004616 changyuheng A March 12, 2014, 4:41 p.m. OK Python 3 TESTS 62 218 307200
5963776 yugle7 A March 8, 2014, 3:54 p.m. OK Python 3 TESTS 62 264 614400
49043478 kindreon A Jan. 27, 2019, 7:37 a.m. OK Python 3 TESTS 62 265 716800
6008764 hza A March 13, 2014, 11:09 a.m. OK Python 3 TESTS 62 421 614400
41984905 Mk_Python_v1 A Aug. 23, 2018, 5:23 a.m. OK Python 3 TESTS 62 483 614400
5928240 DDDDDDDDDDDDDDDDDDDDDDDD A March 5, 2014, 4:17 a.m. OK Scala TESTS 62 233 0

remove filters

Back to search problems