Hello 2023

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
1779 Hello 2023 FINISHED False 9000 103649123 Jan. 3, 2023, 2:35 p.m.

Problems

Solved
Index
Name
Type
Tags
Community Tag
Rating
( 386 ) G The Game of the Century PROGRAMMING constructive algorithms graphs shortest paths

The time has finally come, MKnez and Baltic are to host The Game of the Century . For that purpose, they built a village to lodge its participants. The village has the shape of an equilateral triangle delimited by three roads of length (n). It is cut into (n^2) smaller equilateral triangles, of side length (1), by (3n-3) additional roads which run parallel to the sides. See the figure for (n=3). Each of the (3n) roads is made of multiple (possibly (1)) road segments of length (1) which connect adjacent intersections. The direction has already been chosen for each of the (3n) roads (so, for each road, the same direction is assigned to all its road segments). Traffic can only go in the specified directions (i. e. the roads are monodirectional). You are tasked with making adjustments to the traffic plan so that from each intersection it is possible to reach every other intersection. Specifically, you can invert the traffic direction of any number of road segments of length (1). What is the minimal number of road segments for which you need to invert the traffic direction? Each test contains multiple test cases. The first line contains the number of test cases (t) ((1 \leq t \leq 10\,000)). The description of the test cases follows. The first line of each test case contains a positive integer (n) ((1\leq n\leq 10^5)) — the size of the triangular village's sides. Three lines follow, each containing a binary string of length (n) which describes the traffic directions of the roads. The (i)-th of the following three lines contains a binary string (s_i) of length (n) representing the direction of each road parallel to the road segment denoted by (i) in the picture above. In particular, the (j)-th character of (s_i) is " 1 " if the (j)-th shortest road (parallel to the road segment denoted by (i) in the picture) has the same direction of the road segment denoted by (i) in

Tutorials

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
187857302 rainboy G Jan. 3, 2023, 10:58 p.m. OK GNU C11 TESTS 136 62 409600
187859517 Lynkcat G Jan. 4, 2023, 12:19 a.m. OK GNU C++14 TESTS 136 31 512000
187847271 yasugongshang G Jan. 3, 2023, 7:25 p.m. OK GNU C++14 TESTS 136 31 3072000
187870197 haseennurayin G Jan. 4, 2023, 4:14 a.m. OK GNU C++14 TESTS 136 46 512000
187864452 Ecrade_ G Jan. 4, 2023, 2:25 a.m. OK GNU C++14 TESTS 136 374 80588800
187863295 huangzirui G Jan. 4, 2023, 2:01 a.m. OK GNU C++14 TESTS 136 467 45670400
187828223 TadijaSebez G Jan. 3, 2023, 4:54 p.m. OK GNU C++17 TESTS 136 31 307200
187862106 tokusakurai G Jan. 4, 2023, 1:35 a.m. OK GNU C++17 TESTS 136 31 1126400
187828826 gisp_zjz G Jan. 3, 2023, 4:55 p.m. OK GNU C++17 TESTS 136 31 2969600
187868868 chengcheng5677 G Jan. 4, 2023, 3:51 a.m. OK GNU C++17 TESTS 136 31 16998400
187831671 peti1234 G Jan. 3, 2023, 5:02 p.m. OK GNU C++17 TESTS 136 46 512000
187859383 SakurakoujiRuna G Jan. 4, 2023, 12:15 a.m. OK GNU C++17 TESTS 136 46 2867200
187832340 IOMO G Jan. 3, 2023, 5:03 p.m. OK GNU C++17 TESTS 136 93 1433600
187862020 emptyhope G Jan. 4, 2023, 1:33 a.m. OK GNU C++17 TESTS 136 202 35328000
187845697 MAOoo_Love_Molly G Jan. 3, 2023, 7:06 p.m. OK GNU C++17 (64) TESTS 136 15 409600
187857171 natofp G Jan. 3, 2023, 10:53 p.m. OK GNU C++17 (64) TESTS 136 15 716800
187862219 orzdevinwang G Jan. 4, 2023, 1:37 a.m. OK GNU C++17 (64) TESTS 136 15 67072000
187839297 Geothermal G Jan. 3, 2023, 6:13 p.m. OK GNU C++17 (64) TESTS 136 31 614400
187844092 353cerega G Jan. 3, 2023, 6:49 p.m. OK GNU C++17 (64) TESTS 136 31 614400
187839142 N_z__ G Jan. 3, 2023, 6:12 p.m. OK GNU C++17 (64) TESTS 136 31 614400
187870146 rniya G Jan. 4, 2023, 4:13 a.m. OK GNU C++17 (64) TESTS 136 31 1638400
187872474 Cxny G Jan. 4, 2023, 4:51 a.m. OK GNU C++17 (64) TESTS 136 436 77004800
187868186 dXqwq G Jan. 4, 2023, 3:39 a.m. OK GNU C++17 (64) TESTS 136 607 63692800
187828445 Alex_Wei G Jan. 3, 2023, 4:55 p.m. OK GNU C++17 (64) TESTS 136 1123 37683200
187839507 dreamoon_love_AA G Jan. 3, 2023, 6:14 p.m. OK GNU C++20 (64) TESTS 136 15 614400
187836835 BurnedChicken G Jan. 3, 2023, 6:03 p.m. OK GNU C++20 (64) TESTS 136 15 614400
187833495 fastmath G Jan. 3, 2023, 5:04 p.m. OK GNU C++20 (64) TESTS 136 15 614400
187839230 hehehhehe G Jan. 3, 2023, 6:13 p.m. OK GNU C++20 (64) TESTS 136 15 614400
187850356 Mangooste G Jan. 3, 2023, 8:09 p.m. OK GNU C++20 (64) TESTS 136 15 614400
187839808 dreamoon_love_AA G Jan. 3, 2023, 6:16 p.m. OK GNU C++20 (64) TESTS 136 15 614400
187839715 dreamoon_love_AA G Jan. 3, 2023, 6:15 p.m. OK GNU C++20 (64) TESTS 136 15 614400
187859578 oldyan G Jan. 4, 2023, 12:21 a.m. OK GNU C++20 (64) TESTS 136 15 819200
187851950 rqi G Jan. 3, 2023, 8:37 p.m. OK GNU C++20 (64) TESTS 136 15 921600
187830988 budalnik G Jan. 3, 2023, 5 p.m. OK GNU C++20 (64) TESTS 136 31 409600
187829822 Tlatoani G Jan. 3, 2023, 4:58 p.m. OK Kotlin 1.7 TESTS 136 561 36352000

remove filters

Back to search problems