Codeforces Round 479 (Div. 3)

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
977 Codeforces Round 479 (Div. 3) FINISHED False 7200 211910124 May 6, 2018, 2:05 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 21416 ) E Cyclic Components PROGRAMMING dfs and similar ds graphs 1500

B"You are given an undirected graph consisting of n vertices and m edges. Your task is to find the number of connected components which are cycles. Here are some definitions of graph theory. An undirected graph consists of two sets: set of nodes (called vertices) and set of edges. Each edge connects a pair of vertices. All edges are bidirectional (i.e. if a vertex a is connected with a vertex b , a vertex b is also connected with a vertex a ). An edge can't connect vertex with itself, there is at most one edge between a pair of vertices. Two vertices u and v belong to the same connected component if and only if there is at least one path along edges connecting u and v . A connected component is a cycle if and only if its vertices can be reordered in such a way that: A cycle doesn't contain any other edges except described above. By definition any cycle contains three or more vertices. The first line contains two integer numbers n and m ( 1 <= n <= 2 cdot 10^5 , 0 <= m <= 2 cdot 10^5 ) -- number of vertices and edges. The following m lines contains edges: edge i is given as a pair of vertices v_i , u_i ( 1 <= v_i, u_i <= n , u_i ne v_i ). There is no multiple edges in the given graph, i.e. for each pair ( v_i, u_i ) there no other pairs ( v_i, u_i ) and ( u_i, v_i ) in the list of edges. Print one integer -- the number of connected components which are also cycles. In the first example only component [3, 4, 5] is also a cycle. The illustration above corresponds to the second example. "...

Tutorials

