Codeforces Round 540 (Div. 3)

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
1118 Codeforces Round 540 (Div. 3) FINISHED False 8100 186938723 Feb. 19, 2019, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 4246 ) E Yet Another Ball Problem PROGRAMMING constructive algorithms implementation 2000

B'The king of Berland organizes a ball! n pair are invited to the ball, they are numbered from 1 to n . Each pair consists of one man and one woman. Each dancer (either man or woman) has a monochrome costume. The color of each costume is represented by an integer from 1 to k , inclusive. Let b_i be the color of the man 's costume and g_i be the color of the woman 's costume in the i -th pair. You have to choose a color for each dancer 's costume (i.e. values b_1, b_2, ... , b_n and g_1, g_2, ... g_n ) in such a way that: Let 's take a look at the examples of bad and good color choosing (for n=4 and k=3 , man is the first in a pair and woman is the second): Bad color choosing: Good color choosing: You have to find any suitable color choosing or say that no suitable choosing exists. The only line of the input contains two integers n and k ( 2 <= n, k <= 2 cdot 10^5 ) -- the number of pairs and the number of colors. If it is impossible to find any suitable colors choosing, print "NO". Otherwise print "YES" and then the colors of the costumes of pairs in the next n lines. The i -th line should contain two integers b_i and g_i -- colors of costumes of man and woman in the i -th pair, respectively. You can print each letter in any case (upper or lower). For example, "YeS", "no" and "yES" are all acceptable. '...

Tutorials

