Codeforces Round 360 (Div. 1)

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
687 Codeforces Round 360 (Div. 1) FINISHED False 7200 270392104 June 29, 2016, 5:05 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 326 ) E TOF PROGRAMMING dfs and similar graphs 2800

B"Today Pari gave Arya a cool graph problem. Arya wrote a non-optimal solution for it, because he believes in his ability to optimize non-optimal solutions. In addition to being non-optimal, his code was buggy and he tried a lot to optimize it, so the code also became dirty! He keeps getting Time Limit Exceeds and he is disappointed. Suddenly a bright idea came to his mind! Here is how his dirty code looks like: He asks you to write the TOF function in order to optimize the running time of the code with minimizing the number of calls of the dfs function. The input is a directed graph and in the TOF function you have to rearrange the edges of the graph in the list neighbors for each vertex. The number of calls of dfs function depends on the arrangement of neighbors of each vertex. The first line of the input contains two integers n and m (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n, xe2 x80 x89m xe2 x80 x89 xe2 x89 xa4 xe2 x80 x895000) -- the number of vertices and then number of directed edges in the input graph. Each of the next m lines contains a pair of integers ui and vi (1 xe2 x80 x89 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89 xe2 x80 x89ui, xe2 x80 x89 xe2 x80 x89vi xe2 x80 x89 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89 xe2 x80 x89n), meaning there is a directed edge in the input graph. You may assume that the graph won't contain any self-loops and there is at most one edge between any unordered pair of vertices. Print a single integer -- the minimum possible number of dfs calls that can be achieved with permuting the edges. "...

Tutorials

