Codeforces Round 578 (Div. 2)

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
1200 Codeforces Round 578 (Div. 2) FINISHED False 7200 166296299 Aug. 11, 2019, 12:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 1082 ) F Graph Traveler PROGRAMMING brute force data structures dfs and similar dp graphs implementation math number theory 2500

B"Gildong is experimenting with an interesting machine Graph Traveler. In Graph Traveler, there is a directed graph consisting of n vertices numbered from 1 to n . The i -th vertex has m_i outgoing edges that are labeled as e_i[0] , e_i[1] , ldots , e_i[m_i-1] , each representing the destination vertex of the edge. The graph can have multiple edges and self-loops. The i -th vertex also has an integer k_i written on itself. A travel on this graph works as follows. It's obvious that a travel never ends, since the 2nd and the 3rd step will be repeated endlessly. For example, assume that Gildong starts at vertex 1 with c = 5 , and m_1 = 2 , e_1[0] = 1 , e_1[1] = 2 , k_1 = -3 . Right after he starts at vertex 1 , c becomes 2 . Since the only integer x ( 0 <= x <= 1 ) where x equiv c pmod {m_i} is 0 , Gildong goes to vertex e_1[0] = 1 . After arriving at vertex 1 again, c becomes -1 . The only integer x satisfying the conditions is 1 , so he goes to vertex e_1[1] = 2 , and so on. Since Gildong is quite inquisitive, he's going to ask you q queries. He wants to know how many distinct vertices will be visited infinitely many times, if he starts the travel from a certain vertex with a certain value of c . Note that you should not count the vertices that will be visited only finite times. The first line of the input contains an integer n ( 1 <= n <= 1000 ), the number of vertices in the graph. The second line contains n integers. The i -th integer is k_i ( -10^9 <= k_i <= 10^9 ), the integer written on the i -th vertex. Next 2 cdot n lines describe the edges of each vertex. The (2 cdot i + 1) -st line contains an integer m_i ( 1 <= m_i <= 10 ), the number of outgoing edges of the i -th vertex. The (2 cdot i + 2) -nd"...

Tutorials

Codeforces Round #578 (Div. 2) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
58614733 ILoLy F Aug. 11, 2019, 2:22 p.m. OK GNU C++11 TESTS 71 108 124928000 2500
58614717 ljc2002 F Aug. 11, 2019, 2:22 p.m. OK GNU C++11 TESTS 71 139 169369600 2500
58611624 CMZ F Aug. 11, 2019, 2:10 p.m. OK GNU C++11 TESTS 71 139 169369600 2500
58612308 msuwakow F Aug. 11, 2019, 2:12 p.m. OK GNU C++11 TESTS 71 187 205721600 2500
58616254 Siyuan F Aug. 11, 2019, 2:28 p.m. OK GNU C++11 TESTS 71 187 266752000 2500
58612143 LJZ_C F Aug. 11, 2019, 2:12 p.m. OK GNU C++11 TESTS 71 217 53350400 2500
58614928 command_block F Aug. 11, 2019, 2:23 p.m. OK GNU C++11 TESTS 71 218 40857600 2500
58606628 NotaMotuaQAQ F Aug. 11, 2019, 1:51 p.m. OK GNU C++11 TESTS 71 218 218112000 2500
58608709 ilulu F Aug. 11, 2019, 1:58 p.m. OK GNU C++11 TESTS 71 233 33792000 2500
58603801 ccf_n0i F Aug. 11, 2019, 1:41 p.m. OK GNU C++11 TESTS 71 233 227328000 2500
58609347 k5888200 F Aug. 11, 2019, 2:01 p.m. OK GNU C++14 TESTS 71 186 131174400 2500
58614214 chhokmah F Aug. 11, 2019, 2:20 p.m. OK GNU C++14 TESTS 71 233 169369600 2500
58614666 gubeiqg F Aug. 11, 2019, 2:22 p.m. OK GNU C++14 TESTS 71 280 209715200 2500
58597034 gamegamewillwinioi2020 F Aug. 11, 2019, 1:21 p.m. OK GNU C++14 TESTS 71 343 146329600 2500
58616825 permui F Aug. 11, 2019, 2:30 p.m. OK GNU C++14 TESTS 71 467 72806400 2500
58613179 ngfam F Aug. 11, 2019, 2:16 p.m. OK GNU C++14 TESTS 71 483 409804800 2500
58617967 gs15120 F Aug. 11, 2019, 2:33 p.m. OK GNU C++14 TESTS 71 639 235417600 2500
58615235 Khazhak F Aug. 11, 2019, 2:24 p.m. OK GNU C++14 TESTS 71 810 92467200 2500
58615224 H4XeO6 F Aug. 11, 2019, 2:24 p.m. OK GNU C++17 TESTS 71 264 182784000 2500
58592382 __JuRuo F Aug. 11, 2019, 1:10 p.m. OK GNU C++17 TESTS 71 280 56115200 2500
58614922 iwxw F Aug. 11, 2019, 2:23 p.m. OK GNU C++17 TESTS 71 280 121241600 2500
58611421 brandonzhang F Aug. 11, 2019, 2:09 p.m. OK GNU C++17 TESTS 71 280 164556800 2500
58606296 Tropical_maid F Aug. 11, 2019, 1:50 p.m. OK GNU C++17 TESTS 71 295 96358400 2500
58617947 pustaczek F Aug. 11, 2019, 2:33 p.m. OK GNU C++17 TESTS 71 327 55705600 2500
58614224 balbit F Aug. 11, 2019, 2:20 p.m. OK GNU C++17 TESTS 71 358 225177600 2500
58614658 babin74 F Aug. 11, 2019, 2:22 p.m. OK GNU C++17 TESTS 71 421 60825600 2500
58615880 shatovoleg F Aug. 11, 2019, 2:27 p.m. OK GNU C++17 TESTS 71 545 61030400 2500
58604261 2om_neek F Aug. 11, 2019, 1:43 p.m. OK GNU C++17 TESTS 71 623 129843200 2500

remove filters

Back to search problems