Good Bye 2020

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
1466 Good Bye 2020 FINISHED False 10800 128013911 Dec. 30, 2020, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 949 ) G Song of the Sirens PROGRAMMING divide and conquer hashing math strings

B"Homer, Odyssey In the times of Jason and the Argonauts, it was well known that sirens use the sound of their songs to lure sailors into their demise. Yet only a few knew that every time sirens call a sailor by his name, his will weakens, making him more vulnerable. For the purpose of this problem, both siren songs and names of the sailors will be represented as strings of lowercase English letters. The more times the sailor's name occurs as a contiguous substring of the song, the greater danger he is in. Jason found out that sirens can sing one of the n+1 songs, which have the following structure: let s_i ( 0 <= q i <= q n ) be the i -th song and t be a string of length n , then for every i < n : s_{i+1} = s_i t_i s_i . In other words i+1 -st song is the concatenation of i -th song, i -th letter ( 0 -indexed) of t and the i -th song. Fortunately, he also knows s_0 and t . Jason wonders how many times a sailor's name is mentioned in a particular song. Answer q queries: given the sailor's name ( w ) and the index of a song ( i ) output the number of occurrences of w in s_i as a substring. As this number can be quite large, output its remainder modulo 10^9+7 . In the first line of input there are two integers n , q ( 1 <= q n, q <= q 10^5 ) meaning that there are n+1 songs and q queries. In the next two lines strings s_0 and t follow ( 1 <= q |s_0| <= q 100, |t| = n ). Next q lines describe the queries; each one contains an integer k ( 0 <= q k <= q n ), the index of the song sung by the sirens, and a non-empty string w , which is the name of a sailor. All strings in this problem consist only of lowercase English letters, and the sum of lengths of sailors' names does not exceed 10^6 . Output q lines, i -th of them should contain the remainder modulo 10^9+7 "...

Tutorials

