Codeforces Round 704 (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
1492 Codeforces Round 704 (Div. 2) FINISHED False 7200 123108863 Feb. 23, 2021, 9:05 a.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 16389 ) C Maximum width PROGRAMMING data structures dp greedy two pointers

B'Your classmate, whom you do not like because he is boring, but whom you respect for his intellect, has two strings: s of length n and t of length m . A sequence p_1, p_2, ldots, p_m , where 1 <= q p_1 < p_2 < ldots < p_m <= q n , is called beautiful, if s_{p_i} = t_i for all i from 1 to m . The width of a sequence is defined as max limits_{1 <= i < m} <= ft(p_{i + 1} - p_i right) . Please help your classmate to identify the beautiful sequence with the maximum width. Your classmate promised you that for the given strings s and t there is at least one beautiful sequence. The first input line contains two integers n and m ( 2 <= q m <= q n <= q 2 cdot 10^5 ) -- the lengths of the strings s and t . The following line contains a single string s of length n , consisting of lowercase letters of the Latin alphabet. The last line contains a single string t of length m , consisting of lowercase letters of the Latin alphabet. It is guaranteed that there is at least one beautiful sequence for the given strings. Output one integer -- the maximum width of a beautiful sequence. In the first example there are two beautiful sequences of width 3 : they are {1, 2, 5 } and {1, 4, 5 } . In the second example the beautiful sequence with the maximum width is {1, 5 } . In the third example there is exactly one beautiful sequence -- it is {1, 2, 3, 4, 5 } . In the fourth example there is exactly one beautiful sequence -- it is {1, 2 } . '...

Tutorials

