Codeforces Beta Round 91 (Div. 2 Only)

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
122 Codeforces Beta Round 91 (Div. 2 Only) FINISHED False 7200 412095599 Oct. 27, 2011, 3 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 12377 ) B Lucky Substring PROGRAMMING brute force implementation 1100

B'Petya loves lucky numbers. Everybody knows that lucky numbers are positive integers whose decimal representation contains only the lucky digits 4 and 7. For example, numbers 47, 744, 4 are lucky and 5, 17, 467 are not. One day Petya was delivered a string s, containing only digits. He needs to find a string that Among all the strings for which the three conditions given above are fulfilled, Petya only needs the lexicographically minimum one. Find this string for Petya. The single line contains a non-empty string s whose length can range from 1 to 50, inclusive. The string only contains digits. The string can contain leading zeroes. In the only line print the answer to Petya 's problem. If the sought string does not exist, print "-1" (without quotes). The lexicographical comparison of strings is performed by the < operator in the modern programming languages. String x is lexicographically less than string y either if x is a prefix of y, or exists such i (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89i xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89min(|x|, xe2 x80 x89|y|)), that xi xe2 x80 x89< xe2 x80 x89yi and for any j (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89j xe2 x80 x89< xe2 x80 x89i) xj xe2 x80 x89= xe2 x80 x89yj. Here |a| denotes the length of string a. In the first sample three conditions are fulfilled for strings "4", "7" and "47". The lexicographically minimum one is "4". In the second sample s has no substrings which are lucky numbers. In the third sample the three conditions are only fulfilled for string "7".'...

Tutorials

