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 |
---|---|---|---|---|---|---|
1551 | Codeforces Round 734 (Div. 3) | FINISHED | False | 7200 | 110301911 | July 23, 2021, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 13525 ) | C | Interesting Story | PROGRAMMING | greedy sortings strings |
B'Stephen Queen wants to write a story. He is a very unusual writer, he uses only letters 'a ', 'b ', 'c ', 'd ' and 'e '! To compose a story, Stephen wrote out n words consisting of the first 5 lowercase letters of the Latin alphabet. He wants to select the maximum number of words to make an interesting story. Let a story be a sequence of words that are not necessarily different. A story is called interesting if there exists a letter which occurs among all words of the story more times than all other letters together. For example, the story consisting of three words "bac", "aaada", "e" is interesting (the letter 'a ' occurs 5 times, all other letters occur 4 times in total). But the story consisting of two words "aba", "abcde" is not (no such letter that it occurs more than all other letters in total). You are given a sequence of n words consisting of letters 'a ', 'b ', 'c ', 'd ' and 'e '. Your task is to choose the maximum number of them to make an interesting story. If there 's no way to make a non-empty story, output 0 . The first line contains one integer t ( 1 <= t <= 5000 ) -- the number of test cases. Then t test cases follow. The first line of each test case contains one integer n ( 1 <= n <= 2 cdot 10^5 ) -- the number of the words in the sequence. Then n lines follow, each of them contains a word -- a non-empty string consisting of lowercase letters of the Latin alphabet. The words in the sequence may be non-distinct (i. xe2 x80 x89e. duplicates are allowed). Only the letters 'a ', 'b ', 'c ', 'd ' and 'e ' may occur in the words. It is guaranteed that the sum of n over all test cases doesn 't exceed 2 cdot 10^5 ; the sum of the lengths of all words over all test cases doesn 't exceed 4 cdot 10^5 . For each test case, output the maximum number of words that compose an interesting story. Print 0 if there 's no way to make a non-empty interesting story. In the first test case of the e'... |
Editorial for Codeforces Round #734 (Div.3) |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
123531212 | xxd51 | C | July 23, 2021, 4:50 p.m. | OK | GNU C11 | TESTS | 6 | 93 | 12083200 | ||
123558552 | 1435730 | C | July 24, 2021, 1:31 a.m. | OK | GNU C11 | TESTS | 6 | 3307 | 13312000 | ||
123558006 | 1435730 | C | July 24, 2021, 1:17 a.m. | OK | GNU C11 | TESTS | 6 | 3572 | 13312000 | ||
123570075 | Derick126 | C | July 24, 2021, 4:59 a.m. | OK | GNU C++11 | TESTS | 6 | 78 | 9523200 | ||
123527769 | KA_Lucas | C | July 23, 2021, 4:34 p.m. | OK | GNU C++11 | TESTS | 6 | 78 | 9523200 | ||
123532212 | omprakash.eeeiitbhu | C | July 23, 2021, 4:57 p.m. | OK | GNU C++11 | TESTS | 6 | 78 | 12697600 | ||
123524514 | kyuuso | C | July 23, 2021, 4:29 p.m. | OK | GNU C++11 | TESTS | 6 | 78 | 149196800 | ||
123560608 | ccsu_Y_Y | C | July 24, 2021, 2:14 a.m. | OK | GNU C++11 | TESTS | 6 | 93 | 8089600 | ||
123555325 | Wuyanru | C | July 23, 2021, 11:43 p.m. | OK | GNU C++11 | TESTS | 6 | 93 | 9318400 | ||
123537854 | Solstice | C | July 23, 2021, 5:56 p.m. | OK | GNU C++11 | TESTS | 6 | 93 | 9523200 | ||
123566441 | mindyi | C | July 24, 2021, 3:54 a.m. | OK | GNU C++11 | TESTS | 6 | 93 | 9523200 | ||
123563230 | Horb7 | C | July 24, 2021, 3 a.m. | OK | GNU C++11 | TESTS | 6 | 93 | 9523200 | ||
123558742 | cosmosiwi | C | July 24, 2021, 1:36 a.m. | OK | GNU C++11 | TESTS | 6 | 93 | 9523200 | ||
123526517 | Shubham_0601 | C | July 23, 2021, 4:32 p.m. | OK | GNU C++14 | TESTS | 6 | 46 | 7680000 | ||
123534904 | EfuX | C | July 23, 2021, 5:21 p.m. | OK | GNU C++14 | TESTS | 6 | 46 | 9318400 | ||
123556899 | _Fake4Fun | C | July 24, 2021, 12:47 a.m. | OK | GNU C++14 | TESTS | 6 | 46 | 9318400 | ||
123564318 | Reddy_3.14 | C | July 24, 2021, 3:20 a.m. | OK | GNU C++14 | TESTS | 6 | 46 | 9318400 | ||
123534537 | john_28 | C | July 23, 2021, 5:18 p.m. | OK | GNU C++14 | TESTS | 6 | 61 | 10240000 | ||
123550750 | r0hit | C | July 23, 2021, 9:13 p.m. | OK | GNU C++14 | TESTS | 6 | 61 | 18534400 | ||
123545400 | Kousei_Arima | C | July 23, 2021, 7:36 p.m. | OK | GNU C++14 | TESTS | 6 | 62 | 9318400 | ||
123564539 | DL-POWER | C | July 24, 2021, 3:23 a.m. | OK | GNU C++14 | TESTS | 6 | 62 | 9318400 | ||
123534775 | whatsuppp | C | July 23, 2021, 5:20 p.m. | OK | GNU C++14 | TESTS | 6 | 62 | 10137600 | ||
123553791 | Abd_Alghani_Alkouwatli | C | July 23, 2021, 10:40 p.m. | OK | GNU C++14 | TESTS | 6 | 62 | 10240000 | ||
123540108 | Shah_Pranay | C | July 23, 2021, 6:24 p.m. | OK | GNU C++17 | TESTS | 6 | 46 | 7680000 | ||
123541814 | Ujjwalkool | C | July 23, 2021, 6:46 p.m. | OK | GNU C++17 | TESTS | 6 | 46 | 8499200 | ||
123532570 | drawing_dead | C | July 23, 2021, 5 p.m. | OK | GNU C++17 | TESTS | 6 | 46 | 9318400 | ||
123571123 | HHARSHH | C | July 24, 2021, 5:14 a.m. | OK | GNU C++17 | TESTS | 6 | 46 | 10137600 | ||
123528232 | tvcv901 | C | July 23, 2021, 4:34 p.m. | OK | GNU C++17 | TESTS | 6 | 46 | 14950400 | ||
123525222 | anzanda | C | July 23, 2021, 4:30 p.m. | OK | GNU C++17 | TESTS | 6 | 61 | 7782400 | ||
123535030 | kusnim | C | July 23, 2021, 5:23 p.m. | OK | GNU C++17 | TESTS | 6 | 61 | 7782400 | ||
123566554 | phananhtai | C | July 24, 2021, 3:55 a.m. | OK | GNU C++17 | TESTS | 6 | 61 | 7782400 | ||
123542376 | YamanAbdullah | C | July 23, 2021, 6:55 p.m. | OK | GNU C++17 | TESTS | 6 | 61 | 9318400 | ||
123559917 | NumberMere0 | C | July 24, 2021, 2 a.m. | OK | GNU C++17 | TESTS | 6 | 61 | 9318400 | ||
123533916 | ScarletS | C | July 23, 2021, 5:12 p.m. | OK | GNU C++17 (64) | TESTS | 6 | 46 | 11468800 | ||
123534019 | 7oSkaaa | C | July 23, 2021, 5:13 p.m. | OK | GNU C++17 (64) | TESTS | 6 | 46 | 11571200 | ||
123574308 | _tarek007 | C | July 24, 2021, 5:59 a.m. | OK | GNU C++17 (64) | TESTS | 8 | 46 | 11571200 | ||
123570807 | dlbm1302 | C | July 24, 2021, 5:10 a.m. | OK | GNU C++17 (64) | TESTS | 6 | 46 | 11571200 | ||
123568837 | mysteri0us7 | C | July 24, 2021, 4:37 a.m. | OK | GNU C++17 (64) | TESTS | 6 | 46 | 11571200 | ||
123535017 | rgnerdplayer | C | July 23, 2021, 5:23 p.m. | OK | GNU C++17 (64) | TESTS | 6 | 46 | 11571200 | ||
123545482 | AB.devil | C | July 23, 2021, 7:38 p.m. | OK | GNU C++17 (64) | TESTS | 6 | 46 | 12288000 | ||
123542802 | __spam | C | July 23, 2021, 7:01 p.m. | OK | GNU C++17 (64) | TESTS | 6 | 46 | 17100800 | ||
123571136 | zhanghenglei | C | July 24, 2021, 5:15 a.m. | OK | GNU C++17 (64) | TESTS | 6 | 46 | 31027200 | ||
123573506 | Turkhuuu | C | July 24, 2021, 5:50 a.m. | OK | GNU C++17 (64) | TESTS | 6 | 61 | 8294400 | ||
123529365 | _Zangetsu | C | July 23, 2021, 4:39 p.m. | OK | Java 11 | TESTS | 6 | 248 | 30208000 | ||
123537562 | goel_mehul | C | July 23, 2021, 5:52 p.m. | OK | Java 11 | TESTS | 6 | 264 | 30003200 | ||
123548304 | aismita_98 | C | July 23, 2021, 8:22 p.m. | OK | Java 11 | TESTS | 6 | 264 | 40140800 | ||
123564384 | mphillotry | C | July 24, 2021, 3:21 a.m. | OK | Java 11 | TESTS | 6 | 295 | 30310400 | ||
123526980 | singh.yuvraj1047 | C | July 23, 2021, 4:33 p.m. | OK | Java 11 | TESTS | 6 | 311 | 30310400 | ||
123539613 | Swapniltri | C | July 23, 2021, 6:18 p.m. | OK | Java 11 | TESTS | 6 | 311 | 43315200 | ||
123530873 | MoonCoder1234 | C | July 23, 2021, 4:48 p.m. | OK | Java 11 | TESTS | 6 | 312 | 36864000 | ||
123528956 | saurabh_kl | C | July 23, 2021, 4:38 p.m. | OK | Java 11 | TESTS | 6 | 342 | 28569600 | ||
123534959 | ayush__1411 | C | July 23, 2021, 5:22 p.m. | OK | Java 11 | TESTS | 6 | 358 | 30515200 | ||
123564257 | GennadyTran | C | July 24, 2021, 3:19 a.m. | OK | Java 11 | TESTS | 6 | 373 | 38297600 | ||
123527252 | dom0619 | C | July 23, 2021, 4:33 p.m. | OK | Java 8 | TESTS | 6 | 171 | 28262400 | ||
123557004 | Khaled57 | C | July 24, 2021, 12:51 a.m. | OK | Java 8 | TESTS | 6 | 186 | 28262400 | ||
123556955 | Khaled57 | C | July 24, 2021, 12:50 a.m. | OK | Java 8 | TESTS | 6 | 186 | 28262400 | ||
123532847 | _robindhankhar | C | July 23, 2021, 5:02 p.m. | OK | Java 8 | TESTS | 6 | 187 | 27238400 | ||
123528880 | s_anand98 | C | July 23, 2021, 4:37 p.m. | OK | Java 8 | TESTS | 6 | 249 | 25804800 | ||
123544914 | honeysingh18 | C | July 23, 2021, 7:29 p.m. | OK | Java 8 | TESTS | 6 | 265 | 25292800 | ||
123554728 | vaibhav7 | C | July 23, 2021, 11:16 p.m. | OK | Java 8 | TESTS | 6 | 280 | 39321600 | ||
123571428 | pikachu_pika_pika | C | July 24, 2021, 5:19 a.m. | OK | Java 8 | TESTS | 6 | 327 | 26931200 | ||
123562445 | Zahid_Hasan_Sahin | C | July 24, 2021, 2:48 a.m. | OK | Java 8 | TESTS | 6 | 343 | 27340800 | ||
123534084 | love1024 | C | July 23, 2021, 5:14 p.m. | OK | Java 8 | TESTS | 6 | 389 | 35532800 | ||
123547452 | codersanjeev | C | July 23, 2021, 8:08 p.m. | OK | Kotlin | TESTS | 6 | 436 | 42700800 | ||
123561598 | Spheniscine | C | July 24, 2021, 2:33 a.m. | OK | Kotlin | TESTS | 6 | 670 | 29900800 | ||
123569562 | J1angX1n | C | July 24, 2021, 4:50 a.m. | OK | MS C++ 2017 | TESTS | 6 | 108 | 12800000 | ||
123533345 | Ahmed-abdelHamed | C | July 23, 2021, 5:07 p.m. | OK | MS C++ 2017 | TESTS | 6 | 218 | 22220800 | ||
123536515 | Vitazzz | C | July 23, 2021, 5:40 p.m. | OK | MS C++ 2017 | TESTS | 6 | 686 | 17408000 | ||
123534326 | Tangerine | C | July 23, 2021, 5:16 p.m. | OK | MS C++ 2017 | TESTS | 6 | 748 | 29388800 | ||
123529654 | Bekzaat17 | C | July 23, 2021, 4:41 p.m. | OK | PHP | TESTS | 6 | 608 | 89600000 | ||
123530799 | itsbhavya | C | July 23, 2021, 4:48 p.m. | OK | PyPy 3 | TESTS | 6 | 343 | 34201600 | ||
123537544 | ksd_3 | C | July 23, 2021, 5:52 p.m. | OK | PyPy 3 | TESTS | 6 | 358 | 33484800 | ||
123560599 | not_akshitm16 | C | July 24, 2021, 2:14 a.m. | OK | PyPy 3 | TESTS | 6 | 358 | 36966400 | ||
123542955 | akshitm16 | C | July 23, 2021, 7:03 p.m. | OK | PyPy 3 | TESTS | 6 | 358 | 36966400 | ||
123570545 | parth_kabra | C | July 24, 2021, 5:06 a.m. | OK | PyPy 3 | TESTS | 6 | 405 | 41062400 | ||
123534542 | coder_sounak | C | July 23, 2021, 5:18 p.m. | OK | PyPy 3 | TESTS | 6 | 530 | 61235200 | ||
123530678 | rajbit | C | July 23, 2021, 4:47 p.m. | OK | PyPy 3 | TESTS | 6 | 592 | 47923200 | ||
123530063 | sethhritik | C | July 23, 2021, 4:43 p.m. | OK | PyPy 3 | TESTS | 6 | 701 | 98816000 | ||
123554533 | songtae | C | July 23, 2021, 11:07 p.m. | OK | PyPy 3 | TESTS | 6 | 701 | 99123200 | ||
123539301 | sarthakmanna | C | July 23, 2021, 6:14 p.m. | OK | PyPy 3 | TESTS | 6 | 732 | 103628800 | ||
123552128 | Kagemeka | C | July 23, 2021, 9:48 p.m. | OK | Python 3 | TESTS | 6 | 1013 | 44032000 | ||
123563732 | DarrenKey | C | July 24, 2021, 3:09 a.m. | OK | Python 3 | TESTS | 6 | 1435 | 28569600 | ||
123555488 | Bad_day_toCode | C | July 23, 2021, 11:50 p.m. | OK | Python 3 | TESTS | 6 | 1497 | 25497600 | ||
123543827 | abhi_dhanraj | C | July 23, 2021, 7:15 p.m. | OK | Python 3 | TESTS | 6 | 1809 | 23449600 | ||
123573503 | swapnilvc | C | July 24, 2021, 5:50 a.m. | OK | Python 3 | TESTS | 6 | 1903 | 32358400 | ||
123551985 | tayyrov | C | July 23, 2021, 9:45 p.m. | OK | Python 3 | TESTS | 6 | 1934 | 53657600 | ||
123543265 | abhi_dhanraj | C | July 23, 2021, 7:07 p.m. | OK | Python 3 | TESTS | 6 | 2183 | 22937600 | ||
123552336 | vinay272001 | C | July 23, 2021, 9:54 p.m. | OK | Python 3 | TESTS | 6 | 2262 | 40550400 | ||
123568748 | saurabh3195 | C | July 24, 2021, 4:35 a.m. | OK | Python 3 | TESTS | 6 | 2354 | 29286400 | ||
123540824 | akshpan | C | July 23, 2021, 6:33 p.m. | OK | Python 3 | TESTS | 6 | 2370 | 30720000 |
Back to search problems