Codeforces Round 461 (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
922 Codeforces Round 461 (Div. 2) FINISHED False 7200 213799499 Feb. 7, 2018, 5:15 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 4394 ) D Robot Vacuum Cleaner PROGRAMMING greedy sortings 1800

B'Pushok the dog has been chasing Imp for a few hours already. Fortunately, Imp knows that Pushok is afraid of a robot vacuum cleaner. While moving, the robot generates a string t consisting of letters 's ' and 'h ', that produces a lot of noise. We define noise of string t as the number of occurrences of string "sh" as a subsequence in it, in other words, the number of such pairs (i, xe2 x80 x89j), that i xe2 x80 x89< xe2 x80 x89j and and . The robot is off at the moment. Imp knows that it has a sequence of strings ti in its memory, and he can arbitrary change their order. When the robot is started, it generates the string t as a concatenation of these strings in the given order. The noise of the resulting string equals the noise of this concatenation. Help Imp to find the maximum noise he can achieve by changing the order of the strings. The first line contains a single integer n (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89105) -- the number of strings in robot 's memory. Next n lines contain the strings t1, xe2 x80 x89t2, xe2 x80 x89..., xe2 x80 x89tn, one per line. It is guaranteed that the strings are non-empty, contain only English letters 's ' and 'h ' and their total length does not exceed 105. Print a single integer -- the maxumum possible noise Imp can achieve by changing the order of the strings. The optimal concatenation in the first sample is ssshhshhhs. '...

Tutorials