Codeforces Round #479 (Div. 3) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
60713514 Nutarum E Sept. 17, 2019, 9:31 a.m. OK GNU C11 TESTS 35 46 3993600 1500
60714410 Nutarum E Sept. 17, 2019, 9:53 a.m. OK GNU C11 TESTS 35 46 3993600 1500
67448551 kaiboy E Dec. 23, 2019, 1:26 a.m. OK GNU C11 TESTS 35 77 1843200 1500
67448580 kaiboy E Dec. 23, 2019, 1:28 a.m. OK GNU C11 TESTS 35 78 1843200 1500
67435433 kaiboy E Dec. 22, 2019, 4:57 p.m. OK GNU C11 TESTS 35 108 12185600 1500
56518180 Beams1 E July 4, 2019, 1:43 p.m. OK GNU C11 TESTS 35 109 6553600 1500
67455059 rubber_duckieOwOwO E Dec. 23, 2019, 6:28 a.m. OK GNU C11 TESTS 35 109 14745600 1500
53768296 vjudge3 E May 5, 2019, 2:42 a.m. OK GNU C11 TESTS 35 186 24576000 1500
62751709 luogu_bot2 E Oct. 17, 2019, 1:49 a.m. OK GNU C++11 TESTS 35 31 88166400 1500
53819511 little_sun E May 6, 2019, 12:24 p.m. OK GNU C++11 TESTS 35 46 9113600 1500
62574150 luogu_bot4 E Oct. 14, 2019, 3:22 p.m. OK GNU C++11 TESTS 35 46 16076800 1500
53819536 little_sun E May 6, 2019, 12:25 p.m. OK GNU C++11 TESTS 35 61 9113600 1500
59609122 ModestCoder E Aug. 28, 2019, 10:09 a.m. OK GNU C++11 TESTS 35 61 15462400 1500
69243761 nuchenghao E Jan. 21, 2020, 12:17 p.m. OK GNU C++11 TESTS 35 62 15462400 1500
53220792 codemaster12 E April 24, 2019, 11:45 a.m. OK GNU C++11 TESTS 35 62 16179200 1500
53744168 sunny_fei E May 4, 2019, 3:39 p.m. OK GNU C++11 TESTS 35 62 17100800 1500
54507743 vjudge1 E May 23, 2019, 5:15 a.m. OK GNU C++11 TESTS 35 77 3276800 1500
55585468 HyscereXD E June 15, 2019, 9:14 a.m. OK GNU C++11 TESTS 35 77 30412800 1500
68693969 applemelon E Jan. 13, 2020, 7:16 a.m. OK GNU C++14 TESTS 35 93 1843200 1500
53220676 codemaster4 E April 24, 2019, 11:42 a.m. OK GNU C++14 TESTS 35 93 3174400 1500
53219698 codemaster12 E April 24, 2019, 11:11 a.m. OK GNU C++14 TESTS 35 93 3174400 1500
52022922 vjudge1 E March 30, 2019, 1:33 p.m. OK GNU C++14 TESTS 35 93 4812800 1500
59816221 vjudge1 E Aug. 31, 2019, 3:25 p.m. OK GNU C++14 TESTS 35 93 6451200 1500
69648928 vjudge5 E Jan. 28, 2020, 3:49 a.m. OK GNU C++14 TESTS 35 93 20787200 1500
53219891 codemaster4 E April 24, 2019, 11:16 a.m. OK GNU C++14 TESTS 35 108 3174400 1500
53216380 vjudge5 E April 24, 2019, 9:02 a.m. OK GNU C++14 TESTS 35 108 3174400 1500
53219788 codemaster5 E April 24, 2019, 11:13 a.m. OK GNU C++14 TESTS 35 109 3174400 1500
60041254 soimportant E Sept. 4, 2019, 6:25 p.m. OK GNU C++14 TESTS 35 109 3174400 1500
57389773 Benboby0523 E July 20, 2019, 3:48 p.m. OK GNU C++17 TESTS 35 77 3174400 1500
54384109 _Yoyo E May 19, 2019, 12:23 p.m. OK GNU C++17 TESTS 35 93 3174400 1500
69617512 vjudge5 E Jan. 27, 2020, 1:34 p.m. OK GNU C++17 TESTS 35 93 3174400 1500
55430345 vjudge3 E June 11, 2019, 11:06 a.m. OK GNU C++17 TESTS 35 93 3174400 1500
61363734 HBlade CUCzzy xiaorenshi E Sept. 27, 2019, 12:53 p.m. OK GNU C++17 TESTS 35 93 40448000 1500
57390653 Benboby0523 E July 20, 2019, 3:50 p.m. OK GNU C++17 TESTS 35 108 3174400 1500
57718574 jesuswr E July 25, 2019, 4:02 a.m. OK GNU C++17 TESTS 35 108 6451200 1500
59795106 XuZZ E Aug. 31, 2019, 8:24 a.m. OK GNU C++17 TESTS 35 109 3174400 1500
53223180 codemaster10 E April 24, 2019, 12:56 p.m. OK GNU C++17 TESTS 35 109 3174400 1500
69617168 vjudge1 E Jan. 27, 2020, 1:26 p.m. OK GNU C++17 TESTS 35 109 3174400 1500
69012745 synapse E Jan. 18, 2020, 4:20 a.m. OK Go TESTS 35 327 19046400 1500
69012365 synapse E Jan. 18, 2020, 4:12 a.m. OK Go TESTS 35 327 43827200 1500
65260745 shubh_jha98 E Nov. 17, 2019, 2:57 p.m. OK Java 11 TESTS 35 452 41779200 1500
63622434 Clowyy E Oct. 28, 2019, 12:31 a.m. OK Java 11 TESTS 35 545 53964800 1500
68377549 YahiaMostafa E Jan. 7, 2020, 8:58 p.m. OK Java 11 TESTS 35 592 63795200 1500
65554714 edwin.ansari E Nov. 22, 2019, 8:51 p.m. OK Java 11 TESTS 35 608 82841600 1500
64120076 AnandOza E Nov. 3, 2019, 12:18 a.m. OK Java 8 TESTS 35 218 0 1500
69501746 luchy0120 E Jan. 25, 2020, 6:50 a.m. OK Java 8 TESTS 35 249 15564800 1500
52447020 manish_98 E April 7, 2019, 8:21 a.m. OK Java 8 TESTS 35 358 38707200 1500
54229085 prabhat236218 E May 16, 2019, 7:55 a.m. OK Java 8 TESTS 35 374 108032000 1500
60387422 Anonymous9 E Sept. 11, 2019, 12:03 p.m. OK Java 8 TESTS 35 436 32153600 1500
61808038 GiantTornado E Oct. 3, 2019, 11:32 p.m. OK Java 8 TESTS 35 436 35840000 1500
57608622 hasan5788 E July 23, 2019, 7:17 p.m. OK Java 8 TESTS 35 436 55296000 1500
59325289 Shady51 E Aug. 22, 2019, 8:15 p.m. OK Java 8 TESTS 35 436 57241600 1500
62081433 md_fahad742 E Oct. 7, 2019, 8:59 p.m. OK Java 8 TESTS 35 451 94412800 1500
59325356 Shady51 E Aug. 22, 2019, 8:17 p.m. OK Java 8 TESTS 35 452 58368000 1500
63658077 hibatibati E Oct. 28, 2019, 1:16 p.m. OK Mono C# TESTS 35 514 40960000 1500
65022956 vjudge5 E Nov. 15, 2019, 6:14 a.m. OK MS C++ TESTS 35 93 9625600 1500
52528639 vjudge2 E April 9, 2019, 12:36 p.m. OK MS C++ TESTS 35 93 11264000 1500
54385908 vjudge5 E May 19, 2019, 1:22 p.m. OK MS C++ TESTS 35 280 2457600 1500
52551630 vjudge5 E April 10, 2019, 5:01 a.m. OK MS C++ TESTS 35 280 4198400 1500
69661965 vjudge3 E Jan. 28, 2020, 9:47 a.m. OK MS C++ TESTS 35 280 7987200 1500
53832561 vjudge1 E May 6, 2019, 9:48 p.m. OK MS C++ TESTS 35 295 1843200 1500
54375630 vjudge2 E May 19, 2019, 8:39 a.m. OK MS C++ TESTS 35 296 2252800 1500
69616937 vjudge3 E Jan. 27, 2020, 1:21 p.m. OK MS C++ TESTS 35 342 32051200 1500
53586914 vjudge2 E April 30, 2019, 7:10 p.m. OK MS C++ TESTS 35 358 7168000 1500
52646507 vjudge2 E April 12, 2019, 2:45 p.m. OK MS C++ TESTS 35 358 11468800 1500
54838387 zhaolonga E May 30, 2019, 11:47 a.m. OK MS C++ 2017 TESTS 35 342 6451200 1500
65711341 tonichoff E Nov. 25, 2019, 2:30 p.m. OK MS C++ 2017 TESTS 35 343 3481600 1500
68885743 vjudge1 E Jan. 15, 2020, 9:16 p.m. OK MS C++ 2017 TESTS 35 358 13209600 1500
68885137 youneselarjouni E Jan. 15, 2020, 8:48 p.m. OK MS C++ 2017 TESTS 35 358 13209600 1500
64436930 yuanyuan2048 E Nov. 7, 2019, 1:59 a.m. OK MS C++ 2017 TESTS 35 374 13004800 1500
64437289 yuanyuan2048 E Nov. 7, 2019, 2:11 a.m. OK MS C++ 2017 TESTS 35 389 8294400 1500
54759108 buyolitsez E May 28, 2019, 3:26 p.m. OK MS C++ 2017 TESTS 35 389 11161600 1500
68875645 youneselarjouni E Jan. 15, 2020, 4:49 p.m. OK MS C++ 2017 TESTS 35 389 13414400 1500
55420406 Skeef79 E June 11, 2019, 6:06 a.m. OK MS C++ 2017 TESTS 35 405 13721600 1500
68661356 vjudge2 E Jan. 12, 2020, 1:45 p.m. OK MS C++ 2017 TESTS 35 420 12083200 1500
58249681 chaudhary_19 E Aug. 4, 2019, 7:15 a.m. OK PyPy 2 TESTS 35 764 22732800 1500
55858130 anshuman16423 E June 21, 2019, 8:05 a.m. OK PyPy 2 TESTS 35 1372 22630400 1500
53642581 yfo E May 1, 2019, 5:13 p.m. OK PyPy 3 TESTS 35 639 25088000 1500
69563772 pranavcool4 E Jan. 26, 2020, 11:38 a.m. OK PyPy 3 TESTS 35 670 24473600 1500
68779458 kibutsuji E Jan. 14, 2020, 2:31 p.m. OK PyPy 3 TESTS 35 686 37171200 1500
58249606 chaudhary_19 E Aug. 4, 2019, 7:13 a.m. OK PyPy 3 TESTS 35 717 26521600 1500
58887506 brosucks E Aug. 16, 2019, 3:09 a.m. OK PyPy 3 TESTS 35 857 13516800 1500
69227613 mth1908 E Jan. 21, 2020, 8:01 a.m. OK PyPy 3 TESTS 35 1809 19660800 1500
67954412 MehulJ E Dec. 30, 2019, 9:03 a.m. OK PyPy 3 TESTS 35 1871 31027200 1500
63723766 rishus23 E Oct. 29, 2019, 12:06 p.m. OK PyPy 3 TESTS 35 1872 14540800 1500
61213982 neterukun E Sept. 24, 2019, 12:14 p.m. OK PyPy 3 TESTS 35 1887 32972800 1500
64203981 transfusion E Nov. 4, 2019, 12:18 p.m. OK PyPy 3 TESTS 35 1933 37171200 1500
55119262 shubhankarsharma00 E June 5, 2019, 10:16 a.m. OK Python 2 TESTS 35 998 25088000 1500
58249702 chaudhary_19 E Aug. 4, 2019, 7:15 a.m. OK Python 2 TESTS 35 1091 30412800 1500
54560515 rainerh E May 24, 2019, 1:44 p.m. OK Python 2 TESTS 35 1871 20172800 1500
54560531 vjudge1 E May 24, 2019, 1:44 p.m. OK Python 2 TESTS 35 1887 20172800 1500
68055209 uddeshya.singh E Jan. 1, 2020, 9:53 p.m. OK Python 3 TESTS 35 873 26726400 1500
54089635 vjudge3 E May 14, 2019, 9:59 a.m. OK Python 3 TESTS 35 889 28262400 1500
67745874 break_my_soul E Dec. 27, 2019, 4:40 p.m. OK Python 3 TESTS 35 951 18841600 1500
58249577 chaudhary_19 E Aug. 4, 2019, 7:12 a.m. OK Python 3 TESTS 35 951 31027200 1500
57150710 .selfmade. E July 16, 2019, 2:40 p.m. OK Python 3 TESTS 35 967 19660800 1500
59104885 abhishek.kr.met16 E Aug. 19, 2019, 5:35 p.m. OK Python 3 TESTS 35 967 19763200 1500
54766627 ArthurT E May 28, 2019, 5:25 p.m. OK Python 3 TESTS 35 1060 21708800 1500
62373980 kopok2 E Oct. 11, 2019, 4:39 p.m. OK Python 3 TESTS 35 1122 39424000 1500
54550140 Aidos E May 24, 2019, 8:36 a.m. OK Python 3 TESTS 35 1138 22016000 1500
55561097 arshaktut E June 14, 2019, 12:42 p.m. OK Python 3 TESTS 35 1216 93081600 1500

remove filters

Back to search problems