Codeforces Round 386 (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
746 Codeforces Round 386 (Div. 2) FINISHED False 9000 249765899 Dec. 18, 2016, 10:35 a.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 5118 ) D Green and Black Tea PROGRAMMING constructive algorithms greedy math 1500

B'Innokentiy likes tea very much and today he wants to drink exactly n cups of tea. He would be happy to drink more but he had exactly n tea bags, a of them are green and b are black. Innokentiy doesn 't like to drink the same tea (green or black) more than k times in a row. Your task is to determine the order of brewing tea bags so that Innokentiy will be able to drink n cups of tea, without drinking the same tea more than k times in a row, or to inform that it is impossible. Each tea bag has to be used exactly once. The first line contains four integers n, k, a and b (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89k xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89105, 0 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89a, xe2 x80 x89b xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n) -- the number of cups of tea Innokentiy wants to drink, the maximum number of cups of same tea he can drink in a row, the number of tea bags of green and black tea. It is guaranteed that a xe2 x80 x89+ xe2 x80 x89b xe2 x80 x89= xe2 x80 x89n. If it is impossible to drink n cups of tea, print "NO" (without quotes). Otherwise, print the string of the length n, which consists of characters 'G ' and 'B '. If some character equals 'G ', then the corresponding cup of tea should be green. If some character equals 'B ', then the corresponding cup of tea should be black. If there are multiple answers, print any of them. '...

Tutorials

