Технокубок 2021 - Финал

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
1482 Технокубок 2021 - Финал FINISHED False 10800 120944363 March 21, 2021, 10:20 a.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 491 ) H Exam PROGRAMMING trees

B"This year a Chunin Selection Exam is held again in Konoha, and taking part in it are n ninjas named s_1 , s_2 , ..., s_n . All names are distinct. One of the exam stages consists of fights between the participants. This year the rules determining the ninjas for each fight are the following: ninjas i and j fight against each other if the following conditions are held: A string a is a substring of a string b if a can be obtained from b by deletion of several (possibly, zero or all) characters from the beginning and several (possibly, zero or all) characters from the end. Your task is to find out how many fights are going to take place this year. The first line consists of the only integer n ( 1 <= q n <= q 10^{6} ) standing for the number of examinees. The following n lines contain their names. No two names coincide, all names are non-empty and consist of lowercase English letters. The total length of all names doesn't exceed 10^6 . Print the only integer standing for the number of fights. In the first example hidan fights against dan, and hanabi fights against nabi, who also fights bi. Ninjas named hanabi and bi don't fight each other since there is the ninja called nabi who breaks the third condition for them. In the second example the fights are held between abacaba and acaba, abacaba and abaca, acaba and aca, abaca and aca. "...

Tutorials

Technocup 2021: Final Round and Codeforces Round #709 — tutorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
110699595 Pechalka H March 22, 2021, 5:13 a.m. OK GNU C++17 (64) TESTS 77 873 204595200

remove filters

Back to search problems