Codeforces Round 320 (Div. 1) [Bayan Thanks-Round]

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
578 Codeforces Round 320 (Div. 1) [Bayan Thanks-Round] FINISHED False 9000 333989123 Sept. 16, 2015, 3:15 p.m.

Problems

Solved
Index
Name
Type
Tags
Community Tag
Rating
( 674 ) E Walking! PROGRAMMING constructive algorithms greedy 2500

There is a sand trail in front of Alice's home. In daytime, people walk over it and leave a footprint on the trail for their every single step. Alice cannot distinguish the order of the footprints, but she can tell whether each footprint is made by left foot or right foot. Also she's certain that all people are walking by alternating left foot and right foot. For example, suppose that one person walked through the trail and left some footprints. The footprints are RRLRL in order along the trail ('R' means right foot and 'L' means left foot). You might think the outcome of the footprints is strange. But in fact, some steps are resulting from walking backwards! There are some possible order of steps that produce these footprints such as 1 → 3 → 2 → 5 → 4 or 2 → 3 → 4 → 5 → 1 (we suppose that the distance between two consecutive steps can be arbitrarily long). The number of backward steps from above two examples are 2 and 1 separately. Alice is interested in these footprints. Whenever there is a person walking trough the trail, she takes a picture of all these footprints along the trail and erase all of them so that next person will leave a new set of footprints. We know that people walk by alternating right foot and left foot, but we don't know if the first step is made by left foot or right foot. Alice wants to know the minimum possible number of backward steps made by a person. But it's a little hard. Please help Alice to calculate it. You also need to construct one possible history of these footprints. Only one line containing the string S ( 1 ≤ | S | ≤ 100 000 ) containing all footprints in order along the trail from entrance to exit. It is guaranteed that there is at least one possible footprint history. You should output 2 lines. The first line should contain a number denoting the minimum number of backward steps. The second line should contain a permutation of integers from 1 to | S | . This permutation should denote the order of footprints that may p

Tutorials