Codeforces Round #386 (Div.2) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
23111051 StarScreamOwl D Dec. 18, 2016, 5:02 p.m. OK Delphi TESTS 50 15 5222400 1500
23105348 s34vv1nd D Dec. 18, 2016, 1:45 p.m. OK FPC TESTS 50 15 2048000 1500
23102997 cannor147 D Dec. 18, 2016, 12:57 p.m. OK FPC TESTS 50 15 2252800 1500
23111832 lukomskiy D Dec. 18, 2016, 5:39 p.m. OK FPC TESTS 50 15 2252800 1500
23108729 vladKB1 D Dec. 18, 2016, 3:19 p.m. OK FPC TESTS 50 15 2252800 1500
23219684 GreymaneSilverfang D Dec. 22, 2016, 7:58 a.m. OK FPC TESTS 50 15 2252800 1500
23105301 ultoxtung D Dec. 18, 2016, 1:44 p.m. OK FPC TESTS 50 15 2355200 1500
23220107 Shirone D Dec. 22, 2016, 8:25 a.m. OK FPC TESTS 50 15 2355200 1500
23111729 k2nt D Dec. 18, 2016, 5:34 p.m. OK FPC TESTS 50 30 2048000 1500
23489894 romanfixture1404 D Jan. 1, 2017, 8:25 p.m. OK FPC TESTS 50 30 2252800 1500
23355972 Gray_58 D Dec. 27, 2016, 9:16 a.m. OK FPC TESTS 50 30 2252800 1500
27659674 JoeBlow D June 7, 2017, 10:41 p.m. OK GNU C TESTS 50 15 102400 1500
23835529 codekode D Jan. 15, 2017, 10:56 a.m. OK GNU C TESTS 50 15 1843200 1500
23128953 yangshuang D Dec. 19, 2016, 4:48 a.m. OK GNU C TESTS 50 15 1843200 1500
23107060 DalCrater D Dec. 18, 2016, 2:22 p.m. OK GNU C TESTS 50 15 1843200 1500
27940792 ahmed127011 D June 21, 2017, 8:25 a.m. OK GNU C TESTS 50 15 1945600 1500
27940338 ahmed127011 D June 21, 2017, 8:06 a.m. OK GNU C TESTS 50 15 1945600 1500
25340406 codemart786 D March 8, 2017, 11:59 a.m. OK GNU C TESTS 50 15 1945600 1500
23833021 vjudge2 D Jan. 15, 2017, 7:49 a.m. OK GNU C TESTS 50 15 1945600 1500
23833018 Champagne D Jan. 15, 2017, 7:49 a.m. OK GNU C TESTS 50 15 1945600 1500
23577535 wayml D Jan. 6, 2017, 6:38 a.m. OK GNU C TESTS 50 15 1945600 1500
32152844 vjudge1 D Nov. 9, 2017, 7:50 a.m. OK GNU C++ TESTS 50 15 0 1500
30195042 vjudge2 D Sept. 8, 2017, 5 a.m. OK GNU C++ TESTS 50 15 0 1500
30195024 vjudge1 D Sept. 8, 2017, 4:58 a.m. OK GNU C++ TESTS 50 15 0 1500
29706551 Herman_Lien Fish_Li sdutsss D Aug. 23, 2017, 12:10 p.m. OK GNU C++ TESTS 50 15 0 1500
26955967 buctacm2 D May 8, 2017, 12:01 p.m. OK GNU C++ TESTS 50 15 0 1500
26955962 wxllhlhl D May 8, 2017, noon OK GNU C++ TESTS 50 15 0 1500
31895491 vjudge3 D Oct. 30, 2017, 1:49 p.m. OK GNU C++ TESTS 50 15 102400 1500
31895459 Humanoid D Oct. 30, 2017, 1:48 p.m. OK GNU C++ TESTS 50 15 102400 1500
30655941 vjudge3 D Sept. 24, 2017, 3:12 a.m. OK GNU C++ TESTS 50 15 102400 1500
30628717 vjudge5 D Sept. 23, 2017, 2:49 a.m. OK GNU C++ TESTS 50 15 102400 1500
27655614 eku D June 7, 2017, 5:34 p.m. OK GNU C11 TESTS 50 15 0 1500
23205354 pallamollasai D Dec. 21, 2016, 5:10 p.m. OK GNU C11 TESTS 50 15 2867200 1500
24285748 vjudge2 D Jan. 31, 2017, 9:16 a.m. OK GNU C11 TESTS 50 405 1843200 1500
26955720 buctacm2 D May 8, 2017, 11:49 a.m. OK GNU C++11 TESTS 50 15 0 1500
29708424 16110501008 D Aug. 23, 2017, 1:25 p.m. OK GNU C++11 TESTS 50 15 0 1500
31994523 poison123 D Nov. 2, 2017, 11:01 p.m. OK GNU C++11 TESTS 50 15 102400 1500
30628251 vjudge4 D Sept. 23, 2017, 2:09 a.m. OK GNU C++11 TESTS 50 15 102400 1500
30375348 nobleman D Sept. 16, 2017, 3:05 a.m. OK GNU C++11 TESTS 50 15 102400 1500
27184777 schubertguitar D May 17, 2017, 5:51 p.m. OK GNU C++11 TESTS 50 15 102400 1500
26974828 LHHuy D May 9, 2017, 1:38 p.m. OK GNU C++11 TESTS 50 15 102400 1500
26967040 buctacm2 D May 9, 2017, 3:43 a.m. OK GNU C++11 TESTS 50 15 102400 1500
26967038 19807448198888 D May 9, 2017, 3:42 a.m. OK GNU C++11 TESTS 50 15 102400 1500
26957089 buctacm2 D May 8, 2017, 12:58 p.m. OK GNU C++11 TESTS 50 15 102400 1500
46682778 cocktail D Dec. 6, 2018, 12:46 p.m. OK GNU C++14 TESTS 50 15 0 1500
32370199 hnam288 D Nov. 17, 2017, 5:49 a.m. OK GNU C++14 TESTS 50 15 0 1500
31325508 bakibi D Oct. 14, 2017, 11:44 p.m. OK GNU C++14 TESTS 50 15 0 1500
31283315 ffern D Oct. 13, 2017, 7:20 p.m. OK GNU C++14 TESTS 50 15 0 1500
31271474 too_rist D Oct. 13, 2017, 10:41 a.m. OK GNU C++14 TESTS 50 15 0 1500
30872065 BlueEye D Sept. 30, 2017, 4:42 p.m. OK GNU C++14 TESTS 50 15 0 1500
30872019 BlueEye D Sept. 30, 2017, 4:40 p.m. OK GNU C++14 TESTS 50 15 0 1500
31854521 Simon7426 D Oct. 29, 2017, 3:07 a.m. OK GNU C++14 TESTS 50 15 0 1500
32133117 __Darkmoon D Nov. 8, 2017, 2:23 a.m. OK GNU C++14 TESTS 50 15 0 1500
32536843 mouez292 D Nov. 21, 2017, 10:12 p.m. OK GNU C++14 TESTS 50 15 0 1500
35167118 limn2o4 D Feb. 12, 2018, 2:42 a.m. OK GNU C++17 TESTS 50 15 1945600 1500
55288025 GeorgeRaouf D June 8, 2019, 6:11 a.m. OK GNU C++17 TESTS 50 30 0 1500
69528081 Nam_Diya_kam_Ki D Jan. 25, 2020, 3:55 p.m. OK GNU C++17 TESTS 50 30 204800 1500
41568275 Dasha_Gnedko D Aug. 13, 2018, 7:01 p.m. OK GNU C++17 TESTS 50 30 307200 1500
68961393 Naseem17 D Jan. 17, 2020, 1:14 a.m. OK GNU C++17 TESTS 50 30 307200 1500
38341083 arbitrary_A D May 17, 2018, 7:35 a.m. OK GNU C++17 TESTS 50 30 512000 1500
38090563 vjudge5 D May 10, 2018, 11:46 a.m. OK GNU C++17 TESTS 50 30 3584000 1500
68833587 deogu D Jan. 15, 2020, 1:13 a.m. OK GNU C++17 TESTS 50 31 0 1500
66985886 kdjjain D Dec. 15, 2019, 6:05 p.m. OK GNU C++17 TESTS 50 31 0 1500
66086368 katyayan D Dec. 1, 2019, 5:01 a.m. OK GNU C++17 TESTS 50 31 0 1500
23244537 cojna D Dec. 23, 2016, 9:49 a.m. OK Haskell TESTS 50 15 44953600 1500
69962601 Vatsal53 D Feb. 1, 2020, 11:52 a.m. OK Java 11 TESTS 50 514 0 1500
31878490 flyman3046 D Oct. 29, 2017, 10:59 p.m. OK Java 8 TESTS 50 109 0 1500
55429498 Vishal_dhanani D June 11, 2019, 10:40 a.m. OK Java 8 TESTS 50 109 0 1500
54010409 caoash D May 12, 2019, 1:40 a.m. OK Java 8 TESTS 50 109 0 1500
29698053 sugnay D Aug. 23, 2017, 5:05 a.m. OK Java 8 TESTS 50 109 0 1500
23221141 Pacific25 D Dec. 22, 2016, 9:27 a.m. OK Java 8 TESTS 50 109 20480000 1500
23143414 alibaba D Dec. 19, 2016, 4:29 p.m. OK Java 8 TESTS 50 109 20582400 1500
23134861 joker_22 D Dec. 19, 2016, 9:42 a.m. OK Java 8 TESTS 50 109 20582400 1500
23804496 Dekacc D Jan. 14, 2017, 11:24 a.m. OK Java 8 TESTS 50 109 20582400 1500
25834940 Kammola D March 27, 2017, 9:20 a.m. OK Java 8 TESTS 50 109 20582400 1500
24780333 denisBychkov D Feb. 18, 2017, 1:53 p.m. OK Java 8 TESTS 50 109 20582400 1500
36950396 artsin666 D April 4, 2018, 1:14 p.m. OK Mono C# TESTS 50 46 8396800 1500
68108558 hibatibati D Jan. 3, 2020, 8:28 a.m. OK Mono C# TESTS 50 62 3891200 1500
23217423 Alexit D Dec. 22, 2016, 4:56 a.m. OK MS C# TESTS 50 46 9830400 1500
23112367 og.kostya D Dec. 18, 2016, 6:04 p.m. OK MS C# TESTS 50 62 9523200 1500
23217438 Alexit D Dec. 22, 2016, 4:57 a.m. OK MS C# TESTS 50 62 9728000 1500
23358803 diequeeq D Dec. 27, 2016, 12:22 p.m. OK MS C# TESTS 50 77 15257600 1500
30961191 vjudge2 D Oct. 3, 2017, 7:45 a.m. OK MS C++ TESTS 50 15 409600 1500
23250989 EvieOneLove D Dec. 23, 2016, 3:39 p.m. OK MS C++ TESTS 50 15 2048000 1500
25181106 Saman.Khamesian D March 3, 2017, 4:20 p.m. OK MS C++ TESTS 50 15 2048000 1500
24064956 dklsfjlksdfj D Jan. 23, 2017, 7:07 a.m. OK MS C++ TESTS 50 15 2048000 1500
23549094 vjudge2 D Jan. 5, 2017, 6:48 a.m. OK MS C++ TESTS 50 15 2048000 1500
23546209 vjudge1 D Jan. 5, 2017, 1:30 a.m. OK MS C++ TESTS 50 15 2048000 1500
23546039 vjudge4 D Jan. 5, 2017, 1:09 a.m. OK MS C++ TESTS 50 15 2048000 1500
23108725 Yurik D Dec. 18, 2016, 3:19 p.m. OK MS C++ TESTS 50 15 2048000 1500
25708709 ovProphet D March 22, 2017, 10:48 a.m. OK MS C++ TESTS 50 15 2150400 1500
24606580 M_Loko D Feb. 12, 2017, 10:46 a.m. OK MS C++ TESTS 50 15 2150400 1500
65154154 vjudge4 D Nov. 16, 2019, 8:41 a.m. OK MS C++ 2017 TESTS 50 31 102400 1500
59116768 lllllljjww D Aug. 20, 2019, 2:12 a.m. OK MS C++ 2017 TESTS 50 31 102400 1500
63559363 vjudge2 D Oct. 27, 2019, 1:48 p.m. OK MS C++ 2017 TESTS 50 31 307200 1500
65155632 vjudge4 D Nov. 16, 2019, 9:12 a.m. OK MS C++ 2017 TESTS 50 46 102400 1500
64354598 vjudge1 D Nov. 6, 2019, 9:42 a.m. OK MS C++ 2017 TESTS 50 46 102400 1500
64142415 vjudge4 D Nov. 3, 2019, 8:55 a.m. OK MS C++ 2017 TESTS 50 46 102400 1500
65330567 vjudge3 D Nov. 19, 2019, 5:46 a.m. OK MS C++ 2017 TESTS 50 46 409600 1500
23115729 mayakin D Dec. 18, 2016, 9:45 p.m. OK PHP TESTS 50 61 13926400 1500
23106970 0101-1001 D Dec. 18, 2016, 2:19 p.m. OK PyPy 2 TESTS 50 77 25395200 1500
23134136 thepotatoranch D Dec. 19, 2016, 9:08 a.m. OK PyPy 2 TESTS 50 77 26214400 1500
23279961 wa1 D Dec. 24, 2016, 9:42 p.m. OK PyPy 2 TESTS 50 93 22732800 1500
25644370 vjudge2 D March 19, 2017, 11:37 a.m. OK PyPy 2 TESTS 50 124 26214400 1500
38137133 nowyyz D May 12, 2018, 11:52 a.m. OK PyPy 3 TESTS 50 109 22732800 1500
63917351 UTMoonlight D Oct. 31, 2019, 10:31 a.m. OK PyPy 3 TESTS 50 140 512000 1500
58157386 Kadtsin_vs D Aug. 2, 2019, 6:13 a.m. OK PyPy 3 TESTS 50 140 2662400 1500
23183629 cugel D Dec. 20, 2016, 7:06 p.m. OK PyPy 3 TESTS 50 171 24268800 1500
58246730 Doxapar D Aug. 4, 2019, 5:49 a.m. OK PyPy 3 TESTS 50 186 9728000 1500
23647824 clarinet758 D Jan. 8, 2017, 2:29 p.m. OK PyPy 3 TESTS 50 187 24473600 1500
23633269 clarinet758 D Jan. 7, 2017, 6:51 p.m. OK PyPy 3 TESTS 50 187 30105600 1500
23194671 lagarwal D Dec. 21, 2016, 8:50 a.m. OK Python 2 TESTS 50 46 5017600 1500
32497327 vedkumar_patel D Nov. 20, 2017, 11:24 a.m. OK Python 2 TESTS 50 62 512000 1500
23581791 mzhq D Jan. 6, 2017, 9:46 a.m. OK Python 2 TESTS 50 62 4915200 1500
23106056 gahou D Dec. 18, 2016, 1:58 p.m. OK Python 2 TESTS 50 62 5120000 1500
23493539 nealzane D Jan. 2, 2017, 5:40 a.m. OK Python 2 TESTS 50 62 5427200 1500
23105229 grated D Dec. 18, 2016, 1:43 p.m. OK Python 2 TESTS 50 62 5734400 1500
23279969 wa1 D Dec. 24, 2016, 9:42 p.m. OK Python 2 TESTS 50 62 6656000 1500
25683718 AHN D March 21, 2017, 8:28 a.m. OK Python 2 TESTS 50 62 7065600 1500
23384406 weapon_x D Dec. 28, 2016, 6:29 p.m. OK Python 2 TESTS 50 77 4812800 1500
23216082 whn6325689 D Dec. 22, 2016, 2:22 a.m. OK Python 2 TESTS 50 77 4812800 1500
23647790 clarinet758 D Jan. 8, 2017, 2:27 p.m. OK Python 3 TESTS 50 62 4915200 1500
23117185 The_evann D Dec. 19, 2016, 1:01 a.m. OK Python 3 TESTS 50 62 4915200 1500
23117121 The_evann D Dec. 19, 2016, 12:53 a.m. OK Python 3 TESTS 50 62 4915200 1500
23117210 The_evann D Dec. 19, 2016, 1:06 a.m. OK Python 3 TESTS 50 62 5017600 1500
23110411 yellow_mango D Dec. 18, 2016, 4:30 p.m. OK Python 3 TESTS 50 62 5017600 1500
23103537 maverick D Dec. 18, 2016, 1:01 p.m. OK Python 3 TESTS 50 62 5017600 1500
23133297 justcode_fk D Dec. 19, 2016, 8:22 a.m. OK Python 3 TESTS 50 62 5120000 1500
23106922 we7d D Dec. 18, 2016, 2:18 p.m. OK Python 3 TESTS 50 62 5120000 1500
23105052 ---------- D Dec. 18, 2016, 1:39 p.m. OK Python 3 TESTS 50 62 5120000 1500
28304687 KaiMonmoy D July 5, 2017, 1:13 p.m. OK Python 3 TESTS 50 62 5734400 1500
23453630 dione D Dec. 30, 2016, 5:47 p.m. OK Ruby TESTS 50 93 14643200 1500
28010574 Wolfik D June 24, 2017, 7:01 p.m. OK Ruby TESTS 50 93 15155200 1500
23204732 hogeover30 D Dec. 21, 2016, 4:39 p.m. OK Ruby TESTS 50 498 16179200 1500
26905535 ASoboll D May 6, 2017, 4:09 p.m. OK Scala TESTS 50 639 204800 1500
26905395 ASoboll D May 6, 2017, 4:03 p.m. OK Scala TESTS 50 966 1740800 1500

remove filters

Back to search problems