Good Bye 2020 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
102877938 Asriel_Dreemurr G Dec. 31, 2020, 3:25 a.m. OK GNU C++11 TESTS 97 108 247296000
102849385 crasysky G Dec. 30, 2020, 5:03 p.m. OK GNU C++11 TESTS 95 156 58163200
102855279 Rewritetxdy G Dec. 30, 2020, 5:23 p.m. OK GNU C++11 TESTS 95 202 114278400
102884134 chunjiangchaoshui G Dec. 31, 2020, 5:40 a.m. OK GNU C++11 TESTS 97 218 45568000
102867623 MrMiroticc G Dec. 30, 2020, 8:58 p.m. OK GNU C++11 TESTS 96 311 54886400
102872667 jzp G Dec. 30, 2020, 11:44 p.m. OK GNU C++11 TESTS 97 451 214732800
102849639 MofK G Dec. 30, 2020, 5:03 p.m. OK GNU C++11 TESTS 95 467 80384000
102854824 CXY07 G Dec. 30, 2020, 5:22 p.m. OK GNU C++11 TESTS 95 483 122470400
102872707 jzp G Dec. 30, 2020, 11:46 p.m. OK GNU C++11 TESTS 97 498 214732800
102863845 duality G Dec. 30, 2020, 7:55 p.m. OK GNU C++11 TESTS 95 545 15257600
102858400 dlalswp25 G Dec. 30, 2020, 5:33 p.m. OK GNU C++14 TESTS 95 155 38809600
102850880 al3xstr33t G Dec. 30, 2020, 5:08 p.m. OK GNU C++14 TESTS 95 155 60825600
102885208 CodePlatina G Dec. 31, 2020, 5:58 a.m. OK GNU C++14 TESTS 97 155 62054400
102877894 MagicSpark G Dec. 31, 2020, 3:24 a.m. OK GNU C++14 TESTS 97 171 49049600
102865706 clyring G Dec. 30, 2020, 8:20 p.m. OK GNU C++14 TESTS 96 186 36761600
102854144 donentseto G Dec. 30, 2020, 5:19 p.m. OK GNU C++14 TESTS 95 186 57856000
102850759 PinkRabbit G Dec. 30, 2020, 5:07 p.m. OK GNU C++14 TESTS 95 187 37171200
102881292 marcOS G Dec. 31, 2020, 4:47 a.m. OK GNU C++14 TESTS 97 187 42496000
102885328 farmerboy G Dec. 31, 2020, 6 a.m. OK GNU C++14 TESTS 97 218 55808000
102868114 espr1t G Dec. 30, 2020, 9:09 p.m. OK GNU C++14 TESTS 96 233 76697600
102862411 Nson G Dec. 30, 2020, 7:37 p.m. OK GNU C++17 TESTS 95 140 131584000
102883730 I_love_tigersugar G Dec. 31, 2020, 5:33 a.m. OK GNU C++17 TESTS 97 202 162304000
102875277 firecookie G Dec. 31, 2020, 1:49 a.m. OK GNU C++17 TESTS 97 234 36659200
102876189 2005lz G Dec. 31, 2020, 2:29 a.m. OK GNU C++17 TESTS 97 249 73625600
102879696 jz_597 G Dec. 31, 2020, 4:09 a.m. OK GNU C++17 TESTS 97 264 42598400
102872428 limabeans G Dec. 30, 2020, 11:34 p.m. OK GNU C++17 TESTS 97 264 241868800
102849305 Pajaraja G Dec. 30, 2020, 5:02 p.m. OK GNU C++17 TESTS 95 265 27238400
102872388 limabeans G Dec. 30, 2020, 11:32 p.m. OK GNU C++17 TESTS 97 265 241868800
102866401 cheissmart2 G Dec. 30, 2020, 8:32 p.m. OK GNU C++17 TESTS 96 280 20377600
102872890 limabeans G Dec. 30, 2020, 11:54 p.m. OK GNU C++17 TESTS 97 280 54374400
102864010 ecnerwala G Dec. 30, 2020, 7:57 p.m. OK GNU C++17 (64) TESTS 95 139 16793600
102862083 ecnerwala G Dec. 30, 2020, 7:35 p.m. OK GNU C++17 (64) TESTS 95 140 20787200
102850802 GRT_2018 G Dec. 30, 2020, 5:08 p.m. OK GNU C++17 (64) TESTS 95 140 43315200
102862682 mareksom G Dec. 30, 2020, 7:41 p.m. OK GNU C++17 (64) TESTS 95 155 36249600
102867277 natsugiri G Dec. 30, 2020, 8:49 p.m. OK GNU C++17 (64) TESTS 96 155 47616000
102850707 dorijanlendvaj G Dec. 30, 2020, 5:07 p.m. OK GNU C++17 (64) TESTS 95 156 57344000
102848250 memset0c G Dec. 30, 2020, 4:59 p.m. OK GNU C++17 (64) TESTS 95 170 72396800
102864621 errorgorn G Dec. 30, 2020, 8:05 p.m. OK GNU C++17 (64) TESTS 95 186 77516800
102848514 scanhex G Dec. 30, 2020, 4:59 p.m. OK GNU C++17 (64) TESTS 95 187 70144000
102864459 errorgorn G Dec. 30, 2020, 8:02 p.m. OK GNU C++17 (64) TESTS 95 187 77516800
102856670 mphillotry G Dec. 30, 2020, 5:28 p.m. OK Java 11 TESTS 95 452 41267200
102875687 cirno3153 G Dec. 31, 2020, 2:08 a.m. OK Java 11 TESTS 97 795 72396800
102867985 Slamur G Dec. 30, 2020, 9:06 p.m. OK Java 8 TESTS 96 405 71168000
102867734 Slamur G Dec. 30, 2020, 9:01 p.m. OK Java 8 TESTS 96 514 88371200
102865725 fetetriste G Dec. 30, 2020, 8:20 p.m. OK Java 8 TESTS 96 748 77107200
102875020 tarattata1 G Dec. 31, 2020, 1:38 a.m. OK MS C++ 2017 TESTS 97 545 54886400
102874868 tarattata1 G Dec. 31, 2020, 1:30 a.m. OK MS C++ 2017 TESTS 97 592 54886400
102858812 keymoon G Dec. 30, 2020, 5:34 p.m. OK .NET Core C# TESTS 95 811 112332800

remove filters

Back to search problems