Codeforces Global Round 17

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
1610 Codeforces Global Round 17 FINISHED False 10800 99588263 Nov. 23, 2021, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 288 ) I Mashtali vs AtCoder PROGRAMMING games trees

B"After many unsuccessful tries, Mashtali decided to copy modify an AtCoder problem. So here is his copied new problem: There is a tree with n vertices and some non-empty set of the vertices are pinned to the ground. Two players play a game against each other on the tree. They alternately perform the following action: The player who cannot move loses(every edge has been deleted already). You are given the tree, but not the set of the pinned vertices. Your task is to determine, for each k , the winner of the game, if only the vertices 1, 2, 3, ldots, k are pinned and both players play optimally. The first line of input contains an integer n -- the number of vertices ( 1 <= n <= 3 cdot 10^5 ). The i -th of the following n-1 lines contains two integers u_i, v_i ( 1 <= u_i, v_i <= n , u_i ne v_i ) -- the endpoints of the i -th edge. It's guaranteed that these edges form a tree. Print a string of length n . The i -th character should be '1' if the first player wins the i -th scenario, and '2' otherwise. Below you can see the tree in the first sample : If k = 1 then the first player can cut the edge (1, 2) . If k = 2 or k = 3 , the first player can cut the edge (2, 4) , after that only the edges (1, 2) and (2, 3) remain. After the second players move, there will be a single edge left for the first player to cut. So first player wins. "...

Tutorials

Codeforces Global Round 17 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
136666679 hos.lyric I Nov. 23, 2021, 4:25 p.m. OK D TESTS 78 405 32358400
136673565 Melania I Nov. 23, 2021, 5:01 p.m. OK GNU C++14 TESTS 78 264 47718400
136678410 gisp_zjz I Nov. 23, 2021, 5:30 p.m. OK GNU C++14 TESTS 78 327 40960000
136678062 dlalswp25 I Nov. 23, 2021, 5:28 p.m. OK GNU C++14 TESTS 78 373 22323200
136687335 sunzihao I Nov. 23, 2021, 7:35 p.m. OK GNU C++14 TESTS 78 374 22220800
136676689 Kalptaru I Nov. 23, 2021, 5:20 p.m. OK GNU C++14 TESTS 78 374 25804800
136673108 Radewoosh I Nov. 23, 2021, 4:59 p.m. OK GNU C++14 TESTS 78 592 75776000
136694714 wifiiii I Nov. 23, 2021, 11:48 p.m. OK GNU C++17 TESTS 78 311 30208000
136669094 Subconscious I Nov. 23, 2021, 4:37 p.m. OK GNU C++17 TESTS 78 327 19865600
136669618 Zhtluo I Nov. 23, 2021, 4:40 p.m. OK GNU C++17 TESTS 78 327 21094400
136706327 Alice_foo_foo I Nov. 24, 2021, 5:23 a.m. OK GNU C++17 TESTS 78 327 23142400
136678627 djq_cpp I Nov. 23, 2021, 5:32 p.m. OK GNU C++17 TESTS 78 327 23449600
136675941 Torta I Nov. 23, 2021, 5:15 p.m. OK GNU C++17 TESTS 78 327 25497600
136667064 he_____hezhou I Nov. 23, 2021, 4:27 p.m. OK GNU C++17 TESTS 78 327 27852800
136681248 Marcin_smu I Nov. 23, 2021, 5:59 p.m. OK GNU C++17 TESTS 78 342 20275200
136678772 jonathanirvings I Nov. 23, 2021, 5:32 p.m. OK GNU C++17 TESTS 78 374 26521600
136684668 dreamoon_love_AA I Nov. 23, 2021, 6:45 p.m. OK GNU C++17 TESTS 78 374 37990400
136673659 ksun48 I Nov. 23, 2021, 5:02 p.m. OK GNU C++17 (64) TESTS 78 264 19968000
136677422 ljcleo I Nov. 23, 2021, 5:25 p.m. OK GNU C++17 (64) TESTS 78 296 37785600
136693045 jeroenodb I Nov. 23, 2021, 10:21 p.m. OK GNU C++17 (64) TESTS 78 296 43417600
136667712 AutumnKite I Nov. 23, 2021, 4:30 p.m. OK GNU C++17 (64) TESTS 78 311 37376000
136668850 Endagorion I Nov. 23, 2021, 4:36 p.m. OK GNU C++17 (64) TESTS 78 311 41267200
136671531 Petr I Nov. 23, 2021, 4:50 p.m. OK GNU C++17 (64) TESTS 78 311 52633600
136680042 Gom I Nov. 23, 2021, 5:49 p.m. OK GNU C++17 (64) TESTS 78 327 38707200
136661823 SSRS_ I Nov. 23, 2021, 4:05 p.m. OK GNU C++17 (64) TESTS 78 343 31232000
136676867 KevinWan I Nov. 23, 2021, 5:21 p.m. OK GNU C++17 (64) TESTS 78 343 38809600
136671580 nuip I Nov. 23, 2021, 4:50 p.m. OK GNU C++17 (64) TESTS 78 343 39936000
136694400 Elegia I Nov. 23, 2021, 11:32 p.m. OK GNU C++20 (64) TESTS 78 234 36659200
136704639 YLWang I Nov. 24, 2021, 4:52 a.m. OK GNU C++20 (64) TESTS 78 249 40960000
136692380 magnus.hegdahl I Nov. 23, 2021, 9:52 p.m. OK GNU C++20 (64) TESTS 78 265 26316800
136678681 l1ll5 I Nov. 23, 2021, 5:32 p.m. OK GNU C++20 (64) TESTS 78 280 38707200
136691841 magnus.hegdahl I Nov. 23, 2021, 9:31 p.m. OK GNU C++20 (64) TESTS 78 280 39628800
136669567 huyinghao0706 I Nov. 23, 2021, 4:40 p.m. OK GNU C++20 (64) TESTS 78 295 41062400
136680101 wty2016 I Nov. 23, 2021, 5:49 p.m. OK GNU C++20 (64) TESTS 78 311 30617600
136704069 wasa855 I Nov. 24, 2021, 4:40 a.m. OK GNU C++20 (64) TESTS 78 358 37478400
136681639 jiangly I Nov. 23, 2021, 6:03 p.m. OK GNU C++20 (64) TESTS 78 358 52326400
136665306 tmwilliamlin168 I Nov. 23, 2021, 4:19 p.m. OK GNU C++20 (64) TESTS 78 436 82022400

remove filters

Back to search problems