Codeforces Round #320 [Bayan Thanks-Round] Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
18114577 Owaski E May 27, 2016, 7:55 a.m. OK GNU C++ TESTS 48 15 24166400 2500
13079169 KFDong E Sept. 18, 2015, 12:52 a.m. OK GNU C++ TESTS 48 31 2457600 2500
14118894 423555290 E Nov. 7, 2015, 8:07 a.m. OK GNU C++ TESTS 48 31 3993600 2500
18142124 vjtest E May 29, 2016, 6:58 a.m. OK GNU C++ TESTS 48 31 5120000 2500
18141335 lgkm39 E May 29, 2016, 5:42 a.m. OK GNU C++ TESTS 48 31 5120000 2500
18099555 vjtest E May 26, 2016, 7:08 a.m. OK GNU C++ TESTS 48 31 6758400 2500
18099133 vjtest E May 26, 2016, 6:38 a.m. OK GNU C++ TESTS 48 31 6758400 2500
18099094 vjtest E May 26, 2016, 6:35 a.m. OK GNU C++ TESTS 48 31 6758400 2500
18099005 vjtest E May 26, 2016, 6:29 a.m. OK GNU C++ TESTS 48 31 6758400 2500
18098916 vjtest E May 26, 2016, 6:22 a.m. OK GNU C++ TESTS 48 31 6758400 2500
14985906 t1016d E Dec. 24, 2015, 4:45 p.m. OK GNU C++11 TESTS 48 31 1843200 2500
13114771 syc1999 E Sept. 20, 2015, 1:19 p.m. OK GNU C++11 TESTS 48 31 1843200 2500
14985925 ntu_vjudge_2 E Dec. 24, 2015, 4:46 p.m. OK GNU C++11 TESTS 48 31 1945600 2500
13041499 ainta E Sept. 16, 2015, 4:35 p.m. OK GNU C++11 TESTS 48 31 2867200 2500
13281239 arundeepak E Sept. 28, 2015, 3:06 p.m. OK GNU C++11 TESTS 48 31 2969600 2500
13091377 DBradac E Sept. 18, 2015, 5:53 p.m. OK GNU C++11 TESTS 48 31 2969600 2500
15448692 OnionPringles E Jan. 20, 2016, 6:22 a.m. OK GNU C++11 TESTS 48 31 3276800 2500
13904651 Edvard E Oct. 27, 2015, 7:47 p.m. OK GNU C++11 TESTS 48 31 3993600 2500
67693976 QAQAutoMaton E Dec. 27, 2019, 12:20 p.m. OK GNU C++11 TESTS 48 31 6451200 2500
66039108 xht37 E Nov. 30, 2019, 12:52 p.m. OK GNU C++11 TESTS 48 31 6758400 2500
65348413 Joker_23 E Nov. 19, 2019, 1:23 p.m. OK GNU C++14 TESTS 48 31 1331200 2500
65739058 cz_xuyixuan E Nov. 26, 2019, 9:16 a.m. OK GNU C++14 TESTS 48 31 2662400 2500
34250437 Navick E Jan. 17, 2018, 11:42 a.m. OK GNU C++14 TESTS 48 31 5836800 2500
57144151 Scut82 E July 16, 2019, 12:18 p.m. OK GNU C++14 TESTS 48 46 1740800 2500
65477345 wucstdio E Nov. 21, 2019, 10:34 a.m. OK GNU C++14 TESTS 48 46 2150400 2500
63788194 Isonan E Oct. 30, 2019, 12:54 p.m. OK GNU C++14 TESTS 48 46 2252800 2500
69567087 vjudge1 E Jan. 26, 2020, 12:49 p.m. OK GNU C++14 TESTS 48 46 2662400 2500
66162222 yhx-12243 E Dec. 2, 2019, 5:19 a.m. OK GNU C++14 TESTS 48 46 2764800 2500
69807381 Scut82 E Jan. 30, 2020, 2:39 a.m. OK GNU C++14 TESTS 48 46 3072000 2500
67011344 Minamoto E Dec. 16, 2019, 9:58 a.m. OK GNU C++14 TESTS 48 46 3174400 2500
63413250 alan_cty E Oct. 26, 2019, 2:26 a.m. OK GNU C++17 TESTS 48 31 2048000 2500
63757941 CMXRYNP E Oct. 30, 2019, 1:16 a.m. OK GNU C++17 TESTS 48 46 1331200 2500
57253521 Samcompu E July 18, 2019, 1:15 a.m. OK GNU C++17 TESTS 48 46 1331200 2500
62553279 AA_love_dreamoon E Oct. 14, 2019, 9:34 a.m. OK GNU C++17 TESTS 48 46 1433600 2500
57253663 vjudge1 E July 18, 2019, 1:20 a.m. OK GNU C++17 TESTS 48 46 1433600 2500
69606854 HirasawaaYui E Jan. 27, 2020, 10:03 a.m. OK GNU C++17 TESTS 48 46 1843200 2500
53950633 Atreus E May 10, 2019, 9:21 a.m. OK GNU C++17 TESTS 48 46 1843200 2500
57200299 Samcompu E July 17, 2019, 1:31 p.m. OK GNU C++17 TESTS 48 46 2048000 2500
47174757 Shayan.P E Dec. 17, 2018, 4:55 p.m. OK GNU C++17 TESTS 48 46 2764800 2500
67143204 ppc_qjd E Dec. 18, 2019, 7:42 a.m. OK GNU C++17 TESTS 48 46 3686400 2500
13066241 nitegazer E Sept. 17, 2015, 11:58 a.m. OK Java 7 TESTS 48 171 1024000 2500
13050006 uwi E Sept. 16, 2015, 5:38 p.m. OK Java 8 TESTS 48 140 0 2500
13042415 Egor E Sept. 16, 2015, 4:41 p.m. OK Java 8 TESTS 48 202 0 2500
13113232 AndreiNet E Sept. 20, 2015, 11:03 a.m. OK Java 8 TESTS 48 218 0 2500
13042690 Vedensky E Sept. 16, 2015, 4:43 p.m. OK MS C++ TESTS 48 46 3686400 2500
13070975 Milanin E Sept. 17, 2015, 4:03 p.m. OK MS C++ TESTS 48 93 4608000 2500

remove filters

Back to search problems