Codeforces Round 801 (Div. 2) and EPIC Institute of Technology Round

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
1695 Codeforces Round 801 (Div. 2) and EPIC Institute of Technology Round FINISHED False 7200 81617063 June 18, 2022, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 2226 ) D1 Tree Queries (Easy Version) PROGRAMMING constructive algorithms dfs and similar dp greedy trees

B"The only difference between this problem and D2 is the bound on the size of the tree. You are given an unrooted tree with n vertices. There is some hidden vertex x in that tree that you are trying to find. To do this, you may ask k queries v_1, v_2, ldots, v_k where the v_i are vertices in the tree. After you are finished asking all of the queries, you are given k numbers d_1, d_2, ldots, d_k , where d_i is the number of edges on the shortest path between v_i and x . Note that you know which distance corresponds to which query. What is the minimum k such that there exists some queries v_1, v_2, ldots, v_k that let you always uniquely identify x (no matter what x is). Note that you don't actually need to output these queries. Each test contains multiple test cases. The first line contains the number of test cases t ( 1 <= t <= 100 ). Description of the test cases follows. The first line of each test case contains a single integer n ( 1 <= n <= 2000 ) -- the number of vertices in the tree. Each of the next n-1 lines contains two integers x and y ( 1 <= x, y <= n ), meaning there is an edges between vertices x and y in the tree. It is guaranteed that the given edges form a tree. It is guaranteed that the sum of n over all test cases does not exceed 2000 . For each test case print a single nonnegative integer, the minimum number of queries you need, on its own line. In the first test case, there is only one vertex, so you don't need any queries. In the second test case, you can ask a single query about the node 1 . Then, if x = 1 , you will get 0 , otherwise you will get 1 . "...

Tutorials

