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 |
696
|
Codeforces Round 362 (Div. 1) |
FINISHED |
False |
8100 |
268665863 |
July 14, 2016, 4:35 p.m. |
Problems
B'Barney was hanging out with Nora for a while and now he thinks he may have feelings for her. Barney wants to send her a cheesy text message and wants to make her as happy as possible. Initially, happiness level of Nora is 0. Nora loves some pickup lines like "I 'm falling for you" and stuff. Totally, she knows n pickup lines, each consisting only of lowercase English letters, also some of them may be equal (in writing, but different in pronouncing or meaning though). Every time Nora sees i-th pickup line as a consecutive subsequence of Barney 's text message her happiness level increases by ai. These substrings may overlap, for example, Nora will see the pickup line aa twice and the pickup line ab once in text message aaab. Due to texting app limits, Barney 's text may have up to l characters. Barney asked you to help him make Nora as much happy as possible, it 's gonna be legen... The first line of input contains two integers n and l (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89200, xe2 x80 x891 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89l xe2 x80 x89 xe2 x89 xa4 xe2 x80 x891014) -- the number of pickup lines and the maximum length of Barney 's text. The second line contains n integers a1, xe2 x80 x89a2, xe2 x80 x89..., xe2 x80 x89an (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89ai xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89100), meaning that Nora 's happiness level increases by ai after every time seeing i-th pickup line. The next n lines contain the pickup lines. i-th of them contains a single string si consisting of only English lowercase letter. Summary length of all pickup lines does not exceed 200. All strings are not empty. Print the only integer -- the maximum possible value of Nora 's happiness level after reading Barney 's text. An optimal answer for the first sample case is hearth containing each pickup line exactly once. An optimal answer for the second sample case is artart. '... |
Tutorials
Submissions
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
38261386 |
vjudge1 |
D |
May 15, 2018, 8:33 a.m. |
OK |
GNU C++ |
TESTS |
47 |
514 |
4505600 |
|
2700 |
19171524 |
HeartBreak |
D |
July 16, 2016, 10:40 a.m. |
OK |
GNU C++ |
TESTS |
47 |
577 |
13004800 |
|
2700 |
19354912 |
Steven_Wu |
D |
July 23, 2016, 3:51 a.m. |
OK |
GNU C++ |
TESTS |
47 |
592 |
5836800 |
|
2700 |
19358939 |
kiiiiii |
D |
July 23, 2016, 7:32 a.m. |
OK |
GNU C++ |
TESTS |
47 |
654 |
1024000 |
|
2700 |
19145081 |
aasddf |
D |
July 15, 2016, 6:44 a.m. |
OK |
GNU C++ |
TESTS |
47 |
670 |
716800 |
|
2700 |
19163907 |
Lightning34 |
D |
July 16, 2016, 2 a.m. |
OK |
GNU C++ |
TESTS |
47 |
670 |
21811200 |
|
2700 |
19222706 |
Stilwell |
D |
July 19, 2016, 2:30 a.m. |
OK |
GNU C++ |
TESTS |
47 |
686 |
12902400 |
|
2700 |
19132519 |
HeartBreak |
D |
July 14, 2016, 6:48 p.m. |
OK |
GNU C++ |
TESTS |
47 |
702 |
13004800 |
|
2700 |
22913145 |
vjudge3 |
D |
Dec. 12, 2016, 8:01 p.m. |
OK |
GNU C++ |
TESTS |
47 |
732 |
3584000 |
|
2700 |
35617015 |
Nirvana_ |
D |
Feb. 24, 2018, 7:14 a.m. |
OK |
GNU C++ |
TESTS |
47 |
732 |
5632000 |
|
2700 |
19130003 |
knightL |
D |
July 14, 2016, 6:27 p.m. |
OK |
GNU C++11 |
TESTS |
47 |
264 |
13721600 |
|
2700 |
19153533 |
knightL |
D |
July 15, 2016, 12:47 p.m. |
OK |
GNU C++11 |
TESTS |
47 |
374 |
21913600 |
|
2700 |
63282015 |
hk-cnyali |
D |
Oct. 24, 2019, 9:01 a.m. |
OK |
GNU C++11 |
TESTS |
47 |
421 |
1331200 |
|
2700 |
63356024 |
wibE |
D |
Oct. 25, 2019, 2:40 a.m. |
OK |
GNU C++11 |
TESTS |
47 |
436 |
1740800 |
|
2700 |
63283980 |
wibE |
D |
Oct. 24, 2019, 9:40 a.m. |
OK |
GNU C++11 |
TESTS |
47 |
436 |
1740800 |
|
2700 |
63277972 |
luogu_bot4 |
D |
Oct. 24, 2019, 7:39 a.m. |
OK |
GNU C++11 |
TESTS |
47 |
529 |
716800 |
|
2700 |
63277990 |
LuoshuiTianyi |
D |
Oct. 24, 2019, 7:40 a.m. |
OK |
GNU C++11 |
TESTS |
47 |
530 |
716800 |
|
2700 |
23364750 |
Ali.Pi |
D |
Dec. 27, 2016, 6:09 p.m. |
OK |
GNU C++11 |
TESTS |
47 |
546 |
3788800 |
|
2700 |
19132164 |
Kipsora |
D |
July 14, 2016, 6:46 p.m. |
OK |
GNU C++11 |
TESTS |
47 |
561 |
1740800 |
|
2700 |
31599340 |
arasmus |
D |
Oct. 22, 2017, 9:41 a.m. |
OK |
GNU C++11 |
TESTS |
47 |
561 |
3788800 |
|
2700 |
38397095 |
TooSlowToWin |
D |
May 18, 2018, 9:57 a.m. |
OK |
GNU C++14 |
TESTS |
47 |
62 |
5017600 |
|
2700 |
23483963 |
OnionPringles |
D |
Jan. 1, 2017, 1:15 p.m. |
OK |
GNU C++14 |
TESTS |
47 |
62 |
6656000 |
|
2700 |
40984076 |
ReaLNero1 |
D |
July 30, 2018, 7:10 p.m. |
OK |
GNU C++14 |
TESTS |
47 |
77 |
4710400 |
|
2700 |
38405104 |
TooSlowToWin |
D |
May 18, 2018, 3:50 p.m. |
OK |
GNU C++14 |
TESTS |
47 |
78 |
4505600 |
|
2700 |
47829438 |
860579 |
D |
Jan. 2, 2019, 5:11 a.m. |
OK |
GNU C++14 |
TESTS |
47 |
311 |
48025600 |
|
2700 |
33469108 |
ThePontiacBandit |
D |
Dec. 21, 2017, 2:50 a.m. |
OK |
GNU C++14 |
TESTS |
47 |
577 |
2662400 |
|
2700 |
46960175 |
4l5n3 |
D |
Dec. 13, 2018, 7:35 a.m. |
OK |
GNU C++14 |
TESTS |
47 |
686 |
2867200 |
|
2700 |
45499383 |
vjudge5 |
D |
Nov. 10, 2018, 6 a.m. |
OK |
GNU C++14 |
TESTS |
47 |
702 |
1433600 |
|
2700 |
63284063 |
xcyxcy |
D |
Oct. 24, 2019, 9:41 a.m. |
OK |
GNU C++14 |
TESTS |
47 |
702 |
5017600 |
|
2700 |
52063235 |
uccoa |
D |
March 31, 2019, 3:16 a.m. |
OK |
GNU C++14 |
TESTS |
47 |
732 |
1228800 |
|
2700 |
48938275 |
YouKn0wWho |
D |
Jan. 25, 2019, 3:16 p.m. |
OK |
GNU C++17 |
TESTS |
47 |
530 |
2048000 |
|
2700 |
49995223 |
.tourist. |
D |
Feb. 16, 2019, 2:38 p.m. |
OK |
GNU C++17 |
TESTS |
47 |
592 |
21401600 |
|
2700 |
63659920 |
hjk1030 |
D |
Oct. 28, 2019, 1:46 p.m. |
OK |
GNU C++17 |
TESTS |
47 |
624 |
716800 |
|
2700 |
60745526 |
elManco |
D |
Sept. 18, 2019, 1:04 a.m. |
OK |
GNU C++17 |
TESTS |
47 |
639 |
2252800 |
|
2700 |
50056923 |
sjc_fan |
D |
Feb. 17, 2019, 10:48 a.m. |
OK |
GNU C++17 |
TESTS |
47 |
655 |
21504000 |
|
2700 |
52565935 |
hyfzbtrs |
D |
April 10, 2019, 12:24 p.m. |
OK |
GNU C++17 |
TESTS |
47 |
732 |
1331200 |
|
2700 |
55499471 |
ArshiaDadras |
D |
June 12, 2019, 2:19 p.m. |
OK |
GNU C++17 |
TESTS |
47 |
733 |
1740800 |
|
2700 |
54165258 |
lqs2015 |
D |
May 15, 2019, 8:25 a.m. |
OK |
GNU C++17 |
TESTS |
47 |
763 |
17305600 |
|
2700 |
51973320 |
Fulisike |
D |
March 29, 2019, 1:22 p.m. |
OK |
GNU C++17 |
TESTS |
47 |
795 |
2048000 |
|
2700 |
58968192 |
Mjgonzales |
D |
Aug. 17, 2019, 6:51 p.m. |
OK |
GNU C++17 |
TESTS |
47 |
826 |
1126400 |
|
2700 |
60681960 |
aminul |
D |
Sept. 16, 2019, 2:12 p.m. |
OK |
Java 8 |
TESTS |
47 |
1419 |
19251200 |
|
2700 |
60682134 |
aminul |
D |
Sept. 16, 2019, 2:15 p.m. |
OK |
Java 8 |
TESTS |
47 |
1450 |
19251200 |
|
2700 |
19166861 |
hama-du |
D |
July 16, 2016, 6:07 a.m. |
OK |
Java 8 |
TESTS |
47 |
1996 |
0 |
|
2700 |
37878785 |
Aemon |
D |
May 4, 2018, 9:10 a.m. |
OK |
Java 8 |
TESTS |
47 |
2121 |
21196800 |
|
2700 |
19149536 |
uwi |
D |
July 15, 2016, 9:42 a.m. |
OK |
Java 8 |
TESTS |
47 |
2355 |
0 |
|
2700 |
26982883 |
alexrcoleman |
D |
May 9, 2017, 7:05 p.m. |
OK |
Java 8 |
TESTS |
47 |
3837 |
0 |
|
2700 |
19161800 |
IgorKoval |
D |
July 15, 2016, 8:58 p.m. |
OK |
Java 8 |
TESTS |
47 |
3900 |
17408000 |
|
2700 |
59827904 |
ankurdua15 |
D |
Aug. 31, 2019, 8:32 p.m. |
OK |
Java 8 |
TESTS |
47 |
3946 |
0 |
|
2700 |
23628949 |
rishus23 |
D |
Jan. 7, 2017, 4:10 p.m. |
OK |
Java 8 |
TESTS |
47 |
4102 |
21299200 |
|
2700 |
19455504 |
AlexFetisov |
D |
July 28, 2016, 6:28 a.m. |
OK |
Java 8 |
TESTS |
47 |
4196 |
0 |
|
2700 |
19172522 |
azukun |
D |
July 16, 2016, 11:44 a.m. |
OK |
MS C# |
TESTS |
47 |
2340 |
9318400 |
|
2700 |
19171662 |
azukun |
D |
July 16, 2016, 10:47 a.m. |
OK |
MS C# |
TESTS |
47 |
2979 |
10137600 |
|
2700 |
19171624 |
azukun |
D |
July 16, 2016, 10:45 a.m. |
OK |
MS C# |
TESTS |
47 |
3790 |
10240000 |
|
2700 |
19160784 |
azukun |
D |
July 15, 2016, 7:32 p.m. |
OK |
MS C# |
TESTS |
47 |
4711 |
6348800 |
|
2700 |
19149246 |
DEGwer |
D |
July 15, 2016, 9:24 a.m. |
OK |
MS C++ |
TESTS |
47 |
857 |
17715200 |
|
2700 |
64155236 |
vjudge2 |
D |
Nov. 3, 2019, 12:37 p.m. |
OK |
MS C++ |
TESTS |
47 |
1060 |
4096000 |
|
2700 |
19119135 |
LLI_E_P_JI_O_K |
D |
July 14, 2016, 5:06 p.m. |
OK |
MS C++ |
TESTS |
47 |
1591 |
14028800 |
|
2700 |
19219074 |
Taube |
D |
July 18, 2016, 7:45 p.m. |
OK |
MS C++ |
TESTS |
47 |
1700 |
16281600 |
|
2700 |
19133199 |
Oleg_Smirnov |
D |
July 14, 2016, 7:24 p.m. |
OK |
MS C++ |
TESTS |
47 |
1793 |
74649600 |
|
2700 |
19132213 |
Michael |
D |
July 14, 2016, 6:46 p.m. |
OK |
MS C++ |
TESTS |
47 |
1981 |
1126400 |
|
2700 |
24184261 |
sdya |
D |
Jan. 27, 2017, 9:41 a.m. |
OK |
MS C++ |
TESTS |
47 |
2152 |
19865600 |
|
2700 |
remove filters
Back to search problems