Codeforces Round 606 (Div. 1, based on Technocup 2020 Elimination Round 4)

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
1276 Codeforces Round 606 (Div. 1, based on Technocup 2020 Elimination Round 4) FINISHED False 7200 155501699 Dec. 14, 2019, 11:05 a.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 12359 ) A As Simple as One and Two PROGRAMMING dp greedy 1300

B'You are given a non-empty string s=s_1s_2 ... s_n , which consists only of lowercase Latin letters. Polycarp does not like a string if it contains at least one string "one" or at least one string "two" (or both at the same time) as a substring. In other words, Polycarp does not like the string s if there is an integer j ( 1 <= j <= n-2 ), that s_{j}s_{j+1}s_{j+2}= "one" or s_{j}s_{j+1}s_{j+2}= "two". For example: Polycarp wants to select a certain set of indices (positions) and remove all letters on these positions. All removals are made at the same time. For example, if the string looks like s= "onetwone", then if Polycarp selects two indices 3 and 6 , then "onetwone" will be selected and the result is "ontwne". What is the minimum number of indices (positions) that Polycarp needs to select to make the string liked? What should these positions be? The first line of the input contains an integer t ( 1 <= t <= 10^4 ) -- the number of test cases in the input. Next, the test cases are given. Each test case consists of one non-empty string s . Its length does not exceed 1.5 cdot10^5 . The string s consists only of lowercase Latin letters. It is guaranteed that the sum of lengths of all lines for all input data in the test does not exceed 1.5 cdot10^6 . Print an answer for each test case in the input in order of their appearance. The first line of each answer should contain r ( 0 <= r <= |s| ) -- the required minimum number of positions to be removed, where |s| is the length of the given line. The second line of each answer should contain r different integers -- the indices themselves for removal in any order. Indices are numbered from left to right from 1 to the length of the string. If r=0 , then the second line can be skipped (or you can print empty). If there are several answers, print any of them. In the first example, answers are: In th'...

Tutorials