BIT solution for Codeforces #91 E

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
46548363 Rimon_1703126 B Dec. 3, 2018, 4:27 p.m. OK Clang++17 Diagnostics TESTS 42 92 0 1100
35766979 I_Love_U_Sohan B Feb. 27, 2018, 3:14 p.m. OK GNU C TESTS 42 30 1843200 1100
34982941 MrCoderBoy B Feb. 6, 2018, 9:12 p.m. OK GNU C TESTS 42 30 1843200 1100
35581802 rainboy B Feb. 22, 2018, 7:16 p.m. OK GNU C TESTS 42 60 1843200 1100
39142649 Matsh B June 11, 2018, 10:10 a.m. OK GNU C TESTS 42 62 0 1100
39016050 sidmojo B June 7, 2018, 10:30 a.m. OK GNU C TESTS 42 62 0 1100
39224163 isha63 B June 13, 2018, 6:23 p.m. OK GNU C++ TESTS 42 30 0 1100
35985893 aza.ibagaliev B March 6, 2018, 8:53 a.m. OK GNU C++ TESTS 42 30 2048000 1100
36253350 manya B March 13, 2018, 3:06 p.m. OK GNU C++ TESTS 42 30 2048000 1100
35838338 pmad1234 B March 2, 2018, 1:31 p.m. OK GNU C++ TESTS 42 30 2048000 1100
35338595 __R_ B Feb. 16, 2018, 1:27 p.m. OK GNU C++ TESTS 42 30 2048000 1100
34547074 AiZi_ B Jan. 25, 2018, 1:17 p.m. OK GNU C++ TESTS 42 30 2048000 1100
34195463 gebro83 B Jan. 15, 2018, 11:42 a.m. OK GNU C++ TESTS 42 30 2048000 1100
33861128 Hamzeh.Rom B Jan. 2, 2018, 9:54 a.m. OK GNU C++ TESTS 42 30 2048000 1100
35959757 D_D_D B March 5, 2018, 8:48 a.m. OK GNU C++ TESTS 42 30 2150400 1100
35828422 jonassunandar B March 2, 2018, 7:46 a.m. OK GNU C++ TESTS 42 30 2150400 1100
47147422 Safwan_Marzouq B Dec. 17, 2018, 4 a.m. OK GNU C11 TESTS 42 60 0 1100
48296103 nirjhorJU B Jan. 12, 2019, 2:38 p.m. OK GNU C11 TESTS 42 62 0 1100
66572070 Revanth27 B Dec. 10, 2019, 5:17 a.m. OK GNU C11 TESTS 42 62 0 1100
58107962 Cloud_ B Aug. 1, 2019, 5:33 a.m. OK GNU C11 TESTS 42 62 0 1100
56686038 kaiboy B July 7, 2019, 10:42 p.m. OK GNU C11 TESTS 42 62 0 1100
54841255 hitman_28 B May 30, 2019, 12:55 p.m. OK GNU C11 TESTS 42 62 0 1100
52498567 vjudge3 B April 8, 2019, 2:53 p.m. OK GNU C11 TESTS 42 62 0 1100
51421643 OKM B March 17, 2019, 4:51 p.m. OK GNU C11 TESTS 42 62 0 1100
48896894 ahmed.Junaeid B Jan. 24, 2019, 4:17 p.m. OK GNU C11 TESTS 42 62 0 1100
48547418 Tusher_1703111 B Jan. 18, 2019, 8:39 p.m. OK GNU C11 TESTS 42 62 0 1100
35340125 apoorvb3439 B Feb. 16, 2018, 2:18 p.m. OK GNU C++11 TESTS 42 30 2048000 1100
35426370 goromlagche B Feb. 17, 2018, 5:28 p.m. OK GNU C++11 TESTS 42 30 2048000 1100
35458827 Ashenn B Feb. 18, 2018, 10:56 p.m. OK GNU C++11 TESTS 42 30 2048000 1100
35656906 HazemEssawi B Feb. 24, 2018, 6:24 p.m. OK GNU C++11 TESTS 42 30 2048000 1100
35988310 obelisk- B March 6, 2018, 10:31 a.m. OK GNU C++11 TESTS 42 30 2048000 1100
36062211 CTFang B March 8, 2018, 6:13 a.m. OK GNU C++11 TESTS 42 30 2048000 1100
36062384 edisonhello B March 8, 2018, 6:23 a.m. OK GNU C++11 TESTS 42 30 2048000 1100
36062939 edisonhello B March 8, 2018, 6:54 a.m. OK GNU C++11 TESTS 42 30 2048000 1100
36263986 cykatherine B March 14, 2018, 3:14 a.m. OK GNU C++11 TESTS 42 30 2048000 1100
36073638 CTFang B March 8, 2018, 2:11 p.m. OK GNU C++11 TESTS 42 30 2048000 1100
69628506 ishayadav2918 B Jan. 27, 2020, 4:31 p.m. OK GNU C++14 TESTS 42 30 0 1100
59857698 defaulterOO7 B Sept. 1, 2019, 2:08 p.m. OK GNU C++14 TESTS 42 30 0 1100
59839152 vjudge4 B Sept. 1, 2019, 6:17 a.m. OK GNU C++14 TESTS 42 30 0 1100
56333916 DrSamosa B June 30, 2019, 4:01 p.m. OK GNU C++14 TESTS 42 30 0 1100
53762508 jahid_hasan17 B May 4, 2019, 7:59 p.m. OK GNU C++14 TESTS 42 30 0 1100
49836494 sarthakoherwal B Feb. 12, 2019, 4:24 p.m. OK GNU C++14 TESTS 42 30 0 1100
49707429 jaditya8964 B Feb. 10, 2019, 2:33 p.m. OK GNU C++14 TESTS 42 30 0 1100
47876906 vjudge4 B Jan. 3, 2019, 3:57 p.m. OK GNU C++14 TESTS 42 30 0 1100
47553269 king_tsar B Dec. 27, 2018, 2:17 p.m. OK GNU C++14 TESTS 42 30 0 1100
47148931 R_Yen B Dec. 17, 2018, 5:24 a.m. OK GNU C++14 TESTS 42 30 0 1100
54557281 Bation_King B May 24, 2019, 12:15 p.m. OK GNU C++17 TESTS 42 30 0 1100
54584258 TechKnight410 B May 25, 2019, 6:13 a.m. OK GNU C++17 TESTS 42 30 0 1100
55975411 Killer0809 B June 23, 2019, 5:10 p.m. OK GNU C++17 TESTS 42 30 0 1100
57019603 KiruxaLight B July 14, 2019, 1:22 p.m. OK GNU C++17 TESTS 42 30 0 1100
57631309 nandika B July 24, 2019, 8:50 a.m. OK GNU C++17 TESTS 42 30 0 1100
59907880 IstiakAhmedSifat B Sept. 2, 2019, 4:04 p.m. OK GNU C++17 TESTS 42 30 0 1100
60595712 is_mail B Sept. 15, 2019, 5:28 a.m. OK GNU C++17 TESTS 42 30 0 1100
61820666 .s. B Oct. 4, 2019, 2:08 a.m. OK GNU C++17 TESTS 42 30 0 1100
66455722 shayan_ebrahimi B Dec. 7, 2019, 1:04 p.m. OK GNU C++17 TESTS 42 30 0 1100
67032481 Yo_S_iN B Dec. 16, 2019, 4:18 p.m. OK GNU C++17 TESTS 42 30 0 1100
54000113 Vegetasama B May 11, 2019, 4:06 p.m. OK Java 8 TESTS 42 218 0 1100
69831272 rv6023 B Jan. 30, 2020, 10:32 a.m. OK Java 8 TESTS 42 218 0 1100
69831191 mv6023 B Jan. 30, 2020, 10:31 a.m. OK Java 8 TESTS 42 218 0 1100
58258327 Abdul01 B Aug. 4, 2019, 11:07 a.m. OK Java 8 TESTS 42 218 0 1100
56270896 Mazen_Alsamman B June 29, 2019, 12:02 p.m. OK Java 8 TESTS 42 218 0 1100
53026986 mohdsadiq058 B April 19, 2019, 7:50 p.m. OK Java 8 TESTS 42 218 0 1100
52322462 still_the_big_bang B April 4, 2019, 8:43 p.m. OK Java 8 TESTS 42 218 0 1100
52311695 adikolsur B April 4, 2019, 2:57 p.m. OK Java 8 TESTS 42 218 0 1100
51921176 KrisDo B March 28, 2019, 4:33 a.m. OK Java 8 TESTS 42 218 0 1100
46960208 deepak4669 B Dec. 13, 2018, 7:36 a.m. OK Java 8 TESTS 42 218 0 1100
40535256 Skndr801 B July 19, 2018, 5:54 a.m. OK Mono C# TESTS 42 92 0 1100
50811502 MinProph B March 5, 2019, 9:03 a.m. OK Mono C# TESTS 42 124 0 1100
60731501 EL_HACKER_32 B Sept. 17, 2019, 3:52 p.m. OK Mono C# TESTS 42 124 3584000 1100
51180390 nemars B March 11, 2019, 5:04 p.m. OK Mono C# TESTS 42 156 3686400 1100
36232911 Volpe B March 12, 2018, 6:52 p.m. OK MS C++ TESTS 42 30 2048000 1100
36232977 Volpe B March 12, 2018, 6:54 p.m. OK MS C++ TESTS 42 30 2150400 1100
37901655 VarGos B May 5, 2018, 9:30 a.m. OK MS C++ TESTS 42 60 3788800 1100
43670486 vjudge3 B Oct. 2, 2018, 4:13 a.m. OK MS C++ TESTS 42 62 0 1100
42897813 vjudge2 B Sept. 15, 2018, 4:39 p.m. OK MS C++ TESTS 42 62 0 1100
50612108 vjudge2 B Feb. 28, 2019, 5:23 p.m. OK MS C++ TESTS 42 62 0 1100
46195897 lechinhin B Nov. 25, 2018, 8:17 a.m. OK MS C++ TESTS 42 62 0 1100
43942933 vjudge3 B Oct. 7, 2018, 12:19 p.m. OK MS C++ TESTS 42 62 0 1100
52498166 vjudge4 B April 8, 2019, 2:42 p.m. OK MS C++ TESTS 42 62 0 1100
44029083 vjudge4 B Oct. 9, 2018, 9:37 a.m. OK MS C++ TESTS 42 62 307200 1100
63082722 CtrlAlt B Oct. 21, 2019, 3:38 p.m. OK MS C++ 2017 TESTS 42 62 0 1100
65314414 shio B Nov. 18, 2019, 4:39 p.m. OK MS C++ 2017 TESTS 42 62 0 1100
59610555 Kira_5005 B Aug. 28, 2019, 10:45 a.m. OK MS C++ 2017 TESTS 42 62 0 1100
66659504 yerzh B Dec. 12, 2019, 3:20 a.m. OK MS C++ 2017 TESTS 42 92 307200 1100
34554605 Puloden B Jan. 25, 2018, 6:06 p.m. OK PascalABC.NET TESTS 42 62 13209600 1100
63685226 SlavaNixon B Oct. 28, 2019, 10:07 p.m. OK PascalABC.NET TESTS 42 654 0 1100
39055063 chawla_pro B June 8, 2018, 9:07 p.m. OK PyPy 2 TESTS 42 156 0 1100
62929003 pranjal_99 B Oct. 19, 2019, 12:09 p.m. OK PyPy 2 TESTS 42 248 0 1100
60505368 MouhcineTo1 B Sept. 13, 2019, 9:07 p.m. OK PyPy 2 TESTS 42 248 0 1100
62608179 ashok123 B Oct. 15, 2019, 8:39 a.m. OK PyPy 3 TESTS 42 278 0 1100
58043617 kchau B July 30, 2019, 9:12 p.m. OK PyPy 3 TESTS 42 278 0 1100
57501930 chiefsan B July 22, 2019, 10:32 a.m. OK PyPy 3 TESTS 42 278 102400 1100
68833481 beethoven97 B Jan. 15, 2020, 1:07 a.m. OK PyPy 3 TESTS 42 280 0 1100
68877168 rosolshatara B Jan. 15, 2020, 5:20 p.m. OK PyPy 3 TESTS 42 280 0 1100
68324268 Roshixa B Jan. 6, 2020, 4:13 p.m. OK PyPy 3 TESTS 42 280 0 1100
67032275 Freiden B Dec. 16, 2019, 4:13 p.m. OK PyPy 3 TESTS 42 280 0 1100
63872589 chaudhary_19 B Oct. 30, 2019, 5:57 p.m. OK PyPy 3 TESTS 42 280 0 1100
61346994 Mehrdad_ravenS B Sept. 27, 2019, 5:41 a.m. OK PyPy 3 TESTS 42 280 0 1100
58131511 rajat_2548 B Aug. 1, 2019, 2:27 p.m. OK PyPy 3 TESTS 42 280 0 1100
35837894 ______n______ B March 2, 2018, 1:22 p.m. OK Python 2 TESTS 42 124 4608000 1100
35837882 ______u______ B March 2, 2018, 1:21 p.m. OK Python 2 TESTS 42 124 4608000 1100
35837819 _____i_____ B March 2, 2018, 1:21 p.m. OK Python 2 TESTS 42 124 4608000 1100
35837803 _____k_____ B March 2, 2018, 1:21 p.m. OK Python 2 TESTS 42 124 4608000 1100
35831470 ______h______ B March 2, 2018, 9:47 a.m. OK Python 2 TESTS 42 124 4608000 1100
35831433 ______k______ B March 2, 2018, 9:46 a.m. OK Python 2 TESTS 42 124 4608000 1100
35831410 ______i______ B March 2, 2018, 9:46 a.m. OK Python 2 TESTS 42 124 4608000 1100
35830017 ______M______ B March 2, 2018, 8:59 a.m. OK Python 2 TESTS 42 124 4608000 1100
34578420 Patiala_Peg B Jan. 26, 2018, 2:27 p.m. OK Python 2 TESTS 42 124 4608000 1100
38825280 bary B June 1, 2018, 10:49 a.m. OK Python 2 TESTS 42 218 6041600 1100
33619706 hagar_yasser B Dec. 25, 2017, 2:43 p.m. OK Python 3 TESTS 42 124 5529600 1100
34801795 _lucifer_ B Feb. 1, 2018, 12:17 p.m. OK Python 3 TESTS 42 124 5632000 1100
39408237 skriyaz09 B June 19, 2018, 11:11 a.m. OK Python 3 TESTS 42 156 0 1100
39408150 skriyaz09 B June 19, 2018, 11:08 a.m. OK Python 3 TESTS 42 156 0 1100
37336023 yash918 B April 14, 2018, 5:54 p.m. OK Python 3 TESTS 42 156 7065600 1100
36790439 saketk21 B April 1, 2018, 6:51 a.m. OK Python 3 TESTS 42 156 7065600 1100
39052325 Fan_Of_The_Secret_Annex B June 8, 2018, 6:01 p.m. OK Python 3 TESTS 42 184 0 1100
39408116 skriyaz09 B June 19, 2018, 11:07 a.m. OK Python 3 TESTS 42 186 0 1100
39241986 knight07 B June 14, 2018, 11:36 a.m. OK Python 3 TESTS 42 186 0 1100
38629071 Mahdi_Shokoufi B May 26, 2018, 8:51 a.m. OK Python 3 TESTS 42 186 0 1100
43523504 RAKib074 B Sept. 28, 2018, 9:58 a.m. OK Ruby TESTS 42 124 0 1100

remove filters

Back to search problems