Codeforces Beta Round 84 (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
110 Codeforces Beta Round 84 (Div. 2 Only) FINISHED False 7200 422546363 Aug. 29, 2011, 4 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 10327 ) B Lucky String PROGRAMMING constructive algorithms strings 1100

B'Petya loves lucky numbers. We all know that lucky numbers are the positive integers whose decimal representations contain only the lucky digits 4 and 7. For example, numbers 47, 744, 4 are lucky and 5, 17, 467 are not. Petya recently learned to determine whether a string of lowercase Latin letters is lucky. For each individual letter all its positions in the string are written out in the increasing order. This results in 26 lists of numbers; some of them can be empty. A string is considered lucky if and only if in each list the absolute difference of any two adjacent numbers is a lucky number. For example, let 's consider string "zbcdzefdzc". The lists of positions of equal letters are: This string is lucky as all differences are lucky numbers. For letters z: 5 xe2 x80 x89- xe2 x80 x891 xe2 x80 x89= xe2 x80 x894, 9 xe2 x80 x89- xe2 x80 x895 xe2 x80 x89= xe2 x80 x894, for letters c: 10 xe2 x80 x89- xe2 x80 x893 xe2 x80 x89= xe2 x80 x897, for letters d: 8 xe2 x80 x89- xe2 x80 x894 xe2 x80 x89= xe2 x80 x894. Note that if some letter occurs only once in a string, it doesn 't influence the string 's luckiness after building the lists of positions of equal letters. The string where all the letters are distinct is considered lucky. Find the lexicographically minimal lucky string whose length equals n. The single line contains a positive integer n (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89105) -- the length of the sought string. Print on the single line the lexicographically minimal lucky string whose length equals n. The lexical comparison of strings is performed by the < operator in modern programming languages. String a is lexicographically less than string b if exists such i (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89i xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n), that ai xe2 x80 x89< xe2 x80 x89bi, and for any j (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89j xe2 x80 x89< xe2 x80 x89i) aj xe2 x80 x89= xe2 x80 x89bj.'...

Tutorials

