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. |
Solved |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
|---|---|---|---|---|---|---|
| ( 880 ) | J | Italian Data Centers | PROGRAMMING | graphs |
An Italian data center consists of a set of servers, each colored green, white, or red, and a set of wires connecting them. Each wire connects two distinct servers and two servers are connected by at most one wire. Additionally, the data center is connected, i.e. there is a way to transmit information between any two servers through a sequence of wires. To judge all of the contestant submissions, SWERC has an Italian data center. Since every year the number of contestants doubles, the data center needs to grow to adapt to the extra load. To address this, SWERC builds a new data center based on the previous year's one by following these steps: For each server (s) in the old data center, the new data center contains two servers (s_1) and (s_2) of the same color as (s). A wire is placed connecting the two servers (s_1) and (s_2). For each wire connecting servers (s) and (t) in the old data center: if (s) and (t) have the same color, then a wire is placed in the new data center connecting (s_1) and (t_1) and another wire connecting (s_2) and (t_2); otherwise, a wire is placed in the new data center connecting (s_1) and (t_2) and another one connecting (s_2) and (t_1). One can show that if the old data center is connected than the new data center is also connected. You are given the Italian data center that SWERC currently has, which contains (n) servers (indexed by (1, \, 2, \, \dots, \, n)) and (m) wires connecting them. The organization wants to know how good their data center will be after (k) years, so you should determine the diameter of the data center SWERC will have in (k) years. The diameter of the data center is the largest distance between any two servers, i.e. the shortest number of wires that have to be used to transmit something between the two servers. The first line contains three integers (n), (m) and (k) ((2 \leq n \leq 100), $$$n - 1 \ |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 194302271 | glancing_back | J | Feb. 20, 2023, 1:52 a.m. | OK | GNU C++14 | TESTS | 38 | 15 | 102400 | ||
| 194238003 | p6pou Krystallos william556 | J | Feb. 19, 2023, 1:57 p.m. | OK | GNU C++14 | TESTS | 38 | 15 | 102400 | ||
| 194240119 | daniel14311531 | J | Feb. 19, 2023, 2:14 p.m. | OK | GNU C++14 | TESTS | 38 | 15 | 819200 | ||
| 194232842 | bdzzj _Diu_ Flew | J | Feb. 19, 2023, 1:17 p.m. | OK | GNU C++14 | TESTS | 38 | 30 | 102400 | ||
| 194262308 | mmi366127 | J | Feb. 19, 2023, 4:53 p.m. | OK | GNU C++14 | TESTS | 38 | 30 | 204800 | ||
| 194296067 | Xu_Hongxi | J | Feb. 20, 2023, 12:51 a.m. | OK | GNU C++14 | TESTS | 38 | 31 | 102400 | ||
| 194237878 | WhaleAutoMaton _ReClouds_ Danewol | J | Feb. 19, 2023, 1:57 p.m. | OK | GNU C++14 | TESTS | 38 | 31 | 102400 | ||
| 194239010 | Gold_Record | J | Feb. 19, 2023, 2:06 p.m. | OK | GNU C++14 | TESTS | 38 | 31 | 204800 | ||
| 194238400 | ghj1222 | J | Feb. 19, 2023, 2 p.m. | OK | GNU C++14 | TESTS | 38 | 31 | 204800 | ||
| 194228335 | hank55663 | J | Feb. 19, 2023, 12:44 p.m. | OK | GNU C++14 | TESTS | 38 | 31 | 204800 |
Back to search problems