Codeforces Round #704 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
108351156 ndocx C Feb. 24, 2021, 3:02 a.m. OK FPC TESTS 58 31 3276800
108352164 shelter C Feb. 24, 2021, 3:25 a.m. OK GNU C++11 TESTS 58 15 2048000
108345296 MCAdam C Feb. 23, 2021, 11:37 p.m. OK GNU C++11 TESTS 58 15 2048000
108310638 Smiekids C Feb. 23, 2021, 2:29 p.m. OK GNU C++11 TESTS 56 15 2048000
108310338 quantumbinary C Feb. 23, 2021, 2:27 p.m. OK GNU C++11 TESTS 56 15 2355200
108330200 bassdummy C Feb. 23, 2021, 5:25 p.m. OK GNU C++11 TESTS 58 15 3072000
108302231 liujia123456 C Feb. 23, 2021, 1:19 p.m. OK GNU C++11 TESTS 56 15 20070400
108357804 Iridescent2020 C Feb. 24, 2021, 5:07 a.m. OK GNU C++11 TESTS 58 30 1843200
108334500 Eusebiu_distrugatorul C Feb. 23, 2021, 6:25 p.m. OK GNU C++11 TESTS 58 30 1945600
108352492 YTUWalker C Feb. 24, 2021, 3:34 a.m. OK GNU C++11 TESTS 58 30 2048000
108352377 wanzz-hehe C Feb. 24, 2021, 3:31 a.m. OK GNU C++11 TESTS 58 30 2048000
108319109 aryan_r C Feb. 23, 2021, 3:49 p.m. OK GNU C++14 TESTS 56 15 1945600
108303692 C.jiangchao C Feb. 23, 2021, 1:30 p.m. OK GNU C++14 TESTS 56 30 2048000
108317020 rkb_rd C Feb. 23, 2021, 3:28 p.m. OK GNU C++14 TESTS 56 31 1536000
108344432 nishit.sharma C Feb. 23, 2021, 10:44 p.m. OK GNU C++14 TESTS 58 31 1536000
108338954 vanshaj2000 C Feb. 23, 2021, 7:44 p.m. OK GNU C++14 TESTS 58 31 1536000
108303115 ankush_kumar_gupta C Feb. 23, 2021, 1:26 p.m. OK GNU C++14 TESTS 56 31 1536000
108355083 cccjjz C Feb. 24, 2021, 4:30 a.m. OK GNU C++14 TESTS 58 31 2048000
108362358 byteeplus C Feb. 24, 2021, 5:56 a.m. OK GNU C++14 TESTS 58 31 2048000
108360186 LONG__INT C Feb. 24, 2021, 5:34 a.m. OK GNU C++14 TESTS 58 31 2048000
108350574 thantrongtri3 C Feb. 24, 2021, 2:49 a.m. OK GNU C++14 TESTS 58 31 2048000
108301593 Tao123 C Feb. 23, 2021, 1:15 p.m. OK GNU C++17 TESTS 56 30 2048000
108305425 LIUZHIHAN0217 C Feb. 23, 2021, 1:44 p.m. OK GNU C++17 TESTS 56 30 2355200
108308178 shubham581075 C Feb. 23, 2021, 2:07 p.m. OK GNU C++17 TESTS 56 30 3891200
108359007 palax0 C Feb. 24, 2021, 5:21 a.m. OK GNU C++17 TESTS 58 31 1228800
108348840 liaojiqing C Feb. 24, 2021, 2 a.m. OK GNU C++17 TESTS 58 31 1228800
108303003 Ant_Man C Feb. 23, 2021, 1:25 p.m. OK GNU C++17 TESTS 56 31 1228800
108312502 vjudge2 C Feb. 23, 2021, 2:46 p.m. OK GNU C++17 TESTS 56 31 1433600
108352706 gusxo C Feb. 24, 2021, 3:39 a.m. OK GNU C++17 TESTS 58 31 1536000
108354702 tsk3081 C Feb. 24, 2021, 4:23 a.m. OK GNU C++17 TESTS 58 31 1536000
108354601 btbigbrain C Feb. 24, 2021, 4:21 a.m. OK GNU C++17 TESTS 58 31 1536000
108307900 ankushkhanna C Feb. 23, 2021, 2:05 p.m. OK GNU C++17 (64) TESTS 56 30 1536000
108338261 d7kk C Feb. 23, 2021, 7:29 p.m. OK GNU C++17 (64) TESTS 58 30 2355200
108357402 _Isaunoya_ C Feb. 24, 2021, 5:03 a.m. OK GNU C++17 (64) TESTS 58 30 2355200
108343264 eggag32 C Feb. 23, 2021, 9:47 p.m. OK GNU C++17 (64) TESTS 58 30 2355200
108348049 Jerry_L C Feb. 24, 2021, 1:35 a.m. OK GNU C++17 (64) TESTS 58 31 1228800
108334185 Clueless C Feb. 23, 2021, 6:20 p.m. OK GNU C++17 (64) TESTS 58 31 1536000
108352017 Phantom_Killer C Feb. 24, 2021, 3:22 a.m. OK GNU C++17 (64) TESTS 58 31 1536000
108345098 7oSkaaa C Feb. 23, 2021, 11:25 p.m. OK GNU C++17 (64) TESTS 58 31 1536000
108314467 swimmerstar C Feb. 23, 2021, 3:04 p.m. OK GNU C++17 (64) TESTS 56 31 1536000
108341486 Arif19 C Feb. 23, 2021, 8:47 p.m. OK GNU C++17 (64) TESTS 58 31 2048000
108333749 SaberXpro C Feb. 23, 2021, 6:14 p.m. OK Java 11 TESTS 58 171 0
108312815 Lelouch_1 C Feb. 23, 2021, 2:49 p.m. OK Java 11 TESTS 56 186 0
108349460 prasoonjain006 C Feb. 24, 2021, 2:18 a.m. OK Java 11 TESTS 58 186 0
108310320 DeepthansuGvs C Feb. 23, 2021, 2:27 p.m. OK Java 11 TESTS 56 186 0
108313078 saurabh_kl C Feb. 23, 2021, 2:51 p.m. OK Java 11 TESTS 56 187 0
108350171 pikachu_pika_pika C Feb. 24, 2021, 2:39 a.m. OK Java 11 TESTS 58 187 0
108320683 sumit_1002 C Feb. 23, 2021, 4:06 p.m. OK Java 11 TESTS 56 187 0
108318690 gssakash C Feb. 23, 2021, 3:45 p.m. OK Java 11 TESTS 56 187 0
108318478 gssakash C Feb. 23, 2021, 3:43 p.m. OK Java 11 TESTS 56 187 0
108313738 GrizzlyGunner C Feb. 23, 2021, 2:57 p.m. OK Java 11 TESTS 56 187 0
108343738 twoBit C Feb. 23, 2021, 10:08 p.m. OK Java 8 TESTS 58 109 0
108329703 honeysingh18 C Feb. 23, 2021, 5:19 p.m. OK Java 8 TESTS 58 124 0
108329696 OmarFouad C Feb. 23, 2021, 5:19 p.m. OK Java 8 TESTS 58 124 0
108318925 DemonSlayer18 C Feb. 23, 2021, 3:47 p.m. OK Java 8 TESTS 56 124 0
108312412 guru1603 C Feb. 23, 2021, 2:45 p.m. OK Java 8 TESTS 56 124 0
108312068 singhdhanwant C Feb. 23, 2021, 2:42 p.m. OK Java 8 TESTS 56 124 0
108310698 Charigardash C Feb. 23, 2021, 2:30 p.m. OK Java 8 TESTS 56 124 0
108308155 coder_terror C Feb. 23, 2021, 2:07 p.m. OK Java 8 TESTS 56 124 0
108306412 Abdallah_Ragab00 C Feb. 23, 2021, 1:52 p.m. OK Java 8 TESTS 56 124 0
108320677 pulkit1411 C Feb. 23, 2021, 4:06 p.m. OK Java 8 TESTS 56 124 16179200
108333456 vip_in_hunt_for_code C Feb. 23, 2021, 6:10 p.m. OK Kotlin TESTS 58 171 102400
108301247 yakamoto C Feb. 23, 2021, 1:12 p.m. OK Kotlin TESTS 56 202 8294400
108304147 vilena1991 C Feb. 23, 2021, 1:34 p.m. OK Mono C# TESTS 56 62 6553600
108336708 DMN C Feb. 23, 2021, 7 p.m. OK Mono C# TESTS 58 311 209100800
108362440 Goodenough_ C Feb. 24, 2021, 5:57 a.m. OK MS C++ TESTS 58 46 2355200
108348856 vjudge2 C Feb. 24, 2021, 2 a.m. OK MS C++ 2017 TESTS 58 31 2048000
108348357 porridge_tl C Feb. 24, 2021, 1:46 a.m. OK MS C++ 2017 TESTS 58 31 2048000
108309657 yhyu C Feb. 23, 2021, 2:20 p.m. OK MS C++ 2017 TESTS 56 31 2252800
108342499 moreda C Feb. 23, 2021, 9:18 p.m. OK MS C++ 2017 TESTS 58 31 2355200
108321510 ustaritz C Feb. 23, 2021, 4:15 p.m. OK MS C++ 2017 TESTS 56 31 2457600
108345944 laozhu1234 C Feb. 24, 2021, 12:14 a.m. OK MS C++ 2017 TESTS 58 31 3276800
108305140 9j51d C Feb. 23, 2021, 1:42 p.m. OK MS C++ 2017 TESTS 56 31 6041600
108308467 Gravekper C Feb. 23, 2021, 2:10 p.m. OK MS C++ 2017 TESTS 56 46 2355200
108333398 Tixor C Feb. 23, 2021, 6:09 p.m. OK MS C++ 2017 TESTS 58 46 8908800
108326076 pgggggggggh C Feb. 23, 2021, 4:51 p.m. OK MS C++ 2017 TESTS 58 61 5529600
108301561 eSeF_ C Feb. 23, 2021, 1:14 p.m. OK .NET Core C# TESTS 56 108 3072000
108336740 tennisru C Feb. 23, 2021, 7:01 p.m. OK Node.js TESTS 58 109 16896000
108340571 sayan_india C Feb. 23, 2021, 8:22 p.m. OK PyPy 2 TESTS 58 93 4915200
108327800 aayush_1607 C Feb. 23, 2021, 4:56 p.m. OK PyPy 2 TESTS 58 124 7782400
108353587 1509 C Feb. 24, 2021, 4 a.m. OK PyPy 3 TESTS 58 124 5324800
108334842 yinuowang C Feb. 23, 2021, 6:30 p.m. OK PyPy 3 TESTS 58 124 8704000
108302311 _k_ C Feb. 23, 2021, 1:20 p.m. OK PyPy 3 TESTS 56 139 5324800
108334578 Anuranjan_Pandey C Feb. 23, 2021, 6:26 p.m. OK PyPy 3 TESTS 58 139 8089600
108304308 heronry C Feb. 23, 2021, 1:35 p.m. OK PyPy 3 TESTS 56 139 9113600
108309474 jaglike_makkar C Feb. 23, 2021, 2:18 p.m. OK PyPy 3 TESTS 56 139 9318400
108355877 safeers C Feb. 24, 2021, 4:42 a.m. OK PyPy 3 TESTS 58 139 9830400
108301008 marcus.li C Feb. 23, 2021, 1:11 p.m. OK PyPy 3 TESTS 56 140 5120000
108300956 marcus.li C Feb. 23, 2021, 1:11 p.m. OK PyPy 3 TESTS 56 140 5324800
108312299 rajbit C Feb. 23, 2021, 2:44 p.m. OK PyPy 3 TESTS 56 140 8396800
108360407 REDVED C Feb. 24, 2021, 5:36 a.m. OK Python 3 TESTS 58 217 9728000
108323041 johnnysaph C Feb. 23, 2021, 4:31 p.m. OK Python 3 TESTS 58 233 11468800
108336183 god_gyeol C Feb. 23, 2021, 6:52 p.m. OK Python 3 TESTS 58 233 11776000
108302085 Angel_Demon C Feb. 23, 2021, 1:18 p.m. OK Python 3 TESTS 56 248 10547200
108310467 TissueRoll C Feb. 23, 2021, 2:28 p.m. OK Python 3 TESTS 56 249 9420800
108338763 eugalt C Feb. 23, 2021, 7:40 p.m. OK Python 3 TESTS 58 280 6553600
108345837 altunyanv C Feb. 24, 2021, 12:08 a.m. OK Python 3 TESTS 58 280 9011200
108349492 smokecat C Feb. 24, 2021, 2:19 a.m. OK Python 3 TESTS 58 280 13209600
108311256 eugalt C Feb. 23, 2021, 2:35 p.m. OK Python 3 TESTS 56 295 5939200
108350252 smokecat C Feb. 24, 2021, 2:40 a.m. OK Python 3 TESTS 58 295 9216000
108337508 ocamler C Feb. 23, 2021, 7:14 p.m. OK Rust TESTS 58 46 2560000
108318534 apilat C Feb. 23, 2021, 3:43 p.m. OK Rust TESTS 56 46 5529600

remove filters

Back to search problems