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 |
---|---|---|---|---|---|---|
1741 | Codeforces Round 826 (Div. 3) | FINISHED | False | 8100 | 71767463 | Oct. 11, 2022, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 1571 ) | G | Kirill and Company | PROGRAMMING | bitmasks brute force dp graphs shortest paths |
B"Kirill lives on a connected undirected graph of n vertices and m edges at vertex 1 . One fine evening he gathered f friends, the i -th friend lives at the vertex h_i . So all friends are now in the vertex 1 , the i -th friend must get to his home to the vertex h_i . The evening is about to end and it is time to leave. It turned out that k ( k <= 6 ) of his friends have no cars, and they would have to walk if no one gives them a ride. One friend with a car can give a ride to any number of friends without cars, but only if he can give them a ride by driving along one of the shortest paths to his house. For example, in the graph below, a friend from vertex h_i=5 can give a ride to friends from the following sets of vertices: [2, 3] , [2, 4] , [2] , [3] , [4] , but can't give a ride to friend from vertex 6 or a set [3, 4] . Kirill wants as few friends as possible to have to walk. Help him find the minimum possible number. The first line of input data contains an integer t ( 1 <= t <= 10^3 ) -- the number of test cases in the test. The first line of the test case contains two integers n and m ( 2 <= n <= 10^4 , n-1 <= m <= min (10^4, frac{n cdot (n - 1)}{2} ) ) -- the number of vertices and edges, respectively. The next m lines of the test case contain a description of the edges, two integers each u and v ( 1 <= u, v <= n , u ne v ) -- indexes of vertices connected by an edge. It is guaranteed that there is at most one edge between any pair of vertices (i.e. no multiple edges in the graph). Then follows line containing the number f ( 1 <= f <= 10^4 ) -- the number of Kirill's friends. The next line of the test case contains f integers: h_1, h_2, ... , h_f ( 2 <= h_i <= n ) -- the vertices in which they live. Some vertices may be repeated. Th"... |
107908 |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
175683276 | whilet | G | Oct. 11, 2022, 8:19 p.m. | OK | Clang++17 Diagnostics | TESTS | 23 | 265 | 14028800 | ||
175665765 | cMartynas | G | Oct. 11, 2022, 5:14 p.m. | OK | Clang++17 Diagnostics | TESTS | 23 | 1029 | 32665600 | ||
175702375 | klucse2000030318 | G | Oct. 12, 2022, 2:42 a.m. | OK | Clang++17 Diagnostics | TESTS | 23 | 1497 | 14745600 | ||
175701485 | Prathyusha_32082 | G | Oct. 12, 2022, 2:25 a.m. | OK | Clang++20 Diagnostics | TESTS | 23 | 1497 | 14745600 | ||
175667639 | darkkcyan | G | Oct. 11, 2022, 5:28 p.m. | OK | FPC | TESTS | 23 | 296 | 2048000 | ||
175676183 | t98slider | G | Oct. 11, 2022, 6:48 p.m. | OK | GNU C++14 | TESTS | 23 | 31 | 1024000 | ||
175715128 | siddharth_mishra | G | Oct. 12, 2022, 5:49 a.m. | OK | GNU C++14 | TESTS | 23 | 31 | 6348800 | ||
175677749 | Tdolaberidze | G | Oct. 11, 2022, 7:04 p.m. | OK | GNU C++14 | TESTS | 23 | 46 | 3993600 | ||
175708965 | gmsmeghana | G | Oct. 12, 2022, 4:39 a.m. | OK | GNU C++14 | TESTS | 23 | 62 | 716800 | ||
175701564 | PERAM_TEJASREE | G | Oct. 12, 2022, 2:27 a.m. | OK | GNU C++14 | TESTS | 23 | 62 | 1126400 | ||
175662278 | zzuqy | G | Oct. 11, 2022, 4:54 p.m. | OK | GNU C++14 | TESTS | 23 | 62 | 6246400 | ||
175661011 | yehaodxv | G | Oct. 11, 2022, 4:49 p.m. | OK | GNU C++14 | TESTS | 23 | 62 | 33075200 | ||
175673656 | batyousef | G | Oct. 11, 2022, 6:22 p.m. | OK | GNU C++14 | TESTS | 23 | 78 | 5939200 | ||
175667451 | MYNAMEISSHARIFUL | G | Oct. 11, 2022, 5:27 p.m. | OK | GNU C++14 | TESTS | 23 | 156 | 4505600 | ||
175658005 | t98slider | G | Oct. 11, 2022, 4:43 p.m. | OK | GNU C++14 | TESTS | 23 | 202 | 1024000 | ||
175689845 | viniciusth | G | Oct. 11, 2022, 10:32 p.m. | OK | GNU C++17 | TESTS | 23 | 15 | 3584000 | ||
175716051 | regian0001 | G | Oct. 12, 2022, 6 a.m. | OK | GNU C++17 | TESTS | 23 | 31 | 819200 | ||
175705222 | hututu-7 | G | Oct. 12, 2022, 3:30 a.m. | OK | GNU C++17 | TESTS | 23 | 31 | 819200 | ||
175674801 | Baraa_Armoush | G | Oct. 11, 2022, 6:33 p.m. | OK | GNU C++17 | TESTS | 23 | 31 | 921600 | ||
175661604 | Dakovalev1 | G | Oct. 11, 2022, 4:51 p.m. | OK | GNU C++17 | TESTS | 23 | 31 | 1433600 | ||
175712443 | Bobocan | G | Oct. 12, 2022, 5:13 a.m. | OK | GNU C++17 | TESTS | 23 | 31 | 3481600 | ||
175657742 | Sokol080808 | G | Oct. 11, 2022, 4:43 p.m. | OK | GNU C++17 | TESTS | 23 | 31 | 3584000 | ||
175697261 | phuthai_29_06_05 | G | Oct. 12, 2022, 12:48 a.m. | OK | GNU C++17 | TESTS | 23 | 31 | 4096000 | ||
175701561 | xuangou | G | Oct. 12, 2022, 2:27 a.m. | OK | GNU C++17 | TESTS | 23 | 46 | 819200 | ||
175665648 | vito1036 | G | Oct. 11, 2022, 5:13 p.m. | OK | GNU C++17 | TESTS | 23 | 46 | 1126400 | ||
175704809 | ZongDeChuangSiYiGeBa | G | Oct. 12, 2022, 3:23 a.m. | OK | GNU C++17 (64) | TESTS | 23 | 31 | 1433600 | ||
175658438 | lee0560 | G | Oct. 11, 2022, 4:44 p.m. | OK | GNU C++17 (64) | TESTS | 23 | 31 | 2048000 | ||
175660150 | NRolly | G | Oct. 11, 2022, 4:48 p.m. | OK | GNU C++17 (64) | TESTS | 23 | 31 | 6144000 | ||
175695655 | enslaved | G | Oct. 11, 2022, 11:53 p.m. | OK | GNU C++17 (64) | TESTS | 23 | 46 | 716800 | ||
175663985 | Food_Chain_Rule | G | Oct. 11, 2022, 5:02 p.m. | OK | GNU C++17 (64) | TESTS | 23 | 46 | 1024000 | ||
175666333 | lv_bu | G | Oct. 11, 2022, 5:18 p.m. | OK | GNU C++17 (64) | TESTS | 23 | 46 | 3276800 | ||
175709168 | 20123040 | G | Oct. 12, 2022, 4:43 a.m. | OK | GNU C++17 (64) | TESTS | 23 | 46 | 5017600 | ||
175657948 | Diegogrc | G | Oct. 11, 2022, 4:43 p.m. | OK | GNU C++17 (64) | TESTS | 23 | 46 | 8806400 | ||
175666025 | illume2021 | G | Oct. 11, 2022, 5:16 p.m. | OK | GNU C++17 (64) | TESTS | 23 | 46 | 24371200 | ||
175665460 | Whereismybrain | G | Oct. 11, 2022, 5:12 p.m. | OK | GNU C++17 (64) | TESTS | 23 | 46 | 24371200 | ||
175684868 | magnus.hegdahl | G | Oct. 11, 2022, 8:44 p.m. | OK | GNU C++20 (64) | TESTS | 23 | 0 | 819200 | ||
175657039 | HUCSr | G | Oct. 11, 2022, 4:41 p.m. | OK | GNU C++20 (64) | TESTS | 23 | 15 | 4505600 | ||
175669114 | WildBeast_07 | G | Oct. 11, 2022, 5:40 p.m. | OK | GNU C++20 (64) | TESTS | 23 | 15 | 6553600 | ||
175700453 | SDUT_Messywind | G | Oct. 12, 2022, 2:03 a.m. | OK | GNU C++20 (64) | TESTS | 23 | 31 | 716800 | ||
175702782 | xxafhixx | G | Oct. 12, 2022, 2:49 a.m. | OK | GNU C++20 (64) | TESTS | 23 | 31 | 819200 | ||
175684828 | magnus.hegdahl | G | Oct. 11, 2022, 8:43 p.m. | OK | GNU C++20 (64) | TESTS | 23 | 31 | 819200 | ||
175712908 | Emotiona | G | Oct. 12, 2022, 5:19 a.m. | OK | GNU C++20 (64) | TESTS | 23 | 31 | 921600 | ||
175664009 | delhi_wala_2 | G | Oct. 11, 2022, 5:02 p.m. | OK | GNU C++20 (64) | TESTS | 23 | 31 | 2150400 | ||
175656549 | nlog | G | Oct. 11, 2022, 4:40 p.m. | OK | GNU C++20 (64) | TESTS | 23 | 31 | 2355200 | ||
175659502 | LLL_2820 | G | Oct. 11, 2022, 4:46 p.m. | OK | GNU C++20 (64) | TESTS | 23 | 31 | 3276800 | ||
175664346 | merlin_ | G | Oct. 11, 2022, 5:04 p.m. | OK | Java 11 | TESTS | 23 | 342 | 0 | ||
175661468 | Dukkha | G | Oct. 11, 2022, 4:51 p.m. | OK | Java 17 | TESTS | 23 | 327 | 1126400 | ||
175694875 | hxu10 | G | Oct. 11, 2022, 11:24 p.m. | OK | PyPy 3 | TESTS | 23 | 482 | 19660800 | ||
175663411 | misorin | G | Oct. 11, 2022, 4:59 p.m. | OK | PyPy 3 | TESTS | 23 | 624 | 67788800 | ||
175667258 | roaris | G | Oct. 11, 2022, 5:25 p.m. | OK | PyPy 3-64 | TESTS | 23 | 248 | 12390400 | ||
175657397 | 9.86960440109 | G | Oct. 11, 2022, 4:42 p.m. | OK | PyPy 3-64 | TESTS | 23 | 701 | 10752000 |
Back to search problems