Codeforces Round 725 (Div. 3)

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
1538 Codeforces Round 725 (Div. 3) FINISHED False 8100 113844263 June 10, 2021, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 2950 ) E Funny Substrings PROGRAMMING brute force data structures hashing implementation strings

B'Polycarp came up with a new programming language. There are only two types of statements in it: All variable names and strings only consist of lowercase letters of the English alphabet and do not exceed 5 characters. The result of the program is the number of occurrences of string haha in the string that was written to the variable in the last statement. Polycarp was very tired while inventing that language. He asks you to implement it. Your task is -- for given program statements calculate the number of occurrences of string haha in the last assigned variable. The first line contains an integer t ( 1 <= t <= 10^3 ). Then t test cases follow. The first line of each test case contains a single integer n ( 1 <= n <= 50 ) -- the number of statements in the program. All variable names and strings are guaranteed to consist only of lowercase letters of the English alphabet and do not exceed 5 characters. This is followed by n lines describing the statements in the format described above. It is guaranteed that the program is correct. For each set of input data, output the number of occurrences of the haha substring in the string that was written to the variable in the last statement. In the first test case the resulting value of d is hhahahaha. '...

Tutorials

Codeforces Round #725 (Div. 3) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
119085741 hritik31 E June 10, 2021, 5:59 p.m. OK GNU C++11 TESTS 8 78 0
119102461 pranshukas E June 10, 2021, 11:04 p.m. OK GNU C++11 TESTS 8 93 0
119108883 tiooo111 E June 11, 2021, 2:51 a.m. OK GNU C++11 TESTS 8 108 0
119105813 Aelhurn E June 11, 2021, 1:33 a.m. OK GNU C++11 TESTS 8 108 0
119118736 GurD E June 11, 2021, 5:30 a.m. OK GNU C++11 TESTS 8 109 0
119112574 PotremZ E June 11, 2021, 4 a.m. OK GNU C++11 TESTS 8 109 0
119111154 black_white_tony E June 11, 2021, 3:34 a.m. OK GNU C++11 TESTS 8 109 0
119095361 GurD E June 10, 2021, 7:52 p.m. OK GNU C++11 TESTS 8 109 0
119093034 trivedi E June 10, 2021, 7:18 p.m. OK GNU C++11 TESTS 8 109 0
119094933 nkhamm E June 10, 2021, 7:46 p.m. OK GNU C++11 TESTS 8 139 0
119108928 Potassium E June 11, 2021, 2:53 a.m. OK GNU C++14 TESTS 8 46 102400
119088720 AwakeAnay E June 10, 2021, 6:27 p.m. OK GNU C++14 TESTS 8 46 204800
119088078 racsosabe E June 10, 2021, 6:20 p.m. OK GNU C++14 TESTS 8 61 102400
119098343 rupre E June 10, 2021, 8:49 p.m. OK GNU C++14 TESTS 8 62 102400
119095638 rr7 E June 10, 2021, 7:57 p.m. OK GNU C++14 TESTS 8 62 102400
119094523 Suniti_Jain E June 10, 2021, 7:39 p.m. OK GNU C++14 TESTS 8 62 102400
119092022 Soumya_Patra E June 10, 2021, 7:04 p.m. OK GNU C++14 TESTS 8 62 102400
119118509 shahil198 E June 11, 2021, 5:27 a.m. OK GNU C++14 TESTS 8 62 204800
119098339 Tech_shot E June 10, 2021, 8:49 p.m. OK GNU C++14 TESTS 8 62 204800
119094230 aniket008 E June 10, 2021, 7:35 p.m. OK GNU C++14 TESTS 8 62 204800
119121283 Ye_Che E June 11, 2021, 6:01 a.m. OK GNU C++17 TESTS 8 46 102400
119116955 rahulgoel E June 11, 2021, 5:06 a.m. OK GNU C++17 TESTS 8 46 102400
119116468 ronbil E June 11, 2021, 4:59 a.m. OK GNU C++17 TESTS 8 46 102400
119116394 iShibly E June 11, 2021, 4:58 a.m. OK GNU C++17 TESTS 8 46 102400
119115711 SongGG E June 11, 2021, 4:49 a.m. OK GNU C++17 TESTS 8 46 102400
119110921 vdua447 E June 11, 2021, 3:30 a.m. OK GNU C++17 TESTS 8 46 102400
119109142 Shrek_44 E June 11, 2021, 2:57 a.m. OK GNU C++17 TESTS 8 46 102400
119108298 Fau818 E June 11, 2021, 2:39 a.m. OK GNU C++17 TESTS 8 46 102400
119103343 lolzzz E June 10, 2021, 11:48 p.m. OK GNU C++17 TESTS 8 46 102400
119102267 AlperenT E June 10, 2021, 10:54 p.m. OK GNU C++17 TESTS 8 46 102400

remove filters

Back to search problems