Codeforces Round 869 (Div. 1)

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
1817 Codeforces Round 869 (Div. 1) FINISHED False 8100 54487463 April 29, 2023, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 217 ) F Entangled Substrings PROGRAMMING string suffix structures

B"You are given a string s . A pair of its non-empty substrings (a, b) is called entangled if there is a (possibly empty) link string c such that: In other words, a and b occur in s only as substrings of acb . Compute the total number of entangled pairs of substrings of s . A string a is a substring of a string b if a can be obtained from b by the deletion of several (possibly zero or all) characters from the beginning and several (possibly zero or all) characters from the end. The first and only line contains a string s of lowercase English letters ( 1 <= q |s| <= q 10^5 ) -- the string for which you should count pairs of entangled substrings. Output a single integer, the number of entangled pairs of substrings of s . In the first example, the only entangled pair is (ab,ba). For this pair, the corresponding link string c is empty, as they only occur as substrings of the whole string abba, which doesn't have any characters between ab and ba. In the second example, there are no entangled pairs. In the third example, the entangled pairs are (a,b), (b,c), (a,c), (a,bc), and (ab,c). For most pairs, the corresponding link string c is empty, except for the pair (a,c), for which the link string c is b, as a and c only occur as substrings of the string abc."...

Tutorials

Codeforces Round #869 (Div.1, Div.2) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
203948279 rainboy F April 29, 2023, 4:15 p.m. OK GNU C11 TESTS 85 1154 253440000
203944498 waaitg F April 29, 2023, 4:01 p.m. OK GNU C++14 TESTS 85 46 40550400
203987643 fantasy F April 29, 2023, 11:48 p.m. OK GNU C++17 TESTS 85 436 158003200
203943098 orzdevinwang F April 29, 2023, 3:56 p.m. OK GNU C++17 (64) TESTS 85 405 267673600
203987385 chappy1 F April 29, 2023, 11:41 p.m. OK GNU C++17 (64) TESTS 85 405 267673600
203972380 mo_onrabbit2 F April 29, 2023, 7:08 p.m. OK GNU C++17 (64) TESTS 85 998 215552000
203993098 ecnerwala F April 30, 2023, 2:13 a.m. OK GNU C++20 (64) TESTS 85 62 36966400
203966586 jiangly F April 29, 2023, 6:11 p.m. OK GNU C++20 (64) TESTS 85 140 44851200
203958486 Radewoosh F April 29, 2023, 4:49 p.m. OK GNU C++20 (64) TESTS 85 312 237568000
204003142 cnnfls_csy F April 30, 2023, 5:40 a.m. OK GNU C++20 (64) TESTS 85 436 104755200

remove filters

Back to search problems