Technocup 2020 — Elimination Round 4 + Codeforces Round 606: Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
66841966 hos.lyric A Dec. 14, 2019, 11:29 a.m. OK D TESTS 15 342 4198400 1300
67005731 Ar_9020_th A Dec. 16, 2019, 7:51 a.m. OK GNU C11 TESTS 16 1606 7475200 1300
67857694 hp_stormbreaker21 A Dec. 29, 2019, 6:47 a.m. OK GNU C11 TESTS 16 1637 1331200 1300
66882353 fenofista A Dec. 14, 2019, 4:59 p.m. OK GNU C11 TESTS 16 1638 102400 1300
68946407 abcd227 A Jan. 16, 2020, 4:20 p.m. OK GNU C11 TESTS 16 1653 1331200 1300
67007555 chowdhuryshashwoto A Dec. 16, 2019, 8:36 a.m. OK GNU C11 TESTS 16 1668 512000 1300
68200983 mohana-256 A Jan. 4, 2020, 3:46 p.m. OK GNU C11 TESTS 16 2106 1843200 1300
67049080 luogu_bot3 A Dec. 17, 2019, 2:25 a.m. OK GNU C++11 TESTS 16 46 614400 1300
67058570 yuzhechuan A Dec. 17, 2019, 8:04 a.m. OK GNU C++11 TESTS 16 46 716800 1300
68329272 luogu_bot2 A Jan. 6, 2020, 6:04 p.m. OK GNU C++11 TESTS 16 46 1024000 1300
66836064 memset0c A Dec. 14, 2019, 11:13 a.m. OK GNU C++11 TESTS 15 46 1024000 1300
67020928 AyoAyowei A Dec. 16, 2019, 12:56 p.m. OK GNU C++11 TESTS 16 46 2048000 1300
67047961 QAQAutoMaton A Dec. 17, 2019, 1:05 a.m. OK GNU C++11 TESTS 16 46 4915200 1300
66838975 MoQianXue A Dec. 14, 2019, 11:20 a.m. OK GNU C++11 TESTS 15 46 7065600 1300
67421551 QwQcOrZ A Dec. 22, 2019, 11:52 a.m. OK GNU C++11 TESTS 16 46 10035200 1300
66840368 LiM_256 A Dec. 14, 2019, 11:24 a.m. OK GNU C++11 TESTS 15 61 716800 1300
66837329 xay5421 A Dec. 14, 2019, 11:16 a.m. OK GNU C++11 TESTS 15 61 2662400 1300
67056264 disangan233 A Dec. 17, 2019, 7 a.m. OK GNU C++14 TESTS 16 46 12902400 1300
66839800 disangan233 A Dec. 14, 2019, 11:23 a.m. OK GNU C++14 TESTS 15 46 12902400 1300
66845953 pushkar12 A Dec. 14, 2019, 11:42 a.m. OK GNU C++14 TESTS 15 77 1126400 1300
66840582 Whalanator A Dec. 14, 2019, 11:25 a.m. OK GNU C++14 TESTS 15 92 921600 1300
67037997 abrar1 A Dec. 16, 2019, 6:06 p.m. OK GNU C++14 TESTS 16 92 921600 1300
66835798 dlwocks31 A Dec. 14, 2019, 11:13 a.m. OK GNU C++14 TESTS 15 92 1024000 1300
66882465 polarz A Dec. 14, 2019, 5:02 p.m. OK GNU C++14 TESTS 16 92 1024000 1300
66839494 KisekiPurin2019 A Dec. 14, 2019, 11:22 a.m. OK GNU C++14 TESTS 15 92 2560000 1300
66934773 RM07 A Dec. 15, 2019, 8:10 a.m. OK GNU C++14 TESTS 16 93 409600 1300
66835573 scli A Dec. 14, 2019, 11:12 a.m. OK GNU C++14 TESTS 15 93 716800 1300
67049147 Thuleanx A Dec. 17, 2019, 2:28 a.m. OK GNU C++17 TESTS 16 62 8499200 1300
66835548 summitwei A Dec. 14, 2019, 11:12 a.m. OK GNU C++17 TESTS 15 77 921600 1300
66847452 HanaYukii A Dec. 14, 2019, 11:47 a.m. OK GNU C++17 TESTS 15 78 1843200 1300
68359403 IWanna_MightiestDisciple A Jan. 7, 2020, 1:29 p.m. OK GNU C++17 TESTS 16 78 7475200 1300
67074054 Aman_Panwar A Dec. 17, 2019, 1:49 p.m. OK GNU C++17 TESTS 16 92 1024000 1300
68642777 HimanshuSharma A Jan. 12, 2020, 8:03 a.m. OK GNU C++17 TESTS 16 92 1024000 1300
66848616 yorky A Dec. 14, 2019, 11:51 a.m. OK GNU C++17 TESTS 15 92 1024000 1300
66843413 xgzc A Dec. 14, 2019, 11:33 a.m. OK GNU C++17 TESTS 15 93 716800 1300
67070662 K0u1e A Dec. 17, 2019, 12:39 p.m. OK GNU C++17 TESTS 16 93 716800 1300
68967491 Koo_ A Jan. 17, 2020, 5:40 a.m. OK GNU C++17 TESTS 16 93 716800 1300
66838471 sameep17264 A Dec. 14, 2019, 11:19 a.m. OK Java 11 TESTS 15 327 0 1300
68369106 marwlod A Jan. 7, 2020, 5:04 p.m. OK Java 11 TESTS 16 545 409600 1300
68388087 saik018 A Jan. 8, 2020, 7:07 a.m. OK Java 11 TESTS 16 545 1945600 1300
67655365 nick_301 A Dec. 26, 2019, 1:42 p.m. OK Java 11 TESTS 16 1964 0 1300
69541997 alankritanand001 A Jan. 25, 2020, 10:12 p.m. OK Java 11 TESTS 16 2027 716800 1300
67796050 reza_pishkoo A Dec. 28, 2019, 4:42 p.m. OK Java 11 TESTS 16 2043 307200 1300
67759843 30818 A Dec. 27, 2019, 9:27 p.m. OK Java 11 TESTS 16 2183 0 1300
66847119 uwi A Dec. 14, 2019, 11:46 a.m. OK Java 8 TESTS 15 186 0 1300
66839464 cwise A Dec. 14, 2019, 11:22 a.m. OK Java 8 TESTS 15 186 44441600 1300
69058181 CecilioG A Jan. 18, 2020, 3:21 p.m. OK Java 8 TESTS 16 202 0 1300
69058215 sallu1234 A Jan. 18, 2020, 3:21 p.m. OK Java 8 TESTS 16 217 0 1300
67394088 asafiul A Dec. 21, 2019, 9:28 p.m. OK Java 8 TESTS 16 233 0 1300
68462904 Megabyte A Jan. 9, 2020, 6:50 p.m. OK Java 8 TESTS 16 234 0 1300
66837962 spar5h A Dec. 14, 2019, 11:18 a.m. OK Java 8 TESTS 15 234 0 1300
67421327 vjvjain0 A Dec. 22, 2019, 11:47 a.m. OK Java 8 TESTS 16 249 0 1300
67282109 abdullah_emad12 A Dec. 20, 2019, 1:20 p.m. OK Java 8 TESTS 16 249 0 1300
67182961 ijxjdjd A Dec. 19, 2019, 1:47 a.m. OK Java 8 TESTS 16 249 0 1300
67061335 hcmdgh A Dec. 17, 2019, 9:12 a.m. OK Kotlin TESTS 16 514 819200 1300
66888767 darnley A Dec. 14, 2019, 7:22 p.m. OK Kotlin TESTS 16 529 2048000 1300
66855914 darnley A Dec. 14, 2019, 12:14 p.m. OK Kotlin TESTS 15 561 1638400 1300
68152560 camypaper A Jan. 4, 2020, 7:32 a.m. OK Mono C# TESTS 16 202 58572800 1300
67194719 branimir116 A Dec. 19, 2019, 8:34 a.m. OK Mono C# TESTS 16 249 37171200 1300
67033801 Svenxx A Dec. 16, 2019, 4:43 p.m. OK Mono C# TESTS 16 1060 49356800 1300
66839462 Apsara A Dec. 14, 2019, 11:22 a.m. OK MS C++ TESTS 15 140 11571200 1300
66838084 math957963 A Dec. 14, 2019, 11:18 a.m. OK MS C++ TESTS 15 170 921600 1300
67494501 wajdi123 A Dec. 23, 2019, 9:26 p.m. OK MS C++ TESTS 16 296 614400 1300
66842853 nukeykt A Dec. 14, 2019, 11:31 a.m. OK MS C++ 2017 TESTS 15 139 819200 1300
68716916 AleksanderBalobanov A Jan. 13, 2020, 2:49 p.m. OK MS C++ 2017 TESTS 16 217 921600 1300
67008455 Parsa84 A Dec. 16, 2019, 8:56 a.m. OK MS C++ 2017 TESTS 16 312 2457600 1300
67241043 milutin_ A Dec. 19, 2019, 4:29 p.m. OK MS C++ 2017 TESTS 16 327 819200 1300
66836501 jjang36524 A Dec. 14, 2019, 11:14 a.m. OK MS C++ 2017 TESTS 15 327 921600 1300
67250526 dvoretsky.boriss A Dec. 19, 2019, 6:54 p.m. OK MS C++ 2017 TESTS 16 373 921600 1300
68010187 Baharevim A Dec. 31, 2019, 3:19 p.m. OK MS C++ 2017 TESTS 16 373 3174400 1300
66874764 AlexandrBusse A Dec. 14, 2019, 2:36 p.m. OK MS C++ 2017 TESTS 16 374 921600 1300
67670810 kirilprogerr A Dec. 26, 2019, 8:19 p.m. OK MS C++ 2017 TESTS 16 389 921600 1300
67690760 xiema A Dec. 27, 2019, 11 a.m. OK PyPy 3 TESTS 16 467 19251200 1300
68224735 superslow A Jan. 5, 2020, 6:38 a.m. OK PyPy 3 TESTS 16 545 12185600 1300
66842533 titia A Dec. 14, 2019, 11:31 a.m. OK PyPy 3 TESTS 15 560 13107200 1300
67183174 jasonsebastian A Dec. 19, 2019, 2:02 a.m. OK PyPy 3 TESTS 16 561 11366400 1300
67491419 RalorSell A Dec. 23, 2019, 7:36 p.m. OK PyPy 3 TESTS 16 561 12492800 1300
66854350 pineriver A Dec. 14, 2019, 12:09 p.m. OK PyPy 3 TESTS 15 561 12595200 1300
67514468 anibitte A Dec. 24, 2019, 10:19 a.m. OK PyPy 3 TESTS 16 576 12083200 1300
66836569 catupper A Dec. 14, 2019, 11:15 a.m. OK PyPy 3 TESTS 15 577 11059200 1300
68946386 ng24_7 A Jan. 16, 2020, 4:19 p.m. OK PyPy 3 TESTS 16 592 12390400 1300
68046203 mottoper A Jan. 1, 2020, 4:34 p.m. OK PyPy 3 TESTS 16 592 12902400 1300
67945002 orailly A Dec. 30, 2019, 4:41 a.m. OK Python 3 TESTS 16 873 2355200 1300
67422601 cs1g A Dec. 22, 2019, 12:17 p.m. OK Python 3 TESTS 16 889 4915200 1300
67195346 QuantumK9 A Dec. 19, 2019, 8:48 a.m. OK Python 3 TESTS 16 982 3993600 1300
67567398 essi A Dec. 24, 2019, 7:58 p.m. OK Python 3 TESTS 16 998 2457600 1300
67853338 leaflowave A Dec. 29, 2019, 4:47 a.m. OK Python 3 TESTS 16 1076 2662400 1300
66976376 MinecraftFuns A Dec. 15, 2019, 2:50 p.m. OK Python 3 TESTS 16 1138 3584000 1300
67053630 stars_in_the_sky A Dec. 17, 2019, 5:42 a.m. OK Python 3 TESTS 16 1231 2662400 1300
68295067 Gikinet A Jan. 6, 2020, 1:52 a.m. OK Python 3 TESTS 16 1247 5222400 1300
67388969 boombaby A Dec. 21, 2019, 6:54 p.m. OK Python 3 TESTS 16 1278 14643200 1300
66971468 sruthi_1729 A Dec. 15, 2019, 1:20 p.m. OK Python 3 TESTS 16 1294 2662400 1300
66847030 sansen A Dec. 14, 2019, 11:46 a.m. OK Rust TESTS 15 124 8908800 1300
66839372 yakamoto A Dec. 14, 2019, 11:21 a.m. OK Scala TESTS 15 701 409600 1300

remove filters

Back to search problems