VK Cup 2016 - Round 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
639 VK Cup 2016 - Round 1 FINISHED False 7200 272640299 March 28, 2016, 4:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 6530 ) B Bear and Forgotten Tree 3 PROGRAMMING constructive algorithms graphs trees 1600

B'A tree is a connected undirected graph consisting of n vertices and n xe2 x80 x89 xe2 x80 x89- xe2 x80 x89 xe2 x80 x891 edges. Vertices are numbered 1 through n. Limak is a little polar bear and Radewoosh is his evil enemy. Limak once had a tree but Radewoosh stolen it. Bear is very sad now because he doesn 't remember much about the tree -- he can tell you only three values n, d and h: The distance between two vertices of the tree is the number of edges on the simple path between them. Help Limak to restore his tree. Check whether there exists a tree satisfying the given conditions. Find any such tree and print its edges in any order. It 's also possible that Limak made a mistake and there is no suitable tree xe2 x80 x93 in this case print "-1". The first line contains three integers n, d and h (2 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89100 xe2 x80 x89000, xe2 x80 x891 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89h xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89d xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89- xe2 x80 x891) -- the number of vertices, diameter, and height after rooting in vertex 1, respectively. If there is no tree matching what Limak remembers, print the only line with "-1" (without the quotes). Otherwise, describe any tree matching Limak 's description. Print n xe2 x80 x89- xe2 x80 x891 lines, each with two space-separated integers xe2 x80 x93 indices of vertices connected by an edge. If there are many valid trees, print any of them. You can print edges in any order. Below you can see trees printed to the output in the first sample and the third sample. '...

Tutorials

Tutorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
17000424 wy2ka4 B March 28, 2016, 5:41 p.m. OK FPC TESTS 72 171 1740800 1600
16998764 Eagle_Owl programmer228 B March 28, 2016, 5:29 p.m. OK FPC TESTS 72 186 1740800 1600
17003312 Felix_Mate B March 28, 2016, 6:04 p.m. OK FPC TESTS 72 187 1740800 1600
16998222 Astreb StarScreamOwl B March 28, 2016, 5:25 p.m. OK FPC TESTS 72 187 1740800 1600
17008063 GiannisAntetokounmpo B March 28, 2016, 7:12 p.m. OK FPC TESTS 72 187 1843200 1600
17000446 glscale B March 28, 2016, 5:41 p.m. OK FPC TESTS 72 187 2560000 1600
16998612 andreumat lomaster B March 28, 2016, 5:28 p.m. OK FPC TESTS 72 202 1740800 1600
17871355 r_a_v_e_n B May 12, 2016, 7:13 a.m. OK FPC TESTS 72 202 2560000 1600
17005795 ice_tea Mr.Terus B March 28, 2016, 6:25 p.m. OK FPC TESTS 72 202 3379200 1600
17007110 cleverhero lahm32 B March 28, 2016, 6:33 p.m. OK FPC TESTS 72 202 6246400 1600
26181947 KinKong1 B April 7, 2017, 12:41 a.m. OK GNU C TESTS 72 46 1945600 1600
17191308 Annie07 B April 6, 2016, 3:37 p.m. OK GNU C TESTS 72 46 2048000 1600
17151473 nik_0209 B April 3, 2016, 10:46 p.m. OK GNU C TESTS 72 46 2048000 1600
23915233 jyoteshrc B Jan. 18, 2017, 6:03 a.m. OK GNU C TESTS 72 61 1843200 1600
18340214 yigezhe B June 9, 2016, 11:21 a.m. OK GNU C TESTS 72 61 2048000 1600
38287887 MrCoderBoy B May 15, 2018, 3:52 p.m. OK GNU C TESTS 72 61 3379200 1600
17358948 NoSoul B April 17, 2016, 6:59 a.m. OK GNU C TESTS 72 62 1843200 1600
41739565 SSaken B Aug. 18, 2018, 4:45 a.m. OK GNU C++ TESTS 72 46 0 1600
40017028 vjudge5 B July 6, 2018, 3:18 a.m. OK GNU C++ TESTS 72 46 0 1600
29585133 lllllllllllllllllllllll B Aug. 19, 2017, 1:43 a.m. OK GNU C++ TESTS 72 46 0 1600
27009869 vjudge3 B May 11, 2017, 10:09 a.m. OK GNU C++ TESTS 72 46 0 1600
22844374 fabianalonso333 B Dec. 9, 2016, 9:16 p.m. OK GNU C++ TESTS 72 46 0 1600
22842632 maratonando B Dec. 9, 2016, 7:35 p.m. OK GNU C++ TESTS 72 46 0 1600
22564972 freak_radical B Nov. 28, 2016, 5:40 a.m. OK GNU C++ TESTS 72 46 0 1600
20458511 KousakaHonoka B Sept. 8, 2016, 12:42 p.m. OK GNU C++ TESTS 72 46 0 1600
20385606 syamphanindra7 B Sept. 4, 2016, 3:56 p.m. OK GNU C++ TESTS 72 46 0 1600
19589966 Saat B Aug. 3, 2016, 2:46 a.m. OK GNU C++ TESTS 72 46 0 1600
45185730 dalek_cos B Nov. 1, 2018, 7:54 p.m. OK GNU C11 TESTS 72 374 0 1600
17023590 FalseMirror B March 29, 2016, 5:20 p.m. OK GNU C++11 TESTS 72 30 2252800 1600
16993240 agul Saimon_Saret B March 28, 2016, 4:54 p.m. OK GNU C++11 TESTS 72 31 4198400 1600
61935657 qinpeng B Oct. 5, 2019, 5:39 p.m. OK GNU C++11 TESTS 72 46 0 1600
65745940 vjudge4 B Nov. 26, 2019, 12:14 p.m. OK GNU C++11 TESTS 72 46 0 1600
62373341 Kylin_ B Oct. 11, 2019, 4:27 p.m. OK GNU C++11 TESTS 72 46 0 1600
61780509 luogu_bot1 B Oct. 3, 2019, 1:02 p.m. OK GNU C++11 TESTS 72 46 0 1600
59848988 xtd B Sept. 1, 2019, 10:42 a.m. OK GNU C++11 TESTS 72 46 0 1600
59255245 Ufowoqqqo B Aug. 22, 2019, 6:19 a.m. OK GNU C++11 TESTS 72 46 0 1600
58889220 xgcjay B Aug. 16, 2019, 4:26 a.m. OK GNU C++11 TESTS 72 46 0 1600
57881745 lopare B July 28, 2019, 8:06 a.m. OK GNU C++11 TESTS 72 46 0 1600
27619798 above_you B June 6, 2017, 6:22 p.m. OK GNU C++14 TESTS 72 31 0 1600
27468563 fanzhirui B May 31, 2017, 2:08 p.m. OK GNU C++14 TESTS 72 31 0 1600
22276484 Amores B Nov. 16, 2016, 7:49 p.m. OK GNU C++14 TESTS 72 31 0 1600
27727230 Klift B June 11, 2017, 8:36 p.m. OK GNU C++14 TESTS 72 31 0 1600
30274190 LaughterHouse B Sept. 11, 2017, 8:44 p.m. OK GNU C++14 TESTS 72 31 0 1600
29270259 govind53 B Aug. 7, 2017, 5:56 p.m. OK GNU C++14 TESTS 72 31 1945600 1600
32627062 Dalenator B Nov. 24, 2017, 4:42 p.m. OK GNU C++14 TESTS 72 31 1945600 1600
28179360 conquistador3 B June 30, 2017, 7:30 p.m. OK GNU C++14 TESTS 72 31 1945600 1600
26108275 codec123 B April 3, 2017, 8:16 p.m. OK GNU C++14 TESTS 72 31 1945600 1600
25585725 fauzdar65 B March 17, 2017, 10:47 p.m. OK GNU C++14 TESTS 72 31 1945600 1600
35870055 Vest. B March 3, 2018, 6:22 a.m. OK GNU C++17 TESTS 72 31 1843200 1600
60435294 code0rider B Sept. 12, 2019, 10:38 a.m. OK GNU C++17 TESTS 72 46 0 1600
69283027 anujsingh14 B Jan. 22, 2020, 6:51 a.m. OK GNU C++17 TESTS 72 46 0 1600
55968487 arbitrary_A B June 23, 2019, 1:25 p.m. OK GNU C++17 TESTS 72 46 0 1600
55195931 chongryong B June 6, 2019, 8:29 a.m. OK GNU C++17 TESTS 72 46 0 1600
54327578 vjudge4 B May 18, 2019, 3:49 a.m. OK GNU C++17 TESTS 72 46 0 1600
53493382 memorXie B April 29, 2019, 10:14 a.m. OK GNU C++17 TESTS 72 46 0 1600
52240294 shafwanur010 B April 2, 2019, 3:33 p.m. OK GNU C++17 TESTS 72 46 0 1600
51943748 kopwer B March 28, 2019, 3:43 p.m. OK GNU C++17 TESTS 72 46 0 1600
49345752 coloredrabbit B Feb. 2, 2019, 5:24 a.m. OK GNU C++17 TESTS 72 46 0 1600
17003812 slava.sh B March 28, 2016, 6:08 p.m. OK Go TESTS 72 46 9420800 1600
17817032 sn23581 B May 9, 2016, 8:20 a.m. OK Go TESTS 72 342 9318400 1600
66283734 shubh_jha98 B Dec. 4, 2019, 6:18 p.m. OK Java 11 TESTS 72 233 0 1600
16994319 pitfall Petruchcho B March 28, 2016, 5 p.m. OK Java 7 TESTS 72 140 40038400 1600
17014009 ZhassanB B March 29, 2016, 5:10 a.m. OK Java 7 TESTS 72 233 50585600 1600
17021857 meenal5gupta B March 29, 2016, 3:16 p.m. OK Java 7 TESTS 72 639 39526400 1600
17006044 KoMiI TheWebKot B March 28, 2016, 6:27 p.m. OK Java 7 TESTS 72 686 39424000 1600
17012759 jk001 B March 29, 2016, 2:10 a.m. OK Java 7 TESTS 72 701 39628800 1600
17432976 tihcar B April 22, 2016, 10:33 a.m. OK Java 7 TESTS 72 842 39424000 1600
19834188 Corvus B Aug. 12, 2016, 5:36 p.m. OK Java 8 TESTS 72 124 20480000 1600
17016743 Qwert2603 B March 29, 2016, 9:17 a.m. OK Java 8 TESTS 72 124 20684800 1600
17002927 egor.zhdan ark1 B March 28, 2016, 6 p.m. OK Java 8 TESTS 72 124 20684800 1600
69215389 lazypanda B Jan. 21, 2020, 12:02 a.m. OK Java 8 TESTS 72 140 0 1600
60447716 lansergecs B Sept. 12, 2019, 2:44 p.m. OK Java 8 TESTS 72 140 0 1600
59886391 sonusingh.nitaa B Sept. 2, 2019, 8:12 a.m. OK Java 8 TESTS 72 140 0 1600
59709836 assali B Aug. 30, 2019, 2:13 p.m. OK Java 8 TESTS 72 140 0 1600
38710599 Tarun B May 29, 2018, 6:15 a.m. OK Java 8 TESTS 72 140 0 1600
25664551 OmarRadwan B March 20, 2017, 11:46 a.m. OK Java 8 TESTS 72 140 20582400 1600
17010563 hyj143 B March 28, 2016, 8:49 p.m. OK Java 8 TESTS 72 140 20582400 1600
51611910 nemars B March 21, 2019, 10:50 a.m. OK Mono C# TESTS 72 124 12185600 1600
16994920 av_life og.kostya B March 28, 2016, 5:04 p.m. OK MS C# TESTS 72 77 11878400 1600
17003401 fr0st B March 28, 2016, 6:04 p.m. OK MS C# TESTS 72 109 23244800 1600
16997878 sereja589 freepvps B March 28, 2016, 5:23 p.m. OK MS C# TESTS 72 358 32256000 1600
27868793 DCNick3 B June 17, 2017, 7:01 p.m. OK MS C# TESTS 72 452 19660800 1600
17285972 scorpiowf B April 12, 2016, 5:44 a.m. OK MS C++ TESTS 72 46 0 1600
22907331 Hovhannes1417 B Dec. 12, 2016, 3:35 p.m. OK MS C++ TESTS 72 46 0 1600
17021981 Godun_Alex B March 29, 2016, 3:27 p.m. OK MS C++ TESTS 72 46 2048000 1600
17007876 leo_sgm B March 28, 2016, 7:10 p.m. OK MS C++ TESTS 72 46 2048000 1600
16999078 _LeMur_ Mushegh B March 28, 2016, 5:31 p.m. OK MS C++ TESTS 72 46 2048000 1600
16994625 birne SkyterX B March 28, 2016, 5:02 p.m. OK MS C++ TESTS 72 46 2048000 1600
17687042 abc651279230 B May 2, 2016, 9:20 a.m. OK MS C++ TESTS 72 46 2048000 1600
17525142 canxue123 B April 26, 2016, 4:57 p.m. OK MS C++ TESTS 72 46 2252800 1600
17004647 _Elli_ okio B March 28, 2016, 6:15 p.m. OK MS C++ TESTS 72 46 2252800 1600
17014154 fA1sEr B March 29, 2016, 5:29 a.m. OK MS C++ TESTS 72 46 2252800 1600
49495348 PavelChadnov B Feb. 5, 2019, 12:33 p.m. OK MS C++ 2017 TESTS 72 139 0 1600
66604307 milutin_ B Dec. 10, 2019, 5:48 p.m. OK MS C++ 2017 TESTS 72 140 307200 1600
66968156 yuanyuan2048 B Dec. 15, 2019, 12:26 p.m. OK MS C++ 2017 TESTS 72 451 307200 1600
67198838 simplycomplex20 B Dec. 19, 2019, 10:10 a.m. OK MS C++ 2017 TESTS 72 451 2867200 1600
56785941 bourosh B July 10, 2019, 8:27 a.m. OK MS C++ 2017 TESTS 72 483 0 1600
17002502 vos hellman_ B March 28, 2016, 5:57 p.m. OK PHP TESTS 72 327 4915200 1600
17020229 mayakin B March 29, 2016, 1:23 p.m. OK PHP TESTS 72 358 4812800 1600
17003489 beched EeOneGuyTheBest B March 28, 2016, 6:05 p.m. OK PyPy 2 TESTS 72 1325 27238400 1600
60258638 anshuman16423 B Sept. 8, 2019, 10:31 a.m. OK PyPy 2 TESTS 72 1996 2867200 1600
49874579 111vad111 B Feb. 13, 2019, 3:16 p.m. OK PyPy 3 TESTS 72 280 8192000 1600
17006277 fantaser_ Pewfangirl B March 28, 2016, 6:28 p.m. OK PyPy 3 TESTS 72 343 32870400 1600
20093904 ximo B Aug. 23, 2016, 8:38 p.m. OK PyPy 3 TESTS 72 420 33484800 1600
17002617 evg.anikin B March 28, 2016, 5:58 p.m. OK Python 2 TESTS 72 140 6246400 1600
17987183 abhishek944 B May 19, 2016, 7:07 a.m. OK Python 2 TESTS 72 140 6348800 1600
17378949 792744080 B April 18, 2016, 4:45 p.m. OK Python 2 TESTS 72 140 6348800 1600
23505467 ransky B Jan. 2, 2017, 7:31 p.m. OK Python 2 TESTS 72 155 4608000 1600
20905861 latsyrc1123 B Sept. 25, 2016, 10:41 a.m. OK Python 2 TESTS 72 156 1638400 1600
33443030 ytz123 B Dec. 20, 2017, 2:05 a.m. OK Python 2 TESTS 72 156 6246400 1600
17002742 socl0se boffilya B March 28, 2016, 5:59 p.m. OK Python 2 TESTS 72 171 4710400 1600
17376212 lsw B April 18, 2016, 1:02 p.m. OK Python 2 TESTS 72 186 6246400 1600
38919292 george_abraham B June 3, 2018, 11:34 a.m. OK Python 2 TESTS 72 187 7680000 1600
17074393 orailly B March 31, 2016, 1:13 p.m. OK Python 3 TESTS 72 124 13824000 1600
17321933 zjq B April 15, 2016, 3:49 a.m. OK Python 3 TESTS 72 171 9216000 1600
17228253 SerVasilich B April 8, 2016, 11:52 a.m. OK Python 3 TESTS 72 186 13824000 1600
17393755 darkria B April 20, 2016, 1:39 a.m. OK Python 3 TESTS 72 248 12083200 1600
17008682 Pr0Ger B March 28, 2016, 7:21 p.m. OK Python 3 TESTS 72 436 5120000 1600
28569059 jDomantas B July 15, 2017, 9:11 a.m. OK Python 3 TESTS 72 436 5529600 1600
16997611 amfipter podusov.maxim B March 28, 2016, 5:21 p.m. OK Python 3 TESTS 72 467 9932800 1600
47385435 Ahmeis B Dec. 23, 2018, 4:03 a.m. OK Python 3 TESTS 72 498 307200 1600
17024502 Shamsutdin B March 29, 2016, 6:37 p.m. OK Python 3 TESTS 72 499 5120000 1600
17194861 vovaprog B April 6, 2016, 7:23 p.m. OK Python 3 TESTS 72 499 5222400 1600
17017176 _ShadowSong B March 29, 2016, 9:48 a.m. OK Ruby TESTS 72 171 6553600 1600
25432347 mio_h B March 12, 2017, 11:06 a.m. OK Rust TESTS 72 202 18739200 1600
17071031 reldan B March 31, 2016, 9:57 a.m. OK Scala TESTS 72 436 55193600 1600
16994877 pkravchuk ASoboll B March 28, 2016, 5:03 p.m. OK Scala TESTS 72 904 49254400 1600

remove filters

Back to search problems