Editorial for Codeforces Round #801 (Div. 2) and EPIC Institute of Technology Round

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
161135499 LeonidR D1 June 18, 2022, 9:06 p.m. OK C# 10 TESTS 94 62 1638400
161113969 kakel_san D1 June 18, 2022, 4:29 p.m. OK C# 8 TESTS 94 170 1024000
161146171 chro4896 D1 June 19, 2022, 3:30 a.m. OK GNU C11 TESTS 94 78 102400
161139190 by_chance D1 June 18, 2022, 11:17 p.m. OK GNU C++14 TESTS 94 15 102400
161140091 imObscure D1 June 18, 2022, 11:57 p.m. OK GNU C++14 TESTS 94 15 204800
161150327 Cgfyufsygsm D1 June 19, 2022, 5:04 a.m. OK GNU C++14 TESTS 94 15 307200
161137445 swapbeast D1 June 18, 2022, 10:06 p.m. OK GNU C++14 TESTS 94 15 307200
161114419 likely D1 June 18, 2022, 4:30 p.m. OK GNU C++14 TESTS 94 15 409600
161124345 gopikrishna000 D1 June 18, 2022, 6:08 p.m. OK GNU C++14 TESTS 94 15 512000
161144641 FNOIwyhao D1 June 19, 2022, 2:48 a.m. OK GNU C++14 TESTS 94 15 3276800
161113088 CoachDanke D1 June 18, 2022, 4:27 p.m. OK GNU C++14 TESTS 94 15 3481600
161128447 dlalswp25 D1 June 18, 2022, 6:56 p.m. OK GNU C++14 TESTS 94 15 3686400
161144077 andyc_03 D1 June 19, 2022, 2:31 a.m. OK GNU C++14 TESTS 94 15 4198400
161113485 shivangtiwari D1 June 18, 2022, 4:28 p.m. OK GNU C++17 TESTS 94 15 204800
161111991 saajid_chowdhury D1 June 18, 2022, 4:24 p.m. OK GNU C++17 TESTS 94 15 204800
161123581 user3348 D1 June 18, 2022, 6:01 p.m. OK GNU C++17 TESTS 94 15 204800
161153765 Wonsei D1 June 19, 2022, 5:57 a.m. OK GNU C++17 TESTS 94 15 307200
161143498 limbo16 D1 June 19, 2022, 2:15 a.m. OK GNU C++17 TESTS 94 15 307200
161141230 ankithello20 D1 June 19, 2022, 12:52 a.m. OK GNU C++17 TESTS 94 15 307200
161139524 mphillotry D1 June 18, 2022, 11:31 p.m. OK GNU C++17 TESTS 94 15 307200
161131733 Hasan0540 D1 June 18, 2022, 7:45 p.m. OK GNU C++17 TESTS 94 15 307200
161122986 Sempr D1 June 18, 2022, 5:55 p.m. OK GNU C++17 TESTS 94 15 307200
161153423 mi_ni_ D1 June 19, 2022, 5:52 a.m. OK GNU C++17 TESTS 94 15 307200
161125552 introvert_hu_bhai D1 June 18, 2022, 6:21 p.m. OK GNU C++17 (64) TESTS 94 15 307200
161135717 prokopton D1 June 18, 2022, 9:12 p.m. OK GNU C++17 (64) TESTS 94 15 307200
161111600 nobita1729 D1 June 18, 2022, 4:23 p.m. OK GNU C++17 (64) TESTS 94 15 409600
161139500 neal D1 June 18, 2022, 11:30 p.m. OK GNU C++17 (64) TESTS 94 15 409600
161139426 neal D1 June 18, 2022, 11:27 p.m. OK GNU C++17 (64) TESTS 94 15 409600
161123778 hungt1 D1 June 18, 2022, 6:02 p.m. OK GNU C++17 (64) TESTS 94 15 409600
161121507 .utk. D1 June 18, 2022, 5:43 p.m. OK GNU C++17 (64) TESTS 94 15 409600
161115250 berekuk D1 June 18, 2022, 4:32 p.m. OK GNU C++17 (64) TESTS 94 15 409600
161139390 neal D1 June 18, 2022, 11:25 p.m. OK GNU C++17 (64) TESTS 94 15 614400
161150311 wuhypzz D1 June 19, 2022, 5:03 a.m. OK GNU C++17 (64) TESTS 94 15 2457600
161149423 xdO_o D1 June 19, 2022, 4:45 a.m. OK GNU C++20 (64) TESTS 94 15 204800
161141899 MIKEFENG D1 June 19, 2022, 1:19 a.m. OK GNU C++20 (64) TESTS 94 15 204800
161139820 erdosnumber D1 June 18, 2022, 11:43 p.m. OK GNU C++20 (64) TESTS 94 15 204800
161136658 spipipike D1 June 18, 2022, 9:38 p.m. OK GNU C++20 (64) TESTS 94 15 204800
161133447 pre_prime D1 June 18, 2022, 8:19 p.m. OK GNU C++20 (64) TESTS 94 15 204800
161130633 evancui D1 June 18, 2022, 7:28 p.m. OK GNU C++20 (64) TESTS 94 15 204800
161127815 smax D1 June 18, 2022, 6:48 p.m. OK GNU C++20 (64) TESTS 94 15 204800
161124873 DeadlyVelocity D1 June 18, 2022, 6:14 p.m. OK GNU C++20 (64) TESTS 94 15 204800
161134305 pravin_as D1 June 18, 2022, 8:40 p.m. OK GNU C++20 (64) TESTS 94 15 204800
161150052 Rinors D1 June 19, 2022, 4:58 a.m. OK GNU C++20 (64) TESTS 94 15 204800
161130259 henrychenOutlook D1 June 18, 2022, 7:22 p.m. OK Java 11 TESTS 94 171 0
161119199 dzhi D1 June 18, 2022, 5:29 p.m. OK Java 11 TESTS 94 202 0
161143136 TimmyThinMints D1 June 19, 2022, 2:04 a.m. OK Java 11 TESTS 94 217 0
161139822 daftdove D1 June 18, 2022, 11:43 p.m. OK Java 11 TESTS 94 358 0
161124800 freehandle D1 June 18, 2022, 6:13 p.m. OK Java 11 TESTS 94 358 0
161119107 profchi D1 June 18, 2022, 5:28 p.m. OK Java 11 TESTS 94 529 0
161141542 DylanSmith D1 June 19, 2022, 1:05 a.m. OK Java 8 TESTS 94 155 0
161122565 MagentaCobra D1 June 18, 2022, 5:51 p.m. OK Java 8 TESTS 94 170 0
161129109 SlavaG D1 June 18, 2022, 7:05 p.m. OK Kotlin 1.6 TESTS 94 202 0
161127137 r57shell D1 June 18, 2022, 6:40 p.m. OK MS C++ 2017 TESTS 94 31 204800
161111015 myotra D1 June 18, 2022, 4:22 p.m. OK PyPy 3 TESTS 94 124 3174400
161121395 Adroit_001 D1 June 18, 2022, 5:42 p.m. OK PyPy 3 TESTS 94 1855 11161600
161120264 huikang D1 June 18, 2022, 5:34 p.m. OK PyPy 3-64 TESTS 94 217 11571200
161130646 Thallium54 D1 June 18, 2022, 7:28 p.m. OK Rust 2021 TESTS 94 15 409600
161115561 LittleFall D1 June 18, 2022, 4:32 p.m. OK Rust 2021 TESTS 94 15 409600

remove filters

Back to search problems