AIM Tech Round 3 (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
708 AIM Tech Round 3 (Div. 1) FINISHED False 7200 259766699 Aug. 24, 2016, 4:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 3369 ) C Centroids PROGRAMMING data structures dfs and similar dp graphs greedy trees 2500

B"Tree is a connected acyclic graph. Suppose you are given a tree consisting of n vertices. The vertex of this tree is called centroid if the size of each connected component that appears if this vertex is removed from the tree doesn't exceed . You are given a tree of size n and can perform no more than one edge replacement. Edge replacement is the operation of removing one edge from the tree (without deleting incident vertices) and inserting one new edge (without adding new vertices) in such a way that the graph remains a tree. For each vertex you have to determine if it's possible to make it centroid by performing no more than one edge replacement. The first line of the input contains an integer n (2 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89400 xe2 x80 x89000) -- the number of vertices in the tree. Each of the next n xe2 x80 x89- xe2 x80 x891 lines contains a pair of vertex indices ui and vi (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89ui, xe2 x80 x89vi xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n) -- endpoints of the corresponding edge. Print n integers. The i-th of them should be equal to 1 if the i-th vertex can be made centroid by replacing no more than one edge, and should be equal to 0 otherwise. In the first sample each vertex can be made a centroid. For example, in order to turn vertex 1 to centroid one have to replace the edge (2, xe2 x80 x893) with the edge (1, xe2 x80 x893). "...

