Codeforces Round 691 (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
1459 Codeforces Round 691 (Div. 2) FINISHED False 7200 128895863 Dec. 19, 2020, 9:35 a.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 17095 ) A Red-Blue Shuffle PROGRAMMING math probabilities

B'There are n cards numbered 1, ldots, n . The card i has a red digit r_i and a blue digit b_i written on it. We arrange all n cards in random order from left to right, with all permutations of 1, ldots, n having the same probability. We then read all red digits on the cards from left to right, and obtain an integer R . In the same way, we read all blue digits and obtain an integer B . When reading a number, leading zeros can be ignored. If all digits in a number are zeros, then the number is equal to 0 . Below is an illustration of a possible rearrangement of three cards, and how R and B can be found. Two players, Red and Blue, are involved in a bet. Red bets that after the shuffle R > B , and Blue bets that R < B . If in the end R = B , the bet results in a draw, and neither player wins. Determine, which of the two players is more likely (has higher probability) to win the bet, or that their chances are equal. Refer to the Note section for a formal discussion of comparing probabilities. The first line contains a single integer T ( 1 <= q T <= q 100 ) -- the number of test cases. Descriptions of T test cases follow. Each test case description starts with a line containing a single integer n ( 1 <= q n <= q 1000 ) -- the number of cards. The following line contains a string of n digits r_1, ldots, r_n -- red digits on cards 1, ldots, n respectively. The following line contains a string of n digits b_1, ldots, b_n -- blue digits on cards 1, ldots, n respectively. Note that digits in the same line are not separated with any delimiters. Print T answers for the test cases in order, one per line. If Red has a strictly higher change to win, print "RED". If Blue has a strictly higher change to win, print "BLUE". If both players are equally likely to win, print "EQUAL". Note that all answers are case-sen'...

Tutorials