65396

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
50343106 Yasola E Feb. 23, 2019, 4:23 a.m. OK Clang++17 Diagnostics TESTS 40 93 0 2000
65825969 453908766 E Nov. 27, 2019, 12:33 p.m. OK Clang++17 Diagnostics TESTS 40 109 0 2000
54577658 Denor E May 25, 2019, 1:22 a.m. OK Delphi TESTS 40 77 0 2000
50194675 Ngohavi E Feb. 19, 2019, 4:32 p.m. OK FPC TESTS 40 592 102400 2000
50217610 l-_-l E Feb. 20, 2019, 5:43 a.m. OK FPC TESTS 40 592 307200 2000
50217643 l-_-l E Feb. 20, 2019, 5:43 a.m. OK FPC TESTS 40 607 307200 2000
50196424 l-_-l E Feb. 19, 2019, 4:41 p.m. OK FPC TESTS 40 608 0 2000
51108819 vjudge2 E March 10, 2019, 2:27 a.m. OK GNU C11 TESTS 40 670 0 2000
50200999 NinjaCoder_Kunal E Feb. 19, 2019, 5:17 p.m. OK GNU C11 TESTS 40 686 0 2000
50320029 Sourav_Ganguly E Feb. 22, 2019, 2:05 p.m. OK GNU C11 TESTS 40 701 0 2000
50241269 ForeverL0ve E Feb. 20, 2019, 1:02 p.m. OK GNU C++11 TESTS 40 31 0 2000
50273839 Scut82 E Feb. 21, 2019, 8:52 a.m. OK GNU C++11 TESTS 40 31 0 2000
50243919 2016wudi E Feb. 20, 2019, 2:05 p.m. OK GNU C++11 TESTS 40 31 1433600 2000
50274340 Scut82 E Feb. 21, 2019, 9:08 a.m. OK GNU C++11 TESTS 40 31 3174400 2000
50195643 I_See_You E Feb. 19, 2019, 4:37 p.m. OK GNU C++11 TESTS 40 31 3174400 2000
55127351 dknguyen176 E June 5, 2019, 1:29 p.m. OK GNU C++11 TESTS 40 46 0 2000
54784871 wwdd E May 29, 2019, 2:52 a.m. OK GNU C++11 TESTS 40 46 0 2000
56704639 oduesp E July 8, 2019, 10:37 a.m. OK GNU C++11 TESTS 40 46 0 2000
55687775 MASTERASSASSIN E June 17, 2019, 4:24 p.m. OK GNU C++11 TESTS 40 46 0 2000
63209832 Ace_Monster E Oct. 23, 2019, 3:01 a.m. OK GNU C++11 TESTS 40 46 0 2000
50779690 Kirito E March 4, 2019, 10:44 a.m. OK GNU C++14 TESTS 40 31 0 2000
50277675 Robbinb1993 E Feb. 21, 2019, 11:05 a.m. OK GNU C++14 TESTS 40 31 4812800 2000
63546585 noteezy E Oct. 27, 2019, 10:40 a.m. OK GNU C++14 TESTS 40 46 0 2000
63258356 _i_mean_its_mine_ E Oct. 23, 2019, 7:05 p.m. OK GNU C++14 TESTS 40 46 0 2000
62444665 batsumaru E Oct. 12, 2019, 9:49 p.m. OK GNU C++14 TESTS 40 46 0 2000
57122047 biaoge E July 16, 2019, 1:54 a.m. OK GNU C++14 TESTS 40 46 0 2000
56154667 scientificuber E June 27, 2019, 9:39 a.m. OK GNU C++14 TESTS 40 46 0 2000
65517029 SuperJ6 E Nov. 22, 2019, 6:32 a.m. OK GNU C++14 TESTS 40 46 0 2000
66441442 Gaunt E Dec. 7, 2019, 8:04 a.m. OK GNU C++14 TESTS 40 46 0 2000
63652194 vjudge1 E Oct. 28, 2019, 11:43 a.m. OK GNU C++14 TESTS 40 46 0 2000
55001870 ILLLZKQF E June 3, 2019, 5:07 a.m. OK GNU C++17 TESTS 40 31 0 2000
57330608 3015218054 E July 19, 2019, 1:59 p.m. OK GNU C++17 TESTS 40 46 0 2000
58231283 Prometheus E Aug. 3, 2019, 4:58 p.m. OK GNU C++17 TESTS 40 46 0 2000
55816060 ApTeM111 E June 20, 2019, 6:31 a.m. OK GNU C++17 TESTS 40 46 0 2000
53900331 sping128 E May 9, 2019, 8:44 a.m. OK GNU C++17 TESTS 40 46 0 2000
52002996 vjudge5 E March 30, 2019, 7:05 a.m. OK GNU C++17 TESTS 40 46 0 2000
51679514 OIcoder_tjt E March 22, 2019, 12:04 p.m. OK GNU C++17 TESTS 40 46 0 2000
62043524 Lovinix E Oct. 7, 2019, 6:46 a.m. OK GNU C++17 TESTS 40 46 0 2000
66661477 Matuha777 E Dec. 12, 2019, 4:48 a.m. OK GNU C++17 TESTS 40 46 0 2000
68083468 StarCuriosity E Jan. 2, 2020, 3:17 p.m. OK GNU C++17 TESTS 40 46 0 2000
50216652 2008061626 E Feb. 20, 2019, 5:05 a.m. OK Go TESTS 40 670 0 2000
50195857 old_boo E Feb. 19, 2019, 4:38 p.m. OK Go TESTS 40 686 0 2000
50768262 Oopsimbad E March 4, 2019, 1:14 a.m. OK Java 8 TESTS 40 124 0 2000
51557701 tyuan73 E March 20, 2019, 6 a.m. OK Java 8 TESTS 40 124 0 2000
50273875 sooraj10 E Feb. 21, 2019, 8:53 a.m. OK Java 8 TESTS 40 124 0 2000
50215191 Dukkha E Feb. 20, 2019, 3:57 a.m. OK Java 8 TESTS 40 124 0 2000
50212517 tiagoss2005 E Feb. 20, 2019, 1:31 a.m. OK Java 8 TESTS 40 124 0 2000
50211803 mTvTm E Feb. 20, 2019, 12:49 a.m. OK Java 8 TESTS 40 124 0 2000
50206710 mikkk E Feb. 19, 2019, 7:42 p.m. OK Java 8 TESTS 40 124 0 2000
50193374 vaibhav310 E Feb. 19, 2019, 4:26 p.m. OK Java 8 TESTS 40 124 0 2000
50195448 its_aks_ulure E Feb. 19, 2019, 4:36 p.m. OK Java 8 TESTS 40 124 2560000 2000
50286408 LeontiBrechko E Feb. 21, 2019, 3:05 p.m. OK Java 8 TESTS 40 124 3686400 2000
51877269 Mosyagin E March 26, 2019, 8:16 p.m. OK Mono C# TESTS 40 140 22220800 2000
50237088 claw88 E Feb. 20, 2019, 11:16 a.m. OK Mono C# TESTS 40 716 17510400 2000
50322335 NEvOl E Feb. 22, 2019, 3:04 p.m. OK Mono C# TESTS 40 732 19968000 2000
51107687 vjudge1 E March 10, 2019, 1:07 a.m. OK MS C++ TESTS 40 77 0 2000
51109644 vjudge2 E March 10, 2019, 3:13 a.m. OK MS C++ TESTS 40 78 0 2000
51854042 tarahjjeon96 E March 26, 2019, 9:41 a.m. OK MS C++ TESTS 40 187 0 2000
51110594 vjudge2 E March 10, 2019, 4:03 a.m. OK MS C++ TESTS 40 748 0 2000
58495582 vjudge5 E Aug. 9, 2019, noon OK MS C++ TESTS 40 748 0 2000
51093323 Vermihunter E March 9, 2019, 3:12 p.m. OK MS C++ TESTS 40 763 0 2000
51108904 vjudge5 E March 10, 2019, 2:32 a.m. OK MS C++ TESTS 40 763 0 2000
50752116 ItsNikolor E March 3, 2019, 4:40 p.m. OK MS C++ TESTS 40 764 0 2000
51319699 vjudge2 E March 15, 2019, 5:31 a.m. OK MS C++ TESTS 40 764 0 2000
51110028 vjudge1 E March 10, 2019, 3:33 a.m. OK MS C++ TESTS 40 779 0 2000
57986954 pmitkov E July 30, 2019, 11:45 a.m. OK MS C++ 2017 TESTS 40 77 0 2000
51152571 beacon_cwk E March 11, 2019, 8:47 a.m. OK MS C++ 2017 TESTS 40 77 0 2000
50216530 GomBu E Feb. 20, 2019, 5 a.m. OK MS C++ 2017 TESTS 40 77 0 2000
52297449 zstuycz E April 4, 2019, 7:01 a.m. OK MS C++ 2017 TESTS 40 78 0 2000
50199388 Pricolno E Feb. 19, 2019, 4:56 p.m. OK MS C++ 2017 TESTS 40 218 0 2000
50258772 Boryan07 E Feb. 20, 2019, 9:36 p.m. OK MS C++ 2017 TESTS 40 233 0 2000
51904273 yomyom0824 E March 27, 2019, 2:44 p.m. OK MS C++ 2017 TESTS 40 233 0 2000
50289434 Mint_Dentifrice E Feb. 21, 2019, 4:40 p.m. OK MS C++ 2017 TESTS 40 234 0 2000
50276800 Efrocinya E Feb. 21, 2019, 10:32 a.m. OK MS C++ 2017 TESTS 40 249 0 2000
61448148 MrLolthe1st E Sept. 28, 2019, 10:57 p.m. OK MS C++ 2017 TESTS 40 312 11468800 2000
50251343 mayakin E Feb. 20, 2019, 5:24 p.m. OK PHP TESTS 40 670 409600 2000
50200063 pajenegod E Feb. 19, 2019, 5:04 p.m. OK PyPy 2 TESTS 40 140 13824000 2000
51287775 c1729 E March 14, 2019, 8:20 a.m. OK PyPy 2 TESTS 40 187 5427200 2000
50197208 pajenegod E Feb. 19, 2019, 4:44 p.m. OK PyPy 2 TESTS 40 218 25497600 2000
50209550 gatsko E Feb. 19, 2019, 9:48 p.m. OK PyPy 2 TESTS 40 2043 6348800 2000
50200474 pajenegod E Feb. 19, 2019, 5:09 p.m. OK PyPy 3 TESTS 40 140 7065600 2000
52562483 yumtam E April 10, 2019, 11:08 a.m. OK PyPy 3 TESTS 40 249 16691200 2000
50470688 yfo E Feb. 25, 2019, 12:06 a.m. OK PyPy 3 TESTS 40 311 7987200 2000
51318726 Stephan E March 15, 2019, 4 a.m. OK PyPy 3 TESTS 40 342 8704000 2000
50312823 hrustim25 E Feb. 22, 2019, 10:44 a.m. OK PyPy 3 TESTS 40 342 9216000 2000
50600048 see_yoon E Feb. 28, 2019, 12:14 p.m. OK PyPy 3 TESTS 40 343 7987200 2000
50193938 ScarletS E Feb. 19, 2019, 4:29 p.m. OK PyPy 3 TESTS 40 343 8806400 2000
50255136 MotaSanyal E Feb. 20, 2019, 7:14 p.m. OK PyPy 3 TESTS 40 358 8908800 2000
50240125 Rohan088 E Feb. 20, 2019, 12:35 p.m. OK PyPy 3 TESTS 40 358 8908800 2000
50196060 System_2020 E Feb. 19, 2019, 4:39 p.m. OK PyPy 3 TESTS 40 358 8908800 2000
51622974 allonsy_kim E March 21, 2019, 3:16 p.m. OK Python 2 TESTS 40 311 0 2000
50254532 amirah E Feb. 20, 2019, 6:55 p.m. OK Python 3 TESTS 40 389 6246400 2000
64680266 NocturneBflat E Nov. 11, 2019, 9:40 a.m. OK Python 3 TESTS 40 623 25600000 2000
53740725 WeZoomIn E May 4, 2019, 1:39 p.m. OK Python 3 TESTS 40 670 409600 2000
50203651 _oshhh_ E Feb. 19, 2019, 6:13 p.m. OK Python 3 TESTS 40 670 7372800 2000
50195713 thelegendofepubgg E Feb. 19, 2019, 4:38 p.m. OK Python 3 TESTS 40 764 204800 2000
50205875 ninoa E Feb. 19, 2019, 7:16 p.m. OK Python 3 TESTS 40 764 409600 2000
50330045 ParsaBahrami E Feb. 22, 2019, 6:10 p.m. OK Python 3 TESTS 40 779 716800 2000
50251046 Dart-Xeyter E Feb. 20, 2019, 5:16 p.m. OK Python 3 TESTS 40 779 716800 2000
51921019 Goslawa E March 28, 2019, 4:23 a.m. OK Python 3 TESTS 40 779 819200 2000
50196256 brarj4444 E Feb. 19, 2019, 4:40 p.m. OK Python 3 TESTS 40 811 716800 2000
68150638 gearjack E Jan. 4, 2020, 6:45 a.m. OK Rust TESTS 40 46 3174400 2000
50288114 Veladus E Feb. 21, 2019, 3:58 p.m. OK Rust TESTS 40 61 0 2000
50287169 Veladus E Feb. 21, 2019, 3:28 p.m. OK Rust TESTS 40 1762 0 2000
50285287 yakamoto E Feb. 21, 2019, 2:33 p.m. OK Scala TESTS 40 436 0 2000

remove filters

Back to search problems