SWERC 2022-2023 - 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
1776 SWERC 2022-2023 - Online Mirror (Unrated, ICPC Rules, Teams Preferred) FINISHED False 18000 99600923 Feb. 19, 2023, 11:05 a.m.

Problems

Solved
Index
Name
Type
Tags
Community Tag
Rating
( 4151 ) F Train Splitting PROGRAMMING constructive algorithms graphs greedy

There are (n) big cities in Italy, and there are (m) train routes between pairs of cities. Each route connects two different cities bidirectionally. Moreover, using the trains one can reach every city starting from any other city. Right now, all the routes are operated by the government-owned Italian Carriage Passenger Company, but the government wants to privatize the routes. The government does not want to give too much power to a single company, but it also does not want to make people buy a lot of different subscriptions. Also, it would like to give a fair chance to all companies. In order to formalize all these wishes, the following model was proposed. There will be (k \ge 2) private companies indexed by (1, \, 2, \, \dots, \, k). Each train route will be operated by exactly one of the (k) companies. Then: For any company, there should exist two cities such that it is impossible to reach one from the other using only routes operated by that company. On the other hand, for any two companies, it should be possible to reach every city from any other city using only routes operated by these two companies. Find a plan satisfying all these criteria. It can be shown that a viable plan always exists. Please note that you can choose the number (k) and you do not have to minimize or maximize it. Each test contains multiple test cases. The first line contains an integer (t) ((1 \le t \le 1000)) — the number of test cases. The descriptions of the (t) test cases follow. The first line of each test case contains two integers (n) and (m) ((3 \le n \le 50), (n-1 \le m \le n(n-1)/2)) — the number of cities and the number of train routes. The next (m) lines contain two integers (u_i) and (v_i) each ((1 \le u_i, v_i \le n), (u_i \ne v_i)) — the (i)-th train route connects cities (u_i) and (v_i). It is guaranteed that the routes connect (m) distinct pairs of cities. It is guaranteed t

Tutorials

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
194229571 VectorASD gujik Liswiera F Feb. 19, 2023, 12:53 p.m. OK C# 10 TESTS 13 77 3481600
194236885 ruban F Feb. 19, 2023, 1:49 p.m. OK FPC TESTS 13 358 16281600
194215956 hank55663 F Feb. 19, 2023, 11:24 a.m. OK GNU C++14 TESTS 13 31 0
194232271 Momiji F Feb. 19, 2023, 1:13 p.m. OK GNU C++14 TESTS 13 31 102400
194218912 Muelsyse KroosTheKeenGlint F Feb. 19, 2023, 11:41 a.m. OK GNU C++14 TESTS 13 31 819200
194303076 Cu_OH_2 F Feb. 20, 2023, 2:19 a.m. OK GNU C++14 TESTS 13 31 2662400
194215031 CSSYZ_G2022 Oscaryang OccDreamer F Feb. 19, 2023, 11:19 a.m. OK GNU C++14 TESTS 13 31 12800000
194238063 Belief_yfly F Feb. 19, 2023, 1:58 p.m. OK GNU C++14 TESTS 13 46 0
194230302 Pompeii Illumina_ F Feb. 19, 2023, 12:58 p.m. OK GNU C++14 TESTS 13 46 0
194228338 tsoi_blacklight olegekei L3067545513 F Feb. 19, 2023, 12:44 p.m. OK GNU C++14 TESTS 13 46 0
194224672 Gold_Record F Feb. 19, 2023, 12:18 p.m. OK GNU C++14 TESTS 13 46 0
194222763 bdzzj _Diu_ Flew F Feb. 19, 2023, 12:04 p.m. OK GNU C++14 TESTS 13 46 0

remove filters

Back to search problems