Tutorials

Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
26341425 jiyutian C April 13, 2017, 2:16 p.m. OK GNU C++ TESTS 119 217 43520000 2500
40187628 ezoilearner C July 11, 2018, 3:22 a.m. OK GNU C++ TESTS 119 217 46387200 2500
20166695 FHW_SO_WALL C Aug. 26, 2016, 2:42 a.m. OK GNU C++ TESTS 119 218 40652800 2500
26341822 jiyutian C April 13, 2017, 2:37 p.m. OK GNU C++ TESTS 119 218 43520000 2500
40408822 __23333 C July 16, 2018, 11:21 a.m. OK GNU C++ TESTS 119 233 26009600 2500
26341629 jiyutian C April 13, 2017, 2:26 p.m. OK GNU C++ TESTS 119 233 49971200 2500
40598551 txytyun C July 21, 2018, 7:11 a.m. OK GNU C++ TESTS 119 234 38809600 2500
28384112 131441373 C July 9, 2017, 9:06 a.m. OK GNU C++ TESTS 119 234 41881600 2500
25140105 vjudge5 C March 2, 2017, 4:55 a.m. OK GNU C++ TESTS 119 234 46182400 2500
25140096 lethalboy C March 2, 2017, 4:54 a.m. OK GNU C++ TESTS 119 234 46182400 2500
57485859 pufanyi C July 22, 2019, 5:17 a.m. OK GNU C++11 TESTS 119 171 21196800 2500
57596470 zhaotiensn C July 23, 2019, 2:07 p.m. OK GNU C++11 TESTS 119 187 27136000 2500
20727676 Thost C Sept. 18, 2016, 8:15 a.m. OK GNU C++11 TESTS 119 202 28774400 2500
52062968 PaulShi C March 31, 2019, 3:04 a.m. OK GNU C++11 TESTS 119 202 38809600 2500
52139158 dyxg C April 1, 2019, 5:40 a.m. OK GNU C++11 TESTS 119 202 40243200 2500
46015107 vjudge5 C Nov. 21, 2018, 2:07 a.m. OK GNU C++11 TESTS 119 202 41881600 2500
57561698 heyuanjie C July 23, 2019, 1:09 a.m. OK GNU C++11 TESTS 119 202 46694400 2500
57714602 luogu_bot4 C July 25, 2019, 2:05 a.m. OK GNU C++11 TESTS 119 217 16588800 2500
52063015 luogu_bot1 C March 31, 2019, 3:06 a.m. OK GNU C++11 TESTS 119 217 38809600 2500
20727762 Thost C Sept. 18, 2016, 8:20 a.m. OK GNU C++11 TESTS 119 218 28774400 2500
52027309 Nostalgically C March 30, 2019, 3:37 p.m. OK GNU C++14 TESTS 119 202 38297600 2500
44037373 WG6101N C Oct. 9, 2018, 1:25 p.m. OK GNU C++14 TESTS 119 233 40550400 2500
44036985 WG6101N C Oct. 9, 2018, 1:15 p.m. OK GNU C++14 TESTS 119 234 40755200 2500
33481321 zhouhebin C Dec. 21, 2017, 1:31 p.m. OK GNU C++14 TESTS 119 358 27545600 2500
64719623 vjudge1 C Nov. 12, 2019, 2:22 a.m. OK GNU C++14 TESTS 119 358 38400000 2500
20961862 haixinghu C Sept. 28, 2016, 7:29 a.m. OK GNU C++14 TESTS 119 358 51200000 2500
28382587 RogerDTZ C July 9, 2017, 7:22 a.m. OK GNU C++14 TESTS 119 374 40345600 2500
36665989 Starlit C March 27, 2018, 11:31 a.m. OK GNU C++14 TESTS 119 404 32563200 2500
64719664 luogu_bot5 C Nov. 12, 2019, 2:24 a.m. OK GNU C++14 TESTS 119 405 38400000 2500
42800957 Vexoben C Sept. 12, 2018, 2:16 p.m. OK GNU C++14 TESTS 119 405 43212800 2500
57303730 tyzc C July 19, 2019, 2:11 a.m. OK GNU C++17 TESTS 119 343 41676800 2500
46856067 hyfzbtrs C Dec. 10, 2018, 2:55 p.m. OK GNU C++17 TESTS 119 358 46387200 2500
54577729 vjudge4 C May 25, 2019, 1:28 a.m. OK GNU C++17 TESTS 119 373 30412800 2500
54577746 vjudge5 C May 25, 2019, 1:30 a.m. OK GNU C++17 TESTS 119 389 30412800 2500
57492808 luogu_bot2 C July 22, 2019, 7:38 a.m. OK GNU C++17 TESTS 119 389 41164800 2500
57492776 ygy C July 22, 2019, 7:38 a.m. OK GNU C++17 TESTS 119 389 41164800 2500
63278662 fedoseev.timofey C Oct. 24, 2019, 7:54 a.m. OK GNU C++17 TESTS 119 451 48230400 2500
52477625 _mangoyang C April 8, 2019, 1:31 a.m. OK GNU C++17 TESTS 119 452 41676800 2500
51414823 chinmay0906 C March 17, 2019, 1:33 p.m. OK GNU C++17 TESTS 119 467 41779200 2500
64310420 installb C Nov. 5, 2019, 12:35 p.m. OK GNU C++17 TESTS 119 467 43212800 2500
20128273 Egor C Aug. 24, 2016, 6:01 p.m. OK Java 8 TESTS 119 577 99737600 2500
20171724 Ahmad_Elsagheer C Aug. 26, 2016, 9:11 a.m. OK Java 8 TESTS 119 763 67379200 2500
20184160 IgorKoval C Aug. 26, 2016, 9:35 p.m. OK Java 8 TESTS 119 764 67174400 2500
20207237 hama-du C Aug. 28, 2016, 8 a.m. OK Java 8 TESTS 119 889 87449600 2500
20124675 uwi C Aug. 24, 2016, 5:37 p.m. OK Java 8 TESTS 119 920 90214400 2500
20119172 niyaznigmatul C Aug. 24, 2016, 5:10 p.m. OK Java 8 TESTS 119 998 203059200 2500
20122796 ilyakor C Aug. 24, 2016, 5:27 p.m. OK Java 8 TESTS 119 1200 315187200 2500
20133992 fetetriste C Aug. 24, 2016, 7:18 p.m. OK Java 8 TESTS 119 1231 237875200 2500
20172593 rahulkhairwar C Aug. 26, 2016, 10:10 a.m. OK Java 8 TESTS 119 1356 127897600 2500
20125418 Ahmad_Elsagheer C Aug. 24, 2016, 5:42 p.m. OK Java 8 TESTS 119 1372 77516800 2500
20126664 azukun C Aug. 24, 2016, 5:50 p.m. OK MS C# TESTS 119 1372 106803200 2500
20212477 camypaper C Aug. 28, 2016, 1:35 p.m. OK MS C# TESTS 119 1855 91238400 2500
48865915 vjudge2 C Jan. 24, 2019, 3:06 a.m. OK MS C++ TESTS 119 374 23961600 2500
20134401 viktorov C Aug. 24, 2016, 7:23 p.m. OK MS C++ TESTS 119 592 42086400 2500
20969063 DEGwer C Sept. 28, 2016, 2:01 p.m. OK MS C++ TESTS 119 702 38912000 2500
20131894 bayleef C Aug. 24, 2016, 6:26 p.m. OK MS C++ TESTS 119 733 64102400 2500
20132738 Auster C Aug. 24, 2016, 6:31 p.m. OK MS C++ TESTS 119 733 87040000 2500
20136521 ilovetourist C Aug. 24, 2016, 8:06 p.m. OK MS C++ TESTS 119 748 46899200 2500
20255357 TonySnark C Aug. 29, 2016, 2:09 p.m. OK MS C++ TESTS 119 826 27648000 2500
44595205 vjudge1 C Oct. 20, 2018, 12:19 p.m. OK MS C++ TESTS 119 935 37683200 2500
44595203 vjudge4 C Oct. 20, 2018, 12:19 p.m. OK MS C++ TESTS 119 950 37683200 2500
27191991 Sereja C May 18, 2017, 7:30 a.m. OK MS C++ TESTS 119 982 49664000 2500
20347544 limed C Sept. 2, 2016, 7:26 p.m. OK Scala TESTS 119 3369 245964800 2500
20343118 limed C Sept. 2, 2016, 2:55 p.m. OK Scala TESTS 119 3431 297369600 2500
20347462 limed C Sept. 2, 2016, 7:20 p.m. OK Scala TESTS 119 3493 262860800 2500
20347485 limed C Sept. 2, 2016, 7:22 p.m. OK Scala TESTS 119 3556 262860800 2500
20343278 limed C Sept. 2, 2016, 3:04 p.m. OK Scala TESTS 119 3588 304025600 2500
20777953 Tsukasa C Sept. 20, 2016, 2:14 p.m. OK Scala TESTS 119 3665 304025600 2500

remove filters

Back to search problems