Codeforces Round #691 Editorial (finished)

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
101777312 arthrajcool A Dec. 19, 2020, 1:56 p.m. OK Clang++17 Diagnostics TESTS 10 93 5222400
101758608 liwenshuai A Dec. 19, 2020, 11:13 a.m. OK GNU C11 TESTS 10 15 0
101764235 sweetbb A Dec. 19, 2020, 11:29 a.m. OK GNU C11 TESTS 10 15 0
101796094 DipayanDasgupta20 A Dec. 19, 2020, 6:17 p.m. OK GNU C11 TESTS 10 15 0
101815389 nitinkumar1729 A Dec. 20, 2020, 3:55 a.m. OK GNU C11 TESTS 10 15 0
101756085 Jazeel_Anwar A Dec. 19, 2020, 11:06 a.m. OK GNU C11 TESTS 10 30 0
101766320 bhargavi_18555 A Dec. 19, 2020, 11:34 a.m. OK GNU C11 TESTS 10 31 0
101772306 GoldenSteelPig A Dec. 19, 2020, 12:54 p.m. OK GNU C11 TESTS 10 31 0
101775829 goliathtw A Dec. 19, 2020, 1:33 p.m. OK GNU C11 TESTS 10 31 0
101813249 C111111 A Dec. 20, 2020, 2:42 a.m. OK GNU C11 TESTS 10 31 0
101771597 divrthor345 A Dec. 19, 2020, 12:47 p.m. OK GNU C11 TESTS 10 31 0
101781976 a.trivedi A Dec. 19, 2020, 3:17 p.m. OK GNU C++11 TESTS 10 15 0
101820232 sharad4730 A Dec. 20, 2020, 5:51 a.m. OK GNU C++11 TESTS 10 15 0
101817080 Dontony A Dec. 20, 2020, 4:43 a.m. OK GNU C++11 TESTS 10 15 0
101816484 BitJ A Dec. 20, 2020, 4:26 a.m. OK GNU C++11 TESTS 10 15 0
101796853 sham_786 A Dec. 19, 2020, 6:28 p.m. OK GNU C++11 TESTS 10 15 0
101793675 gupta_gopal A Dec. 19, 2020, 5:43 p.m. OK GNU C++11 TESTS 10 15 0
101786167 Sweetssss A Dec. 19, 2020, 4:13 p.m. OK GNU C++11 TESTS 10 15 0
101782832 acccccccc A Dec. 19, 2020, 3:31 p.m. OK GNU C++11 TESTS 10 15 0
101777636 void_jack A Dec. 19, 2020, 2:02 p.m. OK GNU C++11 TESTS 10 15 0
101772163 baigeiguai A Dec. 19, 2020, 12:52 p.m. OK GNU C++11 TESTS 10 15 0
101783608 shammianand A Dec. 19, 2020, 3:43 p.m. OK GNU C++14 TESTS 10 15 0
101756154 costheta_z A Dec. 19, 2020, 11:06 a.m. OK GNU C++14 TESTS 10 15 0
101771906 thesaltysleuth A Dec. 19, 2020, 12:50 p.m. OK GNU C++14 TESTS 10 15 0
101780158 ariloc A Dec. 19, 2020, 2:47 p.m. OK GNU C++14 TESTS 10 15 0
101789352 she_code A Dec. 19, 2020, 4:51 p.m. OK GNU C++14 TESTS 10 15 0
101781628 tavhid0321 A Dec. 19, 2020, 3:12 p.m. OK GNU C++14 TESTS 10 15 204800
101815275 Wayne_nitdgp A Dec. 20, 2020, 3:51 a.m. OK GNU C++14 TESTS 10 30 0
101813822 atulyadav02 A Dec. 20, 2020, 3:04 a.m. OK GNU C++14 TESTS 10 30 0
101819116 kshitiz1 A Dec. 20, 2020, 5:28 a.m. OK GNU C++14 TESTS 10 30 0
101816293 fighter_46 A Dec. 20, 2020, 4:21 a.m. OK GNU C++14 TESTS 10 30 0
101798759 Grapeee A Dec. 19, 2020, 6:56 p.m. OK GNU C++17 TESTS 10 15 0
101788722 Shubham_1999 A Dec. 19, 2020, 4:44 p.m. OK GNU C++17 TESTS 10 15 0
101777514 rachilies A Dec. 19, 2020, 2 p.m. OK GNU C++17 TESTS 10 15 0
101776382 m_a18 A Dec. 19, 2020, 1:41 p.m. OK GNU C++17 TESTS 10 15 0
101774629 vulkan A Dec. 19, 2020, 1:20 p.m. OK GNU C++17 TESTS 10 15 0
101770643 monster_coder A Dec. 19, 2020, 12:37 p.m. OK GNU C++17 TESTS 10 15 0
101758376 AmirHosseinFarhadi A Dec. 19, 2020, 11:12 a.m. OK GNU C++17 TESTS 10 15 0
101758089 rajputabhi4544 A Dec. 19, 2020, 11:12 a.m. OK GNU C++17 TESTS 10 15 0
101807577 I_love_Malika A Dec. 19, 2020, 10:21 p.m. OK GNU C++17 TESTS 10 15 0
101789304 IN_DA_RA A Dec. 19, 2020, 4:51 p.m. OK GNU C++17 TESTS 10 15 0
101820444 adarshmishra A Dec. 20, 2020, 5:55 a.m. OK GNU C++17 (64) TESTS 10 15 0
101820852 Dahiya27 A Dec. 20, 2020, 6:02 a.m. OK GNU C++17 (64) TESTS 10 15 0
101820347 alif_cse_ju A Dec. 20, 2020, 5:53 a.m. OK GNU C++17 (64) TESTS 10 15 0
101814036 Sakhiya07 A Dec. 20, 2020, 3:12 a.m. OK GNU C++17 (64) TESTS 10 15 0
101807368 timf1089 A Dec. 19, 2020, 10:11 p.m. OK GNU C++17 (64) TESTS 10 15 0
101803556 bindalom A Dec. 19, 2020, 8:27 p.m. OK GNU C++17 (64) TESTS 10 15 0
101796231 neal A Dec. 19, 2020, 6:19 p.m. OK GNU C++17 (64) TESTS 10 15 0
101793930 f2016941 A Dec. 19, 2020, 5:47 p.m. OK GNU C++17 (64) TESTS 10 15 0
101791980 fahadmd16 A Dec. 19, 2020, 5:22 p.m. OK GNU C++17 (64) TESTS 10 15 0
101791221 Ari A Dec. 19, 2020, 5:13 p.m. OK GNU C++17 (64) TESTS 10 15 0
101757202 jepbar A Dec. 19, 2020, 11:09 a.m. OK Go TESTS 10 31 0
101818327 mahendrabishnoi2 A Dec. 20, 2020, 5:12 a.m. OK Java 11 TESTS 10 171 0
101794589 amit_chas A Dec. 19, 2020, 5:56 p.m. OK Java 11 TESTS 10 171 0
101785449 veeraballidharantej A Dec. 19, 2020, 4:05 p.m. OK Java 11 TESTS 10 171 0
101780384 Mhmmd.itani A Dec. 19, 2020, 2:51 p.m. OK Java 11 TESTS 10 171 0
101773280 aCitizen A Dec. 19, 2020, 1:04 p.m. OK Java 11 TESTS 10 171 0
101773210 8530191782 A Dec. 19, 2020, 1:04 p.m. OK Java 11 TESTS 10 171 0
101769052 gssakash A Dec. 19, 2020, 12:22 p.m. OK Java 11 TESTS 10 171 0
101756720 kostasanemozalis A Dec. 19, 2020, 11:08 a.m. OK Java 11 TESTS 10 171 0
101785308 veeraballidharantej A Dec. 19, 2020, 4:03 p.m. OK Java 11 TESTS 10 186 0
101783645 rvarshney02 A Dec. 19, 2020, 3:43 p.m. OK Java 11 TESTS 10 186 0
101819401 tarun_sm A Dec. 20, 2020, 5:34 a.m. OK Java 8 TESTS 10 108 0
101769377 sushant-kun A Dec. 19, 2020, 12:25 p.m. OK Java 8 TESTS 10 108 0
101773724 Shagoto A Dec. 19, 2020, 1:10 p.m. OK Java 8 TESTS 10 108 0
101775429 cu.17bcs1685 A Dec. 19, 2020, 1:29 p.m. OK Java 8 TESTS 10 108 0
101789531 antonskubiiev A Dec. 19, 2020, 4:53 p.m. OK Java 8 TESTS 10 109 0
101812284 HackerHank52 A Dec. 20, 2020, 2:05 a.m. OK Java 8 TESTS 10 109 0
101801217 Uttam007 A Dec. 19, 2020, 7:39 p.m. OK Java 8 TESTS 10 109 0
101793719 flyman3046 A Dec. 19, 2020, 5:44 p.m. OK Java 8 TESTS 10 109 0
101789711 kareem3id A Dec. 19, 2020, 4:55 p.m. OK Java 8 TESTS 10 109 0
101816254 Bodz204 A Dec. 20, 2020, 4:20 a.m. OK Java 8 TESTS 10 109 0
101788834 sajidrec A Dec. 19, 2020, 4:45 p.m. OK JavaScript TESTS 10 62 2662400
101772423 Spheniscine A Dec. 19, 2020, 12:55 p.m. OK Kotlin TESTS 10 124 0
101796622 koper A Dec. 19, 2020, 6:24 p.m. OK Kotlin TESTS 10 139 0
101803162 b0bl0blaw A Dec. 19, 2020, 8:18 p.m. OK Kotlin TESTS 10 186 921600
101811790 Liux7 A Dec. 20, 2020, 1:43 a.m. OK MS C++ 2017 TESTS 10 31 0
101803262 tawfekhesham A Dec. 19, 2020, 8:20 p.m. OK MS C++ 2017 TESTS 10 31 0
101799087 alibabaand40haramies A Dec. 19, 2020, 7:02 p.m. OK MS C++ 2017 TESTS 10 31 0
101772287 kajalgupta1202000 A Dec. 19, 2020, 12:54 p.m. OK MS C++ 2017 TESTS 10 31 0
101764966 Oramew A Dec. 19, 2020, 11:31 a.m. OK MS C++ 2017 TESTS 10 31 0
101760453 jiangyz A Dec. 19, 2020, 11:19 a.m. OK MS C++ 2017 TESTS 10 31 0
101759589 trydmi A Dec. 19, 2020, 11:16 a.m. OK MS C++ 2017 TESTS 10 31 0
101758466 rohitdoyal172001 A Dec. 19, 2020, 11:13 a.m. OK MS C++ 2017 TESTS 10 31 0
101816616 tarkeshwar A Dec. 20, 2020, 4:29 a.m. OK MS C++ 2017 TESTS 10 46 0
101788070 truevampire A Dec. 19, 2020, 4:37 p.m. OK MS C++ 2017 TESTS 10 46 0
101794759 mban259 A Dec. 19, 2020, 5:58 p.m. OK .NET Core C# TESTS 10 93 512000
101779734 ravinem1 A Dec. 19, 2020, 2:40 p.m. OK .NET Core C# TESTS 10 93 3584000
101798456 WallisKelsey A Dec. 19, 2020, 6:51 p.m. OK .NET Core C# TESTS 10 108 3379200
101798191 WallisKelsey A Dec. 19, 2020, 6:47 p.m. OK .NET Core C# TESTS 10 140 3481600
101781507 explorer_sifat A Dec. 19, 2020, 3:10 p.m. OK Node.js TESTS 10 124 3584000
101785644 TheVan A Dec. 19, 2020, 4:07 p.m. OK PyPy 3 TESTS 10 139 1945600
101758997 Purota A Dec. 19, 2020, 11:14 a.m. OK PyPy 3 TESTS 10 140 2048000
101771808 _nobody_ A Dec. 19, 2020, 12:49 p.m. OK PyPy 3 TESTS 10 140 66969600
101797179 arin17bishwa A Dec. 19, 2020, 6:32 p.m. OK PyPy 3 TESTS 10 155 1945600
101789656 HamzaBamohammed A Dec. 19, 2020, 4:54 p.m. OK PyPy 3 TESTS 10 155 1945600
101790483 manhar A Dec. 19, 2020, 5:04 p.m. OK PyPy 3 TESTS 10 155 2048000
101771078 301_anky A Dec. 19, 2020, 12:41 p.m. OK PyPy 3 TESTS 10 155 2150400
101761951 sumit08 A Dec. 19, 2020, 11:23 a.m. OK PyPy 3 TESTS 10 155 2457600
101790073 pedastrian57 A Dec. 19, 2020, 4:59 p.m. OK PyPy 3 TESTS 10 155 67993600
101773130 LeCaToX A Dec. 19, 2020, 1:03 p.m. OK PyPy 3 TESTS 10 156 2048000
101802755 Vorobushek A Dec. 19, 2020, 8:09 p.m. OK Python 3 TESTS 10 124 0
101775271 ojha_abhi A Dec. 19, 2020, 1:27 p.m. OK Python 3 TESTS 10 124 0
101758797 sks0007 A Dec. 19, 2020, 11:14 a.m. OK Python 3 TESTS 10 124 0
101770890 story_times A Dec. 19, 2020, 12:39 p.m. OK Python 3 TESTS 10 124 307200
101770095 Oshayer_Siddique A Dec. 19, 2020, 12:32 p.m. OK Python 3 TESTS 10 124 307200
101789907 vibhu8447_ A Dec. 19, 2020, 4:57 p.m. OK Python 3 TESTS 10 124 307200
101775291 samyaksrivastava9 A Dec. 19, 2020, 1:27 p.m. OK Python 3 TESTS 10 124 307200
101755637 surajkotte A Dec. 19, 2020, 11:04 a.m. OK Python 3 TESTS 10 124 307200
101784561 The_New_Kid A Dec. 19, 2020, 3:54 p.m. OK Python 3 TESTS 10 139 0
101760659 sike007 A Dec. 19, 2020, 11:19 a.m. OK Python 3 TESTS 10 139 0
101807727 arcanewizard37 A Dec. 19, 2020, 10:30 p.m. OK Rust TESTS 10 31 102400
101778576 berushka A Dec. 19, 2020, 2:18 p.m. OK Scala TESTS 10 889 0

remove filters

Back to search problems