COMPFEST 14 - Preliminary Online Mirror (Unrated, ICPC Rules, Teams Preferred)

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
1725 COMPFEST 14 - Preliminary Online Mirror (Unrated, ICPC Rules, Teams Preferred) FINISHED False 18000 74967863 Sept. 4, 2022, 1:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 2694 ) H Hot Black Hot White PROGRAMMING constructive algorithms math

B"One day, you are accepted as being Dr. Chanek's assistant. The first task given by Dr. Chanek to you is to take care and store his magical stones. Dr. Chanek has N magical stones with N being an even number. Those magical stones are numbered from 1 to N . Magical stone i has a strength of A_i . A magical stone can be painted with two colours, namely the colour black or the colour white. You are tasked to paint the magical stones with the colour black or white and store the magical stones into a magic box with a magic coefficient Z ( 0 <= q Z <= q 2 ). The painting of the magical stones must be done in a way such that there are frac{N}{2} black magical stones and frac{N}{2} white magical stones. Define text{concat}(x, y) for two integers x and y as the result of concatenating the digits of x to the left of y in their decimal representation without changing the order. As an example, text{concat}(10, 24) will result in 1024 . For a magic box with a magic coefficient Z , magical stone i will react with magical stone j if the colours of both stones are different and text{concat}(A_i, A_j) x text{concat}(A_j, A_i) + A_i x A_j equiv Z mod 3 . A magical stone that is reacting will be very hot and dangerous. Because of that, you must colour the magical stones and determine the magic coefficient Z of the magic box in a way such that there is no magical stone that reacts, or report if it is impossible. The first line contains a single even integer N ( 2 <= N <= 10^5 ) -- the number of magical stones Dr. Chanek has. The second line contains N integer A_1, A_2, ldots, A_N ( 1 <= q A_i <= q 10^9 ) -- the strengths of all magical stones. If it is not possible to satisfy the condition of the problem, output -1 . Otherwise, output two lines. The first line contains an integer Z denoting the "...

Tutorials

Tutorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
170861374 IcMtr _Rekoirive bcr_233 H Sept. 4, 2022, 3:02 p.m. OK GNU C++14 TESTS 26 46 204800
170875703 Linx. H Sept. 4, 2022, 5:02 p.m. OK GNU C++14 TESTS 26 46 409600
170859821 Ace_02 H Sept. 4, 2022, 2:51 p.m. OK GNU C++14 TESTS 26 46 409600
170880327 HuyT1234 thanhnhanqn77 Lamle H Sept. 4, 2022, 5:53 p.m. OK GNU C++14 TESTS 26 46 819200
170872348 Lyrically Abel51 a_grain H Sept. 4, 2022, 4:31 p.m. OK GNU C++14 TESTS 26 46 819200
170867066 _Veritas 285087101 FNOIwyhao H Sept. 4, 2022, 3:47 p.m. OK GNU C++14 TESTS 26 46 819200
170866416 acacaction TEoS H Sept. 4, 2022, 3:42 p.m. OK GNU C++14 TESTS 26 46 819200
170876014 shravanroy H Sept. 4, 2022, 5:05 p.m. OK GNU C++14 TESTS 26 46 921600
170867124 1potato2potato rzirvi13 omeganot H Sept. 4, 2022, 3:47 p.m. OK GNU C++14 TESTS 26 46 921600
170867018 turbozone88 modulo_by_zero Cr45hor H Sept. 4, 2022, 3:46 p.m. OK GNU C++14 TESTS 26 46 921600
170859435 Bobocan H Sept. 4, 2022, 2:49 p.m. OK GNU C++17 TESTS 26 30 921600
170876558 luat2003 H Sept. 4, 2022, 5:11 p.m. OK GNU C++17 TESTS 26 31 1945600
170872487 Majedh Anas_Da H Sept. 4, 2022, 4:32 p.m. OK GNU C++17 TESTS 26 31 4300800
170868955 omnitronX Jmyszka2007 GadgedGuy H Sept. 4, 2022, 4:02 p.m. OK GNU C++17 TESTS 26 46 307200
170905491 naivewang H Sept. 5, 2022, 2:47 a.m. OK GNU C++17 TESTS 26 46 409600
170878006 yaroslav06 Constantine0802 H Sept. 4, 2022, 5:26 p.m. OK GNU C++17 TESTS 26 46 409600
170876854 su_lb H Sept. 4, 2022, 5:14 p.m. OK GNU C++17 TESTS 26 46 409600
170872888 haythem55 cassa __DAREDEVIL__ H Sept. 4, 2022, 4:36 p.m. OK GNU C++17 TESTS 26 46 409600
170869459 Igor_Parfenov H Sept. 4, 2022, 4:07 p.m. OK GNU C++17 TESTS 26 46 409600
170867031 anhkha2003 apgpsoop minhnguyenxuan60 H Sept. 4, 2022, 3:47 p.m. OK GNU C++17 TESTS 26 46 409600
170868601 KKT_89 H Sept. 4, 2022, 3:59 p.m. OK GNU C++17 (64) TESTS 26 31 409600
170867876 bashkort H Sept. 4, 2022, 3:53 p.m. OK GNU C++17 (64) TESTS 26 31 409600
170860661 mbdbr H Sept. 4, 2022, 2:57 p.m. OK GNU C++17 (64) TESTS 26 31 409600
170880348 lucao JPOS thiago_bastos H Sept. 4, 2022, 5:53 p.m. OK GNU C++17 (64) TESTS 26 31 512000
170882390 MrDrogon os-moussao H Sept. 4, 2022, 6:16 p.m. OK GNU C++17 (64) TESTS 26 31 921600
170874328 SandAuddy755 ghoshsanchita656 das_sayantan H Sept. 4, 2022, 4:49 p.m. OK GNU C++17 (64) TESTS 26 31 1024000
170859005 kotatsugame H Sept. 4, 2022, 2:47 p.m. OK GNU C++17 (64) TESTS 26 31 1126400
170865974 crescent_yhw TsukasaYuzaki H Sept. 4, 2022, 3:37 p.m. OK GNU C++17 (64) TESTS 26 31 1228800
170856429 PCTprobability Puranya_ nok0 H Sept. 4, 2022, 2:30 p.m. OK GNU C++17 (64) TESTS 26 31 1433600
170859199 cuiaoxiang H Sept. 4, 2022, 2:48 p.m. OK GNU C++17 (64) TESTS 26 31 2252800
170857313 LowLightK N_z__ sr12 H Sept. 4, 2022, 2:36 p.m. OK GNU C++20 (64) TESTS 26 15 921600
170909868 YoungChigga H Sept. 5, 2022, 4:38 a.m. OK GNU C++20 (64) TESTS 26 15 1126400
170864249 MaGnsi0 maghrabyJr_ MuhammadHassan H Sept. 4, 2022, 3:24 p.m. OK GNU C++20 (64) TESTS 26 30 1536000
170862829 ewirlan H Sept. 4, 2022, 3:13 p.m. OK GNU C++20 (64) TESTS 26 31 0
170868229 wnmrmr nathan_luiz H Sept. 4, 2022, 3:56 p.m. OK GNU C++20 (64) TESTS 26 31 204800
170905993 upobir irri SA01 H Sept. 5, 2022, 3:02 a.m. OK GNU C++20 (64) TESTS 26 31 409600
170875750 adnan_toky H Sept. 4, 2022, 5:02 p.m. OK GNU C++20 (64) TESTS 26 31 409600
170874324 esomer H Sept. 4, 2022, 4:49 p.m. OK GNU C++20 (64) TESTS 26 31 409600
170871223 tuandq14 Mika_Catgirl SmuggingSpon H Sept. 4, 2022, 4:21 p.m. OK GNU C++20 (64) TESTS 26 31 409600
170869340 The_Joker2000 H Sept. 4, 2022, 4:06 p.m. OK GNU C++20 (64) TESTS 26 31 409600
170866835 ekwek H Sept. 4, 2022, 3:45 p.m. OK Java 11 TESTS 26 171 0
170868041 saragarz alii.pz H Sept. 4, 2022, 3:54 p.m. OK Java 11 TESTS 26 702 7168000
170857408 kaiboy rainboy Dukkha H Sept. 4, 2022, 2:37 p.m. OK Java 17 TESTS 26 421 409600
170893500 ganesh_6 H Sept. 4, 2022, 9 p.m. OK Java 8 TESTS 26 186 6041600
170851011 arvindf232 happypotato1207 nicholask H Sept. 4, 2022, 2:02 p.m. OK Kotlin 1.6 TESTS 26 265 0
170881862 hamed053 H Sept. 4, 2022, 6:10 p.m. OK MS C++ 2017 TESTS 26 46 819200
170876349 Wendy0317 H Sept. 4, 2022, 5:08 p.m. OK PyPy 3-64 TESTS 26 108 16281600
170860699 Ivan_len clam socho H Sept. 4, 2022, 2:57 p.m. OK PyPy 3-64 TESTS 26 109 17817600
170866233 antikostya Brostin Yosiky H Sept. 4, 2022, 3:40 p.m. OK PyPy 3-64 TESTS 26 124 16588800
170863430 huangxw H Sept. 4, 2022, 3:18 p.m. OK PyPy 3-64 TESTS 26 140 19353600
170860099 manish.17 H Sept. 4, 2022, 2:53 p.m. OK PyPy 3-64 TESTS 26 171 18432000
170875751 mQfZ ASawe2.6Main H Sept. 4, 2022, 5:02 p.m. OK PyPy 3-64 TESTS 26 779 14028800
170857821 Jimanbanashi H Sept. 4, 2022, 2:39 p.m. OK Python 2 TESTS 26 156 9728000
170881934 AroraRiya ParasBedi298 H Sept. 4, 2022, 6:11 p.m. OK Python 3 TESTS 26 124 8396800
170888336 carlfre H Sept. 4, 2022, 7:31 p.m. OK Python 3 TESTS 26 140 7065600

remove filters

Back to search problems