Codeforces Beta Round #84 - Analysis

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
40992372 ReaLNero1 B July 31, 2018, 1:17 a.m. OK Delphi TESTS 32 60 0 1100
40987009 vjudge1 B July 30, 2018, 8:53 p.m. OK GNU C TESTS 32 30 1024000 1100
37085087 _s7 B April 8, 2018, 1:26 a.m. OK GNU C TESTS 32 60 3276800 1100
40663373 dhp B July 23, 2018, 8:19 a.m. OK GNU C TESTS 32 62 0 1100
40451285 vjudge4 B July 16, 2018, 6:48 p.m. OK GNU C TESTS 32 62 0 1100
38569782 sanchit17 B May 23, 2018, 6:17 p.m. OK GNU C TESTS 32 62 0 1100
40986992 Emama.emu B July 30, 2018, 8:53 p.m. OK GNU C TESTS 32 62 1024000 1100
37094242 _mhs B April 8, 2018, 10:32 a.m. OK GNU C TESTS 32 62 3276800 1100
37851475 fur_ B May 3, 2018, 1:29 a.m. OK GNU C TESTS 32 62 3379200 1100
32432706 vjudge1 B Nov. 18, 2017, 1:44 p.m. OK GNU C++ TESTS 32 30 0 1100
32430042 vjudge5 B Nov. 18, 2017, 12:06 p.m. OK GNU C++ TESTS 32 30 0 1100
32429347 vjudge3 B Nov. 18, 2017, 11:43 a.m. OK GNU C++ TESTS 32 30 0 1100
32429344 vjudge1 B Nov. 18, 2017, 11:43 a.m. OK GNU C++ TESTS 32 30 0 1100
32429313 vjudge2 B Nov. 18, 2017, 11:42 a.m. OK GNU C++ TESTS 32 30 0 1100
32429013 vjudge1 B Nov. 18, 2017, 11:32 a.m. OK GNU C++ TESTS 32 30 0 1100
32428536 vjudge4 B Nov. 18, 2017, 11:11 a.m. OK GNU C++ TESTS 32 30 0 1100
32428469 vjudge5 B Nov. 18, 2017, 11:09 a.m. OK GNU C++ TESTS 32 30 0 1100
32354260 vjudge2 B Nov. 16, 2017, 12:05 p.m. OK GNU C++ TESTS 32 30 0 1100
32430033 vjudge1 B Nov. 18, 2017, 12:06 p.m. OK GNU C++ TESTS 32 30 102400 1100
53097910 Emily50 B April 21, 2019, 2:37 p.m. OK GNU C11 TESTS 32 62 102400 1100
44712157 vjudge5 B Oct. 22, 2018, 7:22 p.m. OK GNU C11 TESTS 32 122 100044800 1100
44712139 the_knight_king B Oct. 22, 2018, 7:21 p.m. OK GNU C11 TESTS 32 124 100044800 1100
53085812 I_M_Zero B April 21, 2019, 8:51 a.m. OK GNU C11 TESTS 32 156 0 1100
68207575 namandeo B Jan. 4, 2020, 5:58 p.m. OK GNU C11 TESTS 32 156 0 1100
56725463 kaiboy B July 8, 2019, 7:24 p.m. OK GNU C11 TESTS 32 590 0 1100
44541955 vjudge5 B Oct. 19, 2018, 11:53 a.m. OK GNU C11 TESTS 32 592 0 1100
57165479 Judas_Tadeo B July 16, 2019, 10:16 p.m. OK GNU C11 TESTS 32 592 0 1100
57128781 vjudge1 B July 16, 2019, 6:10 a.m. OK GNU C11 TESTS 32 592 102400 1100
54978341 hitman_28 B June 2, 2019, 11:54 a.m. OK GNU C11 TESTS 32 622 0 1100
32513778 vjudge5 B Nov. 21, 2017, 1:07 a.m. OK GNU C++11 TESTS 32 30 0 1100
32429400 vjudge5 B Nov. 18, 2017, 11:45 a.m. OK GNU C++11 TESTS 32 30 0 1100
32428892 vjudge5 B Nov. 18, 2017, 11:27 a.m. OK GNU C++11 TESTS 32 30 0 1100
32349985 losteracmer B Nov. 16, 2017, 8:13 a.m. OK GNU C++11 TESTS 32 30 0 1100
31923827 BThero B Oct. 31, 2017, 2:09 p.m. OK GNU C++11 TESTS 32 30 0 1100
32368936 XL-Wrath B Nov. 17, 2017, 3:46 a.m. OK GNU C++11 TESTS 32 30 204800 1100
54497083 WOSHIGEPACHONG2 B May 22, 2019, 6:23 p.m. OK GNU C++11 TESTS 32 30 307200 1100
39587218 CuteButNotInCode B June 24, 2018, 2:47 a.m. OK GNU C++11 TESTS 32 30 409600 1100
32527919 ahlawatsunny33 B Nov. 21, 2017, 2:19 p.m. OK GNU C++11 TESTS 32 30 409600 1100
32433188 vjudge4 B Nov. 18, 2017, 2:03 p.m. OK GNU C++11 TESTS 32 30 1843200 1100
68309630 kuldip_017 B Jan. 6, 2020, 10:35 a.m. OK GNU C++14 TESTS 32 30 0 1100
63626987 SagarCC B Oct. 28, 2019, 4:25 a.m. OK GNU C++14 TESTS 32 30 0 1100
61575700 le_JenD28 B Sept. 30, 2019, 8:41 p.m. OK GNU C++14 TESTS 32 30 0 1100
58226820 Larten B Aug. 3, 2019, 2:49 p.m. OK GNU C++14 TESTS 32 30 0 1100
57113160 vivz881 B July 15, 2019, 6:27 p.m. OK GNU C++14 TESTS 32 30 0 1100
56287943 Bignubie B June 29, 2019, 9:03 p.m. OK GNU C++14 TESTS 32 30 0 1100
56277061 Abdelrahman_K B June 29, 2019, 2:47 p.m. OK GNU C++14 TESTS 32 30 0 1100
55560950 Sniper_X B June 14, 2019, 12:38 p.m. OK GNU C++14 TESTS 32 30 0 1100
53028392 dontcarecoder B April 19, 2019, 8:48 p.m. OK GNU C++14 TESTS 32 30 0 1100
52614736 Ruden B April 11, 2019, 5:47 p.m. OK GNU C++14 TESTS 32 30 0 1100
68996637 MalikS B Jan. 17, 2020, 5:40 p.m. OK GNU C++17 TESTS 32 30 0 1100
58968156 Mohammad_Waleed_Alseddir B Aug. 17, 2019, 6:50 p.m. OK GNU C++17 TESTS 32 30 0 1100
59580348 OrlandoIsay B Aug. 27, 2019, 3:46 p.m. OK GNU C++17 TESTS 32 30 0 1100
43091070 Fortin B Sept. 19, 2018, 6:56 p.m. OK GNU C++17 TESTS 32 30 0 1100
46342240 PouyaNavid B Nov. 28, 2018, 4:44 p.m. OK GNU C++17 TESTS 32 30 0 1100
49878733 Moaaz_Al_Nouri B Feb. 13, 2019, 5:06 p.m. OK GNU C++17 TESTS 32 30 0 1100
50816743 xiaofeng19 B March 5, 2019, 11:50 a.m. OK GNU C++17 TESTS 32 30 0 1100
51749478 vjudge2 B March 23, 2019, 8:57 a.m. OK GNU C++17 TESTS 32 30 0 1100
69650519 ujjwalsingh30 B Jan. 28, 2020, 4:55 a.m. OK GNU C++17 TESTS 32 30 204800 1100
49214997 prathyusha55 B Jan. 30, 2019, 4:51 p.m. OK GNU C++17 TESTS 32 30 204800 1100
51425422 jedikni B March 17, 2019, 6:56 p.m. OK Go TESTS 32 62 0 1100
65549614 edsomjr B Nov. 22, 2019, 6:20 p.m. OK Haskell TESTS 32 92 102400 1100
68221676 rgupta917 B Jan. 5, 2020, 5:09 a.m. OK Java 8 TESTS 32 216 0 1100
47015875 deepak4669 B Dec. 14, 2018, 6:58 p.m. OK Java 8 TESTS 32 218 0 1100
52156733 ArmourOfGod B April 1, 2019, 1:41 p.m. OK Java 8 TESTS 32 218 0 1100
51955845 saurabhs1206 B March 29, 2019, 2:17 a.m. OK Java 8 TESTS 32 218 0 1100
51837587 gcarrillo2 B March 25, 2019, 7:13 p.m. OK Java 8 TESTS 32 218 0 1100
56291973 mohdsadiq058 B June 30, 2019, 2:09 a.m. OK Java 8 TESTS 32 218 0 1100
45699873 I.A.K.O.V B Nov. 14, 2018, 7:20 a.m. OK Java 8 TESTS 32 218 0 1100
57923598 Abanish B July 29, 2019, 6:12 a.m. OK Java 8 TESTS 32 218 0 1100
68326158 Mann_27__ B Jan. 6, 2020, 4:57 p.m. OK Java 8 TESTS 32 248 0 1100
59474998 Abdul01 B Aug. 25, 2019, 3:54 p.m. OK Java 8 TESTS 32 248 0 1100
51865900 nemars B March 26, 2019, 3:09 p.m. OK Mono C# TESTS 32 92 512000 1100
39946852 Skndr801 B July 4, 2018, 7:55 a.m. OK Mono C# TESTS 32 92 512000 1100
50734683 Giangvp B March 3, 2019, 12:24 p.m. OK Mono C# TESTS 32 436 7168000 1100
32432522 n.a.borisov B Nov. 18, 2017, 1:37 p.m. OK MS C# TESTS 32 92 512000 1100
32343333 vjudge5 B Nov. 15, 2017, 11:25 p.m. OK MS C++ TESTS 32 30 0 1100
32431441 ReHam_Hussein B Nov. 18, 2017, 12:56 p.m. OK MS C++ TESTS 32 30 0 1100
32429256 vjudge1 B Nov. 18, 2017, 11:40 a.m. OK MS C++ TESTS 32 30 0 1100
32181149 A7medTarik B Nov. 9, 2017, 8:34 p.m. OK MS C++ TESTS 32 30 0 1100
32430260 vjudge2 B Nov. 18, 2017, 12:15 p.m. OK MS C++ TESTS 32 30 307200 1100
48488548 vjudge3 B Jan. 17, 2019, 9:31 a.m. OK MS C++ TESTS 32 60 0 1100
48733729 vjudge2 B Jan. 22, 2019, 2:55 p.m. OK MS C++ TESTS 32 60 0 1100
48864220 vjudge5 B Jan. 24, 2019, 1:47 a.m. OK MS C++ TESTS 32 60 0 1100
48485218 vjudge4 B Jan. 17, 2019, 8:05 a.m. OK MS C++ TESTS 32 60 102400 1100
60278103 salmadwekat37 B Sept. 8, 2019, 6:59 p.m. OK MS C++ TESTS 32 62 0 1100
55107184 JuicyCloud12609 B June 5, 2019, 3:48 a.m. OK MS C++ 2017 TESTS 32 62 307200 1100
67424394 28Nik B Dec. 22, 2019, 12:54 p.m. OK PascalABC.NET TESTS 32 498 0 1100
44600699 soumyasarkar1998 B Oct. 20, 2018, 2:16 p.m. OK PyPy 2 TESTS 32 248 307200 1100
50680189 cs1g B March 2, 2019, 11:06 a.m. OK PyPy 3 TESTS 32 248 614400 1100
39358229 VladProg B June 18, 2018, 2:03 p.m. OK PyPy 3 TESTS 32 248 716800 1100
49831621 zsnapdragonz B Feb. 12, 2019, 2:11 p.m. OK PyPy 3 TESTS 32 248 819200 1100
33367978 nonis B Dec. 18, 2017, 4:20 a.m. OK PyPy 3 TESTS 32 248 25702400 1100
57345188 tchr B July 19, 2019, 10:02 p.m. OK PyPy 3 TESTS 32 278 512000 1100
59085156 rajat_2548 B Aug. 19, 2019, 10:48 a.m. OK PyPy 3 TESTS 32 278 4096000 1100
68113881 galim665 B Jan. 3, 2020, 10:40 a.m. OK PyPy 3 TESTS 32 280 512000 1100
66471639 chaudhary_19 B Dec. 7, 2019, 6:38 p.m. OK PyPy 3 TESTS 32 280 512000 1100
64773983 rparan B Nov. 13, 2019, 2:38 a.m. OK PyPy 3 TESTS 32 280 512000 1100
64773843 rparan B Nov. 13, 2019, 2:31 a.m. OK PyPy 3 TESTS 32 280 512000 1100
33408932 ytz123 B Dec. 19, 2017, 1:11 p.m. OK Python 2 TESTS 32 124 4710400 1100
35836974 ______n______ B March 2, 2018, 1:04 p.m. OK Python 2 TESTS 32 124 4812800 1100
35836968 ______u______ B March 2, 2018, 1:04 p.m. OK Python 2 TESTS 32 124 4812800 1100
35836965 _____i_____ B March 2, 2018, 1:04 p.m. OK Python 2 TESTS 32 124 4812800 1100
35836953 _____k_____ B March 2, 2018, 1:04 p.m. OK Python 2 TESTS 32 124 4812800 1100
35830942 ______h______ B March 2, 2018, 9:32 a.m. OK Python 2 TESTS 32 124 4812800 1100
35830908 ______k______ B March 2, 2018, 9:31 a.m. OK Python 2 TESTS 32 124 4812800 1100
35830883 ______i______ B March 2, 2018, 9:31 a.m. OK Python 2 TESTS 32 124 4812800 1100
35829670 ______M______ B March 2, 2018, 8:44 a.m. OK Python 2 TESTS 32 124 4812800 1100
56017722 sorry_im_smurfing B June 24, 2019, 11:01 p.m. OK Python 2 TESTS 32 342 204800 1100
33493889 zhugezy B Dec. 22, 2017, 3:04 a.m. OK Python 3 TESTS 32 124 5734400 1100
35876714 gxyd B March 3, 2018, 9:24 a.m. OK Python 3 TESTS 32 154 5836800 1100
36073326 Kalam B March 8, 2018, 2:01 p.m. OK Python 3 TESTS 32 154 6144000 1100
38436073 candycane34 B May 19, 2018, 3:53 p.m. OK Python 3 TESTS 32 186 204800 1100
47527814 smi B Dec. 26, 2018, 4:57 p.m. OK Python 3 TESTS 32 216 102400 1100
54781267 IngaleAnkur10 B May 28, 2019, 10:06 p.m. OK Python 3 TESTS 32 216 204800 1100
49494596 prajwal7868 B Feb. 5, 2019, 12:11 p.m. OK Python 3 TESTS 32 216 204800 1100
49492637 toysheeyeyraku B Feb. 5, 2019, 10:55 a.m. OK Python 3 TESTS 32 216 204800 1100
49489143 KanhuKeNanu B Feb. 5, 2019, 8:28 a.m. OK Python 3 TESTS 32 216 204800 1100
55114526 3x7 B June 5, 2019, 8:02 a.m. OK Python 3 TESTS 32 216 307200 1100

remove filters

Back to search problems