Helvetic Coding Contest 2019 online mirror (teams allowed, unrated)

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
1184 Helvetic Coding Contest 2019 online mirror (teams allowed, unrated) FINISHED False 16200 174956087 July 7, 2019, 7:05 a.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 140 ) A3 Heidi Learns Hashing (Hard) PROGRAMMING fft math number theory 3100

B'Now Heidi is ready to crack Madame Kovarian 's hashing function. Madame Kovarian has a very strict set of rules for name changes. Two names can be interchanged only if using the following hashing function on them results in a collision. However, the hashing function is parametrized, so one can always find a set of parameters that causes such a collision. Heidi decided to exploit this to her advantage. Given two strings w_1 , w_2 of equal length n consisting of lowercase English letters and an integer m . Consider the standard polynomial hashing function: H_p(w) := <= ft( sum_{i=0}^{|w|-1} w_i r^i right) mbox{mod}(p) where p is some prime, and r is some number such that 2 <= q r <= q p-2 . The goal is to find r and a prime p ( m <= q p <= q 10^9 ) such that H_p(w_1) = H_p(w_2) . Strings w_1 and w_2 are sampled independently at random from all strings of length n over lowercase English letters. The first line contains two integers n and m ( 10 <= n <= 10^5 , 2 <= m <= 10^5 ). The second and the third line, respectively, contain the words w_1 , w_2 that were sampled independently at random from all strings of length n over lowercase English letters. Output integers p, r . p should be a prime in the range [m, 10^9] and r should be an integer satisfying r in [2,p-2] . At least one solution is guaranteed to exist. In case multiple solutions exist, print any of them. In the first example, note that even though p=3 and r=2 also causes a colision of hashes, it is not a correct solution, since m is 5 and thus we want p geq 5 . In the second example, we are aware of the extra 'g ' at the end. We just didn 't realize that "River Song" and "Melody Pond" have different lengths... '...

Tutorials

helvetic-coding-contest-2019-editorial.pdf

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
56662868 cuizhuyefei MarkF zx2003 A3 July 7, 2019, 10:25 a.m. OK GNU C++11 TESTS 51 234 26828800 3100
57865419 lopare A3 July 27, 2019, 8:39 p.m. OK GNU C++11 TESTS 51 1232 45260800 3100
56793269 Amphetamine A3 July 10, 2019, 11:29 a.m. OK GNU C++11 TESTS 51 1232 45260800 3100
56807358 leeshin A3 July 10, 2019, 2:27 p.m. OK GNU C++11 TESTS 51 1325 45260800 3100
56846114 YangDavid A3 July 11, 2019, 1:42 p.m. OK GNU C++11 TESTS 51 1357 12083200 3100
58173635 DZBczrs A3 Aug. 2, 2019, 12:17 p.m. OK GNU C++11 TESTS 51 1419 45260800 3100
56747685 WZYYN A3 July 9, 2019, 10:33 a.m. OK GNU C++11 TESTS 51 1668 89292800 3100
56777971 jebouin A3 July 10, 2019, 4:08 a.m. OK GNU C++11 TESTS 51 2340 2969600 3100
56668185 131131yhx A3 July 7, 2019, 11:53 a.m. OK GNU C++11 TESTS 51 2527 211660800 3100
56657031 FizzyDavid 300iq TLE A3 July 7, 2019, 8:52 a.m. OK GNU C++11 TESTS 51 2854 71680000 3100
56815580 I_love_chickpea A3 July 10, 2019, 6:54 p.m. OK GNU C++14 TESTS 51 156 2252800 3100
56667075 Zhaoph_ zbww paul120090105 A3 July 7, 2019, 11:29 a.m. OK GNU C++14 TESTS 51 390 236646400 3100
58373488 wakaka A3 Aug. 6, 2019, 7:28 a.m. OK GNU C++14 TESTS 51 982 35430400 3100
56680478 krijgertje A3 July 7, 2019, 6:04 p.m. OK GNU C++14 TESTS 51 1201 2252800 3100
58374448 wakaka A3 Aug. 6, 2019, 7:48 a.m. OK GNU C++14 TESTS 51 1216 35430400 3100
58373553 wakaka A3 Aug. 6, 2019, 7:29 a.m. OK GNU C++14 TESTS 51 1310 35532800 3100
58373415 wakaka A3 Aug. 6, 2019, 7:27 a.m. OK GNU C++14 TESTS 51 1326 34713600 3100
56680362 krijgertje A3 July 7, 2019, 6 p.m. OK GNU C++14 TESTS 51 1996 1228800 3100
56689297 zsyzsy A3 July 8, 2019, 2:29 a.m. OK GNU C++14 TESTS 51 2074 169779200 3100
56661248 hos.lyric maroonrk A3 July 7, 2019, 9:57 a.m. OK GNU C++14 TESTS 51 2760 10035200 3100
57099827 ivan100sic A3 July 15, 2019, 1:24 p.m. OK GNU C++17 TESTS 51 218 11776000 3100
56689071 halley_comet A3 July 8, 2019, 2:18 a.m. OK GNU C++17 TESTS 51 373 236646400 3100
56677176 Benq A3 July 7, 2019, 4:05 p.m. OK GNU C++17 TESTS 51 811 7577600 3100
60432526 RNS_JKS RNS_KSB A3 Sept. 12, 2019, 9:49 a.m. OK GNU C++17 TESTS 51 811 9011200 3100
60430060 RNS_JKS RNS_KSB A3 Sept. 12, 2019, 9:07 a.m. OK GNU C++17 TESTS 51 811 9420800 3100
56683657 Gregory A3 July 7, 2019, 8:18 p.m. OK GNU C++17 TESTS 51 1559 2969600 3100
56678380 Gregory A3 July 7, 2019, 4:46 p.m. OK GNU C++17 TESTS 51 1590 2867200 3100
56858752 yhchang3 A3 July 11, 2019, 8:14 p.m. OK GNU C++17 TESTS 51 1747 4505600 3100
56698847 jiangly A3 July 8, 2019, 8:15 a.m. OK GNU C++17 TESTS 51 2604 8499200 3100
56674492 kefaa2 A3 July 7, 2019, 2:47 p.m. OK GNU C++17 TESTS 51 2823 43929600 3100

remove filters

Back to search problems