Codeforces Round #360 Editorial [+ Challenges!]

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
18877661 Arturia E July 4, 2016, 6:41 a.m. OK GNU C++ TESTS 90 187 204800 2800
22570549 zhan8855 E Nov. 28, 2016, 10:10 a.m. OK GNU C++ TESTS 90 202 102400 2800
40984226 ReaLNero1 E July 30, 2018, 7:15 p.m. OK GNU C++ TESTS 90 202 204800 2800
18873710 function348 E July 3, 2016, 11:02 p.m. OK GNU C++ TESTS 90 202 409600 2800
18805272 jcvb E June 29, 2016, 6:43 p.m. OK GNU C++ TESTS 90 202 409600 2800
26826533 ljsss E May 4, 2017, 1:10 a.m. OK GNU C++ TESTS 90 202 2355200 2800
22510422 Ajatar E Nov. 26, 2016, 1:26 p.m. OK GNU C++ TESTS 90 217 204800 2800
18911022 AkaneSasu E July 6, 2016, 3:51 a.m. OK GNU C++ TESTS 90 218 204800 2800
22509952 Ajatar E Nov. 26, 2016, 1:06 p.m. OK GNU C++ TESTS 90 218 409600 2800
18919574 jasonvictoryan E July 6, 2016, 1:31 p.m. OK GNU C++ TESTS 90 218 409600 2800
18985475 BSBandme E July 9, 2016, 12:14 p.m. OK GNU C++11 TESTS 90 187 307200 2800
54503157 WOSHIGEPACHONG2 E May 23, 2019, 12:48 a.m. OK GNU C++11 TESTS 90 187 614400 2800
18805246 xyz111 E June 29, 2016, 6:43 p.m. OK GNU C++11 TESTS 90 187 716800 2800
20305487 ChiliuDog E Aug. 31, 2016, 2:32 p.m. OK GNU C++11 TESTS 90 202 307200 2800
59691834 Dilute E Aug. 30, 2019, 6:32 a.m. OK GNU C++11 TESTS 90 202 409600 2800
18833987 jiry_2 E July 1, 2016, 3:44 a.m. OK GNU C++11 TESTS 90 202 409600 2800
53180544 menjiantong E April 23, 2019, 7:20 a.m. OK GNU C++11 TESTS 90 202 614400 2800
36711419 zhouyuyang E March 29, 2018, 7:05 a.m. OK GNU C++11 TESTS 90 202 3993600 2800
22704591 qsqx E Dec. 5, 2016, 4:44 a.m. OK GNU C++11 TESTS 90 234 614400 2800
18807620 Umqra E June 29, 2016, 6:59 p.m. OK GNU C++11 TESTS 90 249 614400 2800
35328173 cyz666 E Feb. 16, 2018, 6:13 a.m. OK GNU C++14 TESTS 90 202 2252800 2800
37697930 FallDream E April 29, 2018, 1:53 a.m. OK GNU C++14 TESTS 90 202 3788800 2800
22279020 Philipsweng E Nov. 17, 2016, 1:19 a.m. OK GNU C++14 TESTS 90 280 921600 2800
22011003 Arpa E Nov. 3, 2016, 11:22 a.m. OK GNU C++14 TESTS 90 296 819200 2800
47460671 sepehr81 E Dec. 24, 2018, 2:55 p.m. OK GNU C++14 TESTS 90 312 921600 2800
30263862 Matin.Asp E Sept. 11, 2017, 10:44 a.m. OK GNU C++14 TESTS 90 327 1331200 2800
23682984 Hujiwara E Jan. 10, 2017, 2:47 p.m. OK GNU C++14 TESTS 90 327 2867200 2800
36883249 vjudge1 E April 2, 2018, 4:02 p.m. OK GNU C++14 TESTS 90 343 4198400 2800
20810286 MadNick E Sept. 22, 2016, 5:03 a.m. OK GNU C++14 TESTS 90 358 921600 2800
27756047 omidazadi E June 13, 2017, 1:05 p.m. OK GNU C++14 TESTS 90 374 1126400 2800
60505919 saketh E Sept. 13, 2019, 9:35 p.m. OK GNU C++17 TESTS 90 265 614400 2800
68008466 hjk1030 E Dec. 31, 2019, 2:29 p.m. OK GNU C++17 TESTS 90 295 921600 2800
56888381 89264270823 E July 12, 2019, 1:47 p.m. OK GNU C++17 TESTS 90 311 1228800 2800
57817635 Benq E July 26, 2019, 8:39 p.m. OK GNU C++17 TESTS 90 327 716800 2800
58239462 Rzepa E Aug. 3, 2019, 10:30 p.m. OK GNU C++17 TESTS 90 327 33689600 2800
50160178 M_H_H_7 E Feb. 19, 2019, 12:14 p.m. OK GNU C++17 TESTS 90 342 1536000 2800
58404146 ArshiaDadras E Aug. 6, 2019, 7:26 p.m. OK GNU C++17 TESTS 90 343 716800 2800
51594900 Alance E March 20, 2019, 9:04 p.m. OK GNU C++17 TESTS 90 374 1331200 2800
57926541 Kmcode E July 29, 2019, 7:18 a.m. OK GNU C++17 TESTS 90 608 819200 2800
57598319 mohammad258 E July 23, 2019, 2:46 p.m. OK GNU C++17 TESTS 90 623 101478400 2800
18800226 uwi E June 29, 2016, 6:06 p.m. OK Java 8 TESTS 90 420 0 2800
18804401 Egor E June 29, 2016, 6:36 p.m. OK Java 8 TESTS 90 421 0 2800
19013140 IgorKoval E July 10, 2016, 4:40 p.m. OK Java 8 TESTS 90 545 0 2800
19013394 IgorKoval E July 10, 2016, 4:57 p.m. OK Java 8 TESTS 90 826 0 2800
19013423 IgorKoval E July 10, 2016, 4:59 p.m. OK Java 8 TESTS 90 873 0 2800
19013375 IgorKoval E July 10, 2016, 4:56 p.m. OK Java 8 TESTS 90 951 0 2800
24152696 sdya E Jan. 26, 2017, 4:11 p.m. OK MS C++ TESTS 90 935 211046400 2800
24146542 sdya E Jan. 26, 2017, 11:20 a.m. OK MS C++ TESTS 90 998 211046400 2800

remove filters

Back to search problems