57605

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
35097759 vassabbi D Feb. 9, 2018, 4:14 p.m. OK FPC TESTS 48 62 18739200 1800
47543667 chaorenhaha D Dec. 27, 2018, 8:41 a.m. OK FPC TESTS 48 77 2764800 1800
35137505 tovValentin D Feb. 10, 2018, 9:06 p.m. OK FPC TESTS 48 93 7372800 1800
35137407 tovValentin D Feb. 10, 2018, 8:59 p.m. OK FPC TESTS 48 108 7372800 1800
35192072 slavik228 D Feb. 13, 2018, 7:01 a.m. OK FPC TESTS 48 343 5632000 1800
35061373 slavik228 D Feb. 8, 2018, 2:06 p.m. OK FPC TESTS 48 343 5632000 1800
35192085 slavik228 D Feb. 13, 2018, 7:02 a.m. OK FPC TESTS 48 389 5632000 1800
35063405 nk_xyz D Feb. 8, 2018, 3:09 p.m. OK FPC TESTS 48 577 5632000 1800
35063473 nk_xyz D Feb. 8, 2018, 3:11 p.m. OK FPC TESTS 48 577 5734400 1800
36735714 pakili D March 30, 2018, 1:10 a.m. OK GNU C TESTS 48 31 4608000 1800
36597292 Agostocarino D March 24, 2018, 5:27 p.m. OK GNU C TESTS 48 31 7372800 1800
36652851 FilipVesovic D March 26, 2018, 8:07 p.m. OK GNU C TESTS 48 46 6144000 1800
35201650 Dev-XYS D Feb. 13, 2018, 2:07 p.m. OK GNU C++ TESTS 48 31 2764800 1800
35084676 AltF4 D Feb. 9, 2018, 9:34 a.m. OK GNU C++ TESTS 48 31 2867200 1800
35333547 zx2017 D Feb. 16, 2018, 10:26 a.m. OK GNU C++ TESTS 48 31 2969600 1800
35175506 Scut82 D Feb. 12, 2018, 10:58 a.m. OK GNU C++ TESTS 48 31 2969600 1800
35176647 Scut82 D Feb. 12, 2018, 11:52 a.m. OK GNU C++ TESTS 48 31 3072000 1800
35252934 luogu_bot2 D Feb. 14, 2018, 1:15 p.m. OK GNU C++ TESTS 48 31 3379200 1800
35175912 Scut82 D Feb. 12, 2018, 11:16 a.m. OK GNU C++ TESTS 48 31 3379200 1800
35175524 Scut82 D Feb. 12, 2018, 10:59 a.m. OK GNU C++ TESTS 48 31 3379200 1800
35176460 Scut82 D Feb. 12, 2018, 11:42 a.m. OK GNU C++ TESTS 48 31 3481600 1800
35224410 CSHwang D Feb. 14, 2018, 6:41 a.m. OK GNU C++ TESTS 48 31 3686400 1800
35160099 caen D Feb. 11, 2018, 5:49 p.m. OK GNU C11 TESTS 48 31 4198400 1800
35160578 caen D Feb. 11, 2018, 6:10 p.m. OK GNU C11 TESTS 48 31 4198400 1800
36735735 pakili D March 30, 2018, 1:13 a.m. OK GNU C11 TESTS 48 31 4608000 1800
36797641 brt D April 1, 2018, 12:19 p.m. OK GNU C11 TESTS 48 46 5017600 1800
36655843 VukVukovic D March 27, 2018, 12:02 a.m. OK GNU C11 TESTS 48 46 5324800 1800
36795024 petarradicevic D April 1, 2018, 10:15 a.m. OK GNU C11 TESTS 48 46 5836800 1800
38038971 falcon_9 D May 8, 2018, 4:05 p.m. OK GNU C11 TESTS 48 46 7782400 1800
36655668 anovakovic D March 26, 2018, 11:38 p.m. OK GNU C11 TESTS 48 61 6041600 1800
35041846 zbtrs D Feb. 8, 2018, 2:56 a.m. OK GNU C++11 TESTS 48 15 4505600 1800
64700762 vjudge2 D Nov. 11, 2019, 2:45 p.m. OK GNU C++11 TESTS 48 31 1740800 1800
36139509 Invisible_man D March 10, 2018, 6:33 a.m. OK GNU C++11 TESTS 48 31 2764800 1800
35057070 RKSTGP D Feb. 8, 2018, 12:08 p.m. OK GNU C++11 TESTS 48 31 2969600 1800
35048460 fshp971 D Feb. 8, 2018, 7:30 a.m. OK GNU C++11 TESTS 48 31 2969600 1800
35193600 Scut82 D Feb. 13, 2018, 8:21 a.m. OK GNU C++11 TESTS 48 31 2969600 1800
35068047 ulna D Feb. 8, 2018, 5:46 p.m. OK GNU C++11 TESTS 48 31 2969600 1800
35194183 HeHere D Feb. 13, 2018, 8:46 a.m. OK GNU C++11 TESTS 48 31 3174400 1800
35042956 lawyerphx D Feb. 8, 2018, 3:53 a.m. OK GNU C++11 TESTS 48 31 3379200 1800
35733310 daihan D Feb. 26, 2018, 1:28 p.m. OK GNU C++11 TESTS 48 31 3481600 1800
35471810 Porestoranams D Feb. 19, 2018, 1:33 p.m. OK GNU C++14 TESTS 48 15 2150400 1800
35459893 rr_ D Feb. 19, 2018, 1:14 a.m. OK GNU C++14 TESTS 48 15 2969600 1800
35154441 DATVN D Feb. 11, 2018, 1:38 p.m. OK GNU C++14 TESTS 48 15 6041600 1800
35080464 TSky.64 D Feb. 9, 2018, 6:43 a.m. OK GNU C++14 TESTS 48 15 6758400 1800
35049077 Legendary_GrandNewbie D Feb. 8, 2018, 7:50 a.m. OK GNU C++14 TESTS 48 30 5734400 1800
35049166 Sahashoo D Feb. 8, 2018, 7:52 a.m. OK GNU C++14 TESTS 48 30 5734400 1800
35150045 pk842 D Feb. 11, 2018, 10:30 a.m. OK GNU C++14 TESTS 48 30 6758400 1800
35155410 SoItGoes D Feb. 11, 2018, 2:18 p.m. OK GNU C++14 TESTS 48 30 7782400 1800
35081267 karanbatra D Feb. 9, 2018, 7:15 a.m. OK GNU C++14 TESTS 48 30 8294400 1800
45421044 Roohi D Nov. 7, 2018, 5:16 p.m. OK GNU C++14 TESTS 48 31 307200 1800
58263280 vjudge3 D Aug. 4, 2019, 1:19 p.m. OK GNU C++17 TESTS 48 31 921600 1800
52809682 vjudge1 D April 16, 2019, 7:44 a.m. OK GNU C++17 TESTS 48 31 2150400 1800
52945274 G_bg D April 18, 2019, 11:16 a.m. OK GNU C++17 TESTS 48 31 2150400 1800
35104384 ShJ D Feb. 9, 2018, 8:02 p.m. OK GNU C++17 TESTS 48 31 3788800 1800
35104246 ShJ D Feb. 9, 2018, 7:56 p.m. OK GNU C++17 TESTS 48 31 3788800 1800
35178157 bottomcoder D Feb. 12, 2018, 12:53 p.m. OK GNU C++17 TESTS 48 31 4505600 1800
63426147 KKT_89 D Oct. 26, 2019, 7:52 a.m. OK GNU C++17 TESTS 48 31 4710400 1800
39660373 brdy D June 25, 2018, 9:26 p.m. OK GNU C++17 TESTS 48 31 5427200 1800
44525795 Jevrii D Oct. 19, 2018, 2:18 a.m. OK GNU C++17 TESTS 48 31 5939200 1800
40233731 shubham_shubh D July 12, 2018, 1:32 p.m. OK GNU C++17 TESTS 48 31 7680000 1800
35145499 kshitij D Feb. 11, 2018, 7:49 a.m. OK Haskell TESTS 48 93 64921600 1800
35170637 danielfleischman D Feb. 12, 2018, 6:47 a.m. OK Haskell TESTS 48 156 71270400 1800
35424659 faultrit D Feb. 17, 2018, 4:35 p.m. OK Haskell TESTS 48 234 83865600 1800
35424419 faultrit D Feb. 17, 2018, 4:28 p.m. OK Haskell TESTS 48 249 91238400 1800
49512396 Washoum D Feb. 5, 2019, 9:27 p.m. OK Java 8 TESTS 48 124 0 1800
68157875 chojh1222 D Jan. 4, 2020, 9:38 a.m. OK Java 8 TESTS 48 140 0 1800
65739070 bluesky111 D Nov. 26, 2019, 9:17 a.m. OK Java 8 TESTS 48 140 0 1800
51690663 AWCXV D March 22, 2019, 3:17 p.m. OK Java 8 TESTS 48 140 0 1800
48383363 Ziax D Jan. 14, 2019, 11:39 a.m. OK Java 8 TESTS 48 140 0 1800
48212649 mennafadali D Jan. 11, 2019, 12:57 p.m. OK Java 8 TESTS 48 140 0 1800
35054368 hulk_man D Feb. 8, 2018, 10:35 a.m. OK Java 8 TESTS 48 140 20684800 1800
35061272 marcose18 D Feb. 8, 2018, 2:03 p.m. OK Java 8 TESTS 48 140 20787200 1800
35082448 mathmaniac D Feb. 9, 2018, 8:06 a.m. OK Java 8 TESTS 48 140 21094400 1800
59321842 IDzekh D Aug. 22, 2019, 6:38 p.m. OK Java 8 TESTS 48 155 0 1800
35086792 s_a_k D Feb. 9, 2018, 10:56 a.m. OK JavaScript TESTS 48 249 17920000 1800
37846077 og.kostya D May 2, 2018, 5:07 p.m. OK Mono C# TESTS 48 156 16179200 1800
35063634 just806me D Feb. 8, 2018, 3:16 p.m. OK MS C# TESTS 48 77 16998400 1800
35046452 fr0st D Feb. 8, 2018, 6:22 a.m. OK MS C# TESTS 48 140 20480000 1800
35061982 just806me D Feb. 8, 2018, 2:24 p.m. OK MS C# TESTS 48 187 21811200 1800
46295496 vjudge5 D Nov. 28, 2018, 1:48 a.m. OK MS C++ TESTS 48 31 2457600 1800
60968339 vjudge5 D Sept. 21, 2019, 7:12 a.m. OK MS C++ TESTS 48 31 2457600 1800
40508364 vjudge4 D July 18, 2018, 9:39 a.m. OK MS C++ TESTS 48 31 2560000 1800
58160719 vjudge1 D Aug. 2, 2019, 7:19 a.m. OK MS C++ TESTS 48 31 2560000 1800
37741898 vjudge3 D April 30, 2018, 6:57 a.m. OK MS C++ TESTS 48 31 4403200 1800
35783464 vjudge4 D Feb. 28, 2018, 12:07 p.m. OK MS C++ TESTS 48 31 4505600 1800
36431173 vjudge2 D March 20, 2018, 11:35 a.m. OK MS C++ TESTS 48 31 5222400 1800
36508430 vjudge4 D March 22, 2018, 3:49 p.m. OK MS C++ TESTS 48 31 6041600 1800
36659190 vjudge5 D March 27, 2018, 6:05 a.m. OK MS C++ TESTS 48 31 6246400 1800
36525922 vjudge4 D March 23, 2018, 9:17 a.m. OK MS C++ TESTS 48 31 6246400 1800
66182753 vjudge3 D Dec. 2, 2019, 1:24 p.m. OK MS C++ 2017 TESTS 48 46 2457600 1800
66182703 hxx_ustc D Dec. 2, 2019, 1:23 p.m. OK MS C++ 2017 TESTS 48 46 2457600 1800
36242463 secondwtq D March 13, 2018, 8:41 a.m. OK Ocaml TESTS 48 171 19660800 1800
64776777 vjudge4 D Nov. 13, 2019, 4:55 a.m. OK Perl TESTS 48 810 21913600 1800
66027569 vjudge1 D Nov. 30, 2019, 9:08 a.m. OK PyPy 2 TESTS 48 249 9420800 1800
35290104 naiev D Feb. 15, 2018, 10:59 a.m. OK PyPy 2 TESTS 48 343 30617600 1800
42258724 Onesh0t D Aug. 30, 2018, 12:48 a.m. OK PyPy 2 TESTS 48 608 13209600 1800
49964801 rai7091 D Feb. 15, 2019, 8:05 p.m. OK PyPy 3 TESTS 48 420 13619200 1800
35154048 caen D Feb. 11, 2018, 1:22 p.m. OK PyPy 3 TESTS 48 498 32563200 1800
58662174 vjudge4 D Aug. 12, 2019, 11:20 a.m. OK PyPy 3 TESTS 48 857 11776000 1800
35063320 LaurynasN D Feb. 8, 2018, 3:06 p.m. OK PyPy 3 TESTS 48 982 32665600 1800
38984937 Ali_Pi D June 6, 2018, 6:11 a.m. OK Python 2 TESTS 48 249 12083200 1800
35078197 Susil D Feb. 9, 2018, 4:58 a.m. OK Python 2 TESTS 48 280 8294400 1800
43045260 vjudge5 D Sept. 18, 2018, 5:42 p.m. OK Python 2 TESTS 48 327 8396800 1800
35050345 yashpdf D Feb. 8, 2018, 8:24 a.m. OK Python 2 TESTS 48 327 23040000 1800
43045239 GabrielN D Sept. 18, 2018, 5:41 p.m. OK Python 2 TESTS 48 358 8499200 1800
36459821 nealzane D March 21, 2018, 4:47 p.m. OK Python 2 TESTS 48 358 17408000 1800
35118827 franckmy D Feb. 10, 2018, 9:32 a.m. OK Python 2 TESTS 48 373 12800000 1800
35069332 shiyuankongbu D Feb. 8, 2018, 6:33 p.m. OK Python 2 TESTS 48 670 7987200 1800
36982380 frmsaul D April 4, 2018, 9:28 p.m. OK Python 2 TESTS 48 920 16793600 1800
35117911 yslsj D Feb. 10, 2018, 9:03 a.m. OK Python 3 TESTS 48 202 12800000 1800
52568342 c1729 D April 10, 2019, 1:17 p.m. OK Python 3 TESTS 48 280 2662400 1800
35143727 Sameen D Feb. 11, 2018, 6:12 a.m. OK Python 3 TESTS 48 280 13004800 1800
36572530 sankur D March 24, 2018, 11:32 a.m. OK Python 3 TESTS 48 296 10035200 1800
37836105 hamedk72 D May 2, 2018, 10:06 a.m. OK Python 3 TESTS 48 296 10752000 1800
35221403 Kirillov_Alexey D Feb. 14, 2018, 1:15 a.m. OK Python 3 TESTS 48 311 12390400 1800
36427605 Vasiliy_48 D March 20, 2018, 8:17 a.m. OK Python 3 TESTS 48 311 14540800 1800
35108665 manhphamnguyen D Feb. 10, 2018, 1:06 a.m. OK Python 3 TESTS 48 327 13516800 1800
35067030 kissed D Feb. 8, 2018, 5:10 p.m. OK Python 3 TESTS 48 373 12697600 1800
35059503 Savit_Gupta D Feb. 8, 2018, 1:15 p.m. OK Python 3 TESTS 48 420 14745600 1800
35203137 lucaas D Feb. 13, 2018, 2:52 p.m. OK Ruby TESTS 48 468 43724800 1800
35144179 fcbruce D Feb. 11, 2018, 6:37 a.m. OK Rust TESTS 48 62 9011200 1800

remove filters

Back to search problems