Helvetic Coding Contest 2024 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
1970 Helvetic Coding Contest 2024 online mirror (teams allowed, unrated) FINISHED False 16200 22373663 May 4, 2024, 7:05 a.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 634 ) G2 Min-Fund Prison (Medium) PROGRAMMING brute force dfs and similar dp graphs trees 2200

B"In the medium version, 2 <= q sum n <= q 300 and 1 <= q sum m <= q 300 After a worker's strike organized by the Dementors asking for equal rights, the prison of Azkaban has suffered some damage. After settling the spirits, the Ministry of Magic is looking to renovate the prison to ensure that the Dementors are kept in check. The prison consists of n prison cells and m bi-directional corridors. The i^{th} corridor is from cells u_i to v_i . A subset of these cells S is called a complex if any cell in S is reachable from any other cell in S . Formally, a subset of cells S is a complex if x and y are reachable from each other for all x, y in S , using only cells from S on the way. The funding required for a complex S consisting of k cells is defined as k^2 . As part of your Intro to Magical Interior Design course at Hogwarts, you have been tasked with designing the prison. The Ministry of Magic has asked that you divide the prison into 2 complexes with textbf{exactly one corridor} connecting them, so that the Dementors can't organize union meetings. For this purpose, you are allowed to build bi-directional corridors. The funding required to build a corridor between any 2 cells is c . Due to budget cuts and the ongoing fight against the Death Eaters, you must find the textbf{minimum total funding} required to divide the prison as per the Ministry's requirements or -1 if no division is possible. Note: The total funding is the sum of the funding required for the 2 complexes and the corridors built. If after the division, the two complexes have x and y cells respectively and you have built a total of a corridors, the total funding will be x^2 + y^2 + c x a . Note that x+y=n . The first line contains one integer t ( 1 <= q t <= q 300 ) -- the number of test cases. Then "...

Tutorials

Helvetic Coding Contest 2024 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
261053401 lesunhan2022 G2 May 15, 2024, 12:32 p.m. OK C++14 (GCC 6-32) TESTS 11 61 6860800 2200
263405793 antc2 G2 May 31, 2024, 3:52 a.m. OK C++17 (GCC 7-32) TESTS 11 46 0 2200
263160114 Kirill22 G2 May 29, 2024, 3:05 p.m. OK C++17 (GCC 7-32) TESTS 11 46 0 2200
262791739 scrg G2 May 26, 2024, 6:41 p.m. OK C++17 (GCC 7-32) TESTS 11 46 0 2200
262391119 D-FENS G2 May 24, 2024, 1:20 p.m. OK C++17 (GCC 7-32) TESTS 11 46 0 2200
262195325 suvansh505 G2 May 22, 2024, 9:04 p.m. OK C++17 (GCC 7-32) TESTS 11 46 0 2200
262065355 Ste G2 May 21, 2024, 10:08 p.m. OK C++17 (GCC 7-32) TESTS 11 46 0 2200
261716661 zjyzjyzjyzjyzjy G2 May 20, 2024, 3:12 a.m. OK C++17 (GCC 7-32) TESTS 11 46 0 2200
261715254 prakhar2704 G2 May 20, 2024, 2:42 a.m. OK C++17 (GCC 7-32) TESTS 11 46 0 2200
261583577 Hadi_Alhamed G2 May 18, 2024, 10:22 p.m. OK C++17 (GCC 7-32) TESTS 11 46 0 2200
261008054 for_to G2 May 15, 2024, 5:55 a.m. OK C++17 (GCC 7-32) TESTS 11 46 0 2200
263159671 grate G2 May 29, 2024, 3 p.m. OK C++20 (GCC 13-64) TESTS 11 46 0 2200
262992558 Engineer G2 May 28, 2024, 10:06 a.m. OK C++20 (GCC 13-64) TESTS 11 46 0 2200
262955373 DGME G2 May 28, 2024, 4:28 a.m. OK C++20 (GCC 13-64) TESTS 11 46 0 2200
262706728 Lyamzin_alexandr G2 May 26, 2024, 12:58 p.m. OK C++20 (GCC 13-64) TESTS 11 46 0 2200
262625915 KINGZIE G2 May 25, 2024, 9:08 p.m. OK C++20 (GCC 13-64) TESTS 11 46 0 2200
262158216 pallavgoyal136 G2 May 22, 2024, 2:39 p.m. OK C++20 (GCC 13-64) TESTS 11 46 0 2200
262148142 Codurr G2 May 22, 2024, 12:52 p.m. OK C++20 (GCC 13-64) TESTS 11 46 0 2200
261727964 tapish32 G2 May 20, 2024, 6:04 a.m. OK C++20 (GCC 13-64) TESTS 11 46 0 2200
261482224 vashistha001 G2 May 18, 2024, 7:40 a.m. OK C++20 (GCC 13-64) TESTS 11 46 0 2200
261228673 jtrh G2 May 16, 2024, 4:44 p.m. OK C++20 (GCC 13-64) TESTS 11 46 0 2200
259515915 dzhi G2 May 4, 2024, 1:45 p.m. OK Java 21 TESTS 9 234 0 2200
259495221 arvindf232 G2 May 4, 2024, 10:47 a.m. OK Kotlin 1.9 TESTS 9 187 1536000 2200
260771961 Little_Sheep_Yawn G2 May 13, 2024, 9:29 a.m. OK PyPy 3-64 TESTS 11 124 5529600 2200
260255574 aha66 G2 May 10, 2024, 1:21 p.m. OK PyPy 3-64 TESTS 11 452 10137600 2200
262360375 2210080018 G2 May 24, 2024, 9:12 a.m. OK Python 3 TESTS 11 999 0 2200
260063293 BetterThanNobita G2 May 9, 2024, 2:52 a.m. OK Rust 2021 TESTS 10 46 0 2200

remove filters

Back to search problems