VK Cup 2017 - 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
771 VK Cup 2017 - Round 1 FINISHED False 7200 241971899 March 18, 2017, 3:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 15470 ) A Bear and Friendship Condition PROGRAMMING dfs and similar ds graphs 1500

B'Bear Limak examines a social network. Its main functionality is that two members can become friends (then they can talk with each other and share funny pictures). There are n members, numbered 1 through n. m pairs of members are friends. Of course, a member can 't be a friend with themselves. Let A-B denote that members A and B are friends. Limak thinks that a network is reasonable if and only if the following condition is satisfied: For every three distinct members (X, Y, Z), if X-Y and Y-Z then also X-Z. For example: if Alan and Bob are friends, and Bob and Ciri are friends, then Alan and Ciri should be friends as well. Can you help Limak and check if the network is reasonable? Print "YES" or "NO" accordingly, without the quotes. The first line of the input contain two integers n and m (3 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89150 xe2 x80 x89000, ) -- the number of members and the number of pairs of members that are friends. The i-th of the next m lines contains two distinct integers ai and bi (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89ai, xe2 x80 x89bi xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n, xe2 x80 x89ai xe2 x80 x89 xe2 x89 xa0 xe2 x80 x89bi). Members ai and bi are friends with each other. No pair of members will appear more than once in the input. If the given network is reasonable, print "YES" in a single line (without the quotes). Otherwise, print "NO" in a single line (without the quotes). The drawings below show the situation in the first sample (on the left) and in the second sample (on the right). Each edge represents two members that are friends. The answer is "NO" in the second sample because members (2, xe2 x80 x893) are friends and members (3, xe2 x80 x894) are friends, while members (2, xe2 x80 x894) are not. '...

Tutorials

VK Cup 2017 Round 1 and CF Round 405 — Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
25610006 mikekot9 SirNickolas A March 18, 2017, 3:52 p.m. OK D TESTS 96 186 7270400 1500
25627071 StarScreamOwl A March 18, 2017, 7:04 p.m. OK Delphi TESTS 96 108 60416000 1500
26067509 htthtt10t1 A April 2, 2017, 1:52 a.m. OK FPC TESTS 96 62 9625600 1500
25608632 Sanja NikNag A March 18, 2017, 3:46 p.m. OK FPC TESTS 96 77 3686400 1500
25618433 _LV_SKLNSK_MRN ShavelV A March 18, 2017, 4:43 p.m. OK FPC TESTS 96 77 5222400 1500
26319496 willdeath A April 12, 2017, 2:17 p.m. OK FPC TESTS 96 78 6656000 1500
26302959 minhkhoi1026 A April 11, 2017, 3:48 p.m. OK FPC TESTS 96 78 11980800 1500
26293182 luckystars A April 11, 2017, 8:12 a.m. OK FPC TESTS 96 93 7680000 1500
49823897 ketchup_assassin A Feb. 12, 2019, 10:25 a.m. OK FPC TESTS 96 93 7782400 1500
49823487 ilya_kas A Feb. 12, 2019, 10:10 a.m. OK FPC TESTS 96 93 7782400 1500
25896645 FlyNN67 A March 29, 2017, 1:25 p.m. OK FPC TESTS 96 93 8396800 1500
25697857 takdela A March 21, 2017, 6:36 p.m. OK FPC TESTS 96 93 9523200 1500
34259021 alexey.orlov A Jan. 17, 2018, 6:02 p.m. OK GNU C TESTS 96 62 4300800 1500
32111610 NoSoul A Nov. 7, 2017, 7:06 a.m. OK GNU C TESTS 96 62 4915200 1500
25618349 I_love_myself JorreS A March 18, 2017, 4:43 p.m. OK GNU C TESTS 96 78 14643200 1500
25626756 LazyMist A March 18, 2017, 6:54 p.m. OK GNU C TESTS 96 93 13516800 1500
41651376 luogu_bot5 A Aug. 16, 2018, 12:02 p.m. OK GNU C++ TESTS 96 31 8192000 1500
27426871 jiyutian A May 29, 2017, 9:33 a.m. OK GNU C++ TESTS 96 31 8806400 1500
42453611 zichen0535 A Sept. 4, 2018, 9:50 a.m. OK GNU C++ TESTS 96 46 3584000 1500
42453184 vjudge4 A Sept. 4, 2018, 9:33 a.m. OK GNU C++ TESTS 96 46 3584000 1500
42453172 zichen0535 A Sept. 4, 2018, 9:32 a.m. OK GNU C++ TESTS 96 46 3891200 1500
41652087 luogu_bot5 A Aug. 16, 2018, 12:25 p.m. OK GNU C++ TESTS 96 46 6553600 1500
42453288 vjudge1 A Sept. 4, 2018, 9:37 a.m. OK GNU C++ TESTS 96 46 6656000 1500
34736345 _O.O_ A Jan. 31, 2018, 12:07 p.m. OK GNU C++ TESTS 96 46 7577600 1500
25609376 orbitingflea space-time A March 18, 2017, 3:49 p.m. OK GNU C++ TESTS 96 46 8499200 1500
42024814 luogu_bot1 A Aug. 24, 2018, 11:43 a.m. OK GNU C++ TESTS 96 46 9011200 1500
34575293 vjudge1 A Jan. 26, 2018, 12:28 p.m. OK GNU C11 TESTS 96 61 3686400 1500
46397590 wzj_xhjbk A Nov. 30, 2018, 10:26 a.m. OK GNU C++11 TESTS 96 31 1331200 1500
46397417 luogu_bot1 A Nov. 30, 2018, 10:19 a.m. OK GNU C++11 TESTS 96 31 1331200 1500
46397535 wzj_xhjbk A Nov. 30, 2018, 10:24 a.m. OK GNU C++11 TESTS 96 46 1331200 1500
42025717 PrimeMinister A Aug. 24, 2018, 12:20 p.m. OK GNU C++11 TESTS 96 46 3481600 1500
62675632 TianSunXing A Oct. 16, 2019, 11:21 a.m. OK GNU C++11 TESTS 96 46 10444800 1500
25634924 ditoly A March 19, 2017, 4:27 a.m. OK GNU C++11 TESTS 96 46 10854400 1500
63918774 Kylin_ A Oct. 31, 2019, 11:01 a.m. OK GNU C++11 TESTS 96 46 11878400 1500
51278085 VladimirLi A March 14, 2019, 12:10 a.m. OK GNU C++11 TESTS 96 61 3276800 1500
51995838 vjudge5 A March 30, 2019, 1:52 a.m. OK GNU C++11 TESTS 96 61 6656000 1500
57627607 luogu_bot4 A July 24, 2019, 7:36 a.m. OK GNU C++11 TESTS 96 61 12595200 1500
30637334 BThero A Sept. 23, 2017, 9:51 a.m. OK GNU C++14 TESTS 96 62 1740800 1500
25609746 max333 A March 18, 2017, 3:51 p.m. OK GNU C++14 TESTS 96 62 3686400 1500
25687330 mihai.alpha A March 21, 2017, 11:56 a.m. OK GNU C++14 TESTS 96 62 4096000 1500
34568600 vjudge5 A Jan. 26, 2018, 7:42 a.m. OK GNU C++14 TESTS 96 62 4915200 1500
25609160 JewRaper gbarto A March 18, 2017, 3:49 p.m. OK GNU C++14 TESTS 96 62 13619200 1500
30038525 iit2015023 A Sept. 3, 2017, 3:11 p.m. OK GNU C++14 TESTS 96 62 16793600 1500
25610968 cdkrot annikura A March 18, 2017, 3:57 p.m. OK GNU C++14 TESTS 96 62 216780800 1500
52070424 vjudge4 A March 31, 2019, 7:33 a.m. OK GNU C++14 TESTS 96 77 6553600 1500
36120520 bktl1love TheDarkning A March 9, 2018, 2:42 p.m. OK GNU C++14 TESTS 96 78 4710400 1500
53708068 Artherkung A May 3, 2019, 2:12 p.m. OK GNU C++14 TESTS 96 78 6348800 1500
62063097 OrlandoIsay A Oct. 7, 2019, 2:17 p.m. OK GNU C++17 TESTS 96 78 2457600 1500
58623059 vjudge3 A Aug. 11, 2019, 4:27 p.m. OK GNU C++17 TESTS 96 78 6553600 1500
50929844 Ambition2020 A March 7, 2019, 1:27 p.m. OK GNU C++17 TESTS 96 78 6553600 1500
60920808 vjudge2 A Sept. 20, 2019, 10:33 a.m. OK GNU C++17 TESTS 96 78 13004800 1500
67304271 the_hyp0cr1t3 A Dec. 20, 2019, 8:15 p.m. OK GNU C++17 TESTS 96 93 1228800 1500
57182774 Ayush4 A July 17, 2019, 7:48 a.m. OK GNU C++17 TESTS 96 93 1228800 1500
55097273 smhh22 A June 4, 2019, 5:54 p.m. OK GNU C++17 TESTS 96 93 1228800 1500
64800002 lucky_21 A Nov. 13, 2019, 2:15 p.m. OK GNU C++17 TESTS 96 93 1638400 1500
65255894 API A Nov. 17, 2019, 1:24 p.m. OK GNU C++17 TESTS 96 93 1843200 1500
56790394 itachikesh A July 10, 2019, 10:20 a.m. OK GNU C++17 TESTS 96 93 1843200 1500
65418507 shubh_jha98 A Nov. 20, 2019, 8 a.m. OK Java 11 TESTS 96 436 39219200 1500
65401741 edwin.ansari A Nov. 19, 2019, 10:58 p.m. OK Java 11 TESTS 96 607 154828800 1500
27790897 hitesh.bothra A June 15, 2017, 9:56 a.m. OK Java 8 TESTS 96 140 0 1500
37694869 MaxHeap A April 28, 2018, 8:34 p.m. OK Java 8 TESTS 96 155 20684800 1500
31223225 prabhat236218 A Oct. 11, 2017, 5:06 p.m. OK Java 8 TESTS 96 156 45260800 1500
64614671 Khater A Nov. 10, 2019, 4:04 a.m. OK Java 8 TESTS 96 171 0 1500
62758602 Azakarka A Oct. 17, 2019, 5:57 a.m. OK Java 8 TESTS 96 171 3686400 1500
31223261 prabhat236218 A Oct. 11, 2017, 5:07 p.m. OK Java 8 TESTS 96 171 45363200 1500
64173339 assali A Nov. 3, 2019, 7:29 p.m. OK Java 8 TESTS 96 187 0 1500
31003741 Othmane20 A Oct. 4, 2017, 9:51 p.m. OK Java 8 TESTS 96 187 2764800 1500
54380409 goyalakash1997 A May 19, 2019, 10:40 a.m. OK Java 8 TESTS 96 187 3686400 1500
25627181 kocko A March 18, 2017, 7:07 p.m. OK Java 8 TESTS 96 187 20684800 1500
26608840 V--o_o--V A April 23, 2017, 3:51 p.m. OK JavaScript TESTS 96 312 38297600 1500
25656442 simonmysun A March 19, 2017, 10:24 p.m. OK JavaScript TESTS 96 748 42700800 1500
25614270 Cyber.1 A March 18, 2017, 4:15 p.m. OK Kotlin TESTS 96 872 109670400 1500
49118458 nemars A Jan. 28, 2019, 6:02 p.m. OK Mono C# TESTS 96 187 15769600 1500
38983939 Olyakmva A June 6, 2018, 5:12 a.m. OK Mono C# TESTS 96 280 21094400 1500
25625966 og.kostya A March 18, 2017, 6:37 p.m. OK MS C# TESTS 96 77 12288000 1500
25623285 dzeranov1995 ZangievM A March 18, 2017, 5:24 p.m. OK MS C# TESTS 96 249 26521600 1500
26233196 YakovPolykovsky A April 9, 2017, 8:52 a.m. OK MS C# TESTS 96 265 29184000 1500
25630591 nevgen A March 18, 2017, 9:59 p.m. OK MS C# TESTS 96 327 35430400 1500
25626196 Sorryforpartyrocking A March 18, 2017, 6:41 p.m. OK MS C# TESTS 96 373 34099200 1500
25632205 iamexist A March 19, 2017, 12:45 a.m. OK MS C++ TESTS 96 46 4198400 1500
45962010 vjudge2 A Nov. 19, 2018, 12:06 p.m. OK MS C++ TESTS 96 61 3584000 1500
34563023 vjudge3 A Jan. 26, 2018, 3:16 a.m. OK MS C++ TESTS 96 61 3891200 1500
34565878 vjudge5 A Jan. 26, 2018, 5:53 a.m. OK MS C++ TESTS 96 61 5632000 1500
26802017 KOH A May 2, 2017, 12:26 p.m. OK MS C++ TESTS 96 61 5632000 1500
34569472 vjudge1 A Jan. 26, 2018, 8:20 a.m. OK MS C++ TESTS 96 61 5632000 1500
46239472 vjudge1 A Nov. 26, 2018, 6:45 a.m. OK MS C++ TESTS 96 62 2150400 1500
34564306 vjudge3 A Jan. 26, 2018, 4:32 a.m. OK MS C++ TESTS 96 62 3891200 1500
34564274 vjudge2 A Jan. 26, 2018, 4:30 a.m. OK MS C++ TESTS 96 62 3891200 1500
34568682 vjudge3 A Jan. 26, 2018, 7:47 a.m. OK MS C++ TESTS 96 62 3891200 1500
68851991 vjudge3 A Jan. 15, 2020, 9:16 a.m. OK MS C++ 2017 TESTS 96 139 8499200 1500
68467146 youneselarjouni A Jan. 9, 2020, 9:16 p.m. OK MS C++ 2017 TESTS 96 139 9625600 1500
68851886 youneselarjouni A Jan. 15, 2020, 9:14 a.m. OK MS C++ 2017 TESTS 96 140 8499200 1500
68467229 youneselarjouni A Jan. 9, 2020, 9:20 p.m. OK MS C++ 2017 TESTS 96 156 9625600 1500
68466390 youneselarjouni A Jan. 9, 2020, 8:40 p.m. OK MS C++ 2017 TESTS 96 156 21196800 1500
64192117 yuanyuan2048 A Nov. 4, 2019, 8:10 a.m. OK MS C++ 2017 TESTS 96 280 2048000 1500
68885224 sphkemlane A Jan. 15, 2020, 8:52 p.m. OK MS C++ 2017 TESTS 96 280 8499200 1500
68884810 sphkemlane A Jan. 15, 2020, 8:36 p.m. OK MS C++ 2017 TESTS 96 280 8499200 1500
68885152 vjudge5 A Jan. 15, 2020, 8:49 p.m. OK MS C++ 2017 TESTS 96 295 8396800 1500
59226548 TOPAPEC A Aug. 21, 2019, 1:57 p.m. OK MS C++ 2017 TESTS 96 296 7884800 1500
25640927 mayakin A March 19, 2017, 9 a.m. OK PHP TESTS 96 405 83148800 1500
33477345 KEO A Dec. 21, 2017, 11:08 a.m. OK PyPy 2 TESTS 96 654 35635200 1500
46552001 noob77777 A Dec. 3, 2018, 6:25 p.m. OK PyPy 2 TESTS 96 701 36966400 1500
55826207 anshuman16423 A June 20, 2019, 10:59 a.m. OK PyPy 2 TESTS 96 795 36659200 1500
33918487 laoliumang A Jan. 5, 2018, 9:04 a.m. OK PyPy 2 TESTS 96 919 63590400 1500
42817373 franckmy A Sept. 13, 2018, 2:59 a.m. OK PyPy 2 TESTS 96 982 50995200 1500
61301111 chauhain A Sept. 26, 2019, 4:57 a.m. OK PyPy 3 TESTS 96 467 12595200 1500
68567051 gaidash A Jan. 10, 2020, 10:12 p.m. OK PyPy 3 TESTS 96 483 19148800 1500
44934672 vjudge1 A Oct. 27, 2018, 4:35 a.m. OK Python 2 TESTS 96 530 18739200 1500
40204255 lukagvritishvili A July 11, 2018, 2:28 p.m. OK Python 2 TESTS 96 624 18739200 1500
40927743 romil797 A July 29, 2018, 7:57 p.m. OK Python 2 TESTS 96 873 27443200 1500
25671849 shahed_shd A March 20, 2017, 5:01 p.m. OK Python 3 TESTS 96 499 31744000 1500
40679623 orailly A July 23, 2018, 5:58 p.m. OK Python 3 TESTS 96 561 22220800 1500
61301161 chauhain A Sept. 26, 2019, 4:58 a.m. OK Python 3 TESTS 96 592 10956800 1500
50731213 Noafraid A March 3, 2019, 11:16 a.m. OK Python 3 TESTS 96 608 41369600 1500
67579174 Izhan A Dec. 25, 2019, 4:58 a.m. OK Python 3 TESTS 96 639 19353600 1500
25611547 L1va A March 18, 2017, 4 p.m. OK Python 3 TESTS 96 654 21401600 1500
68053812 uddeshya.singh A Jan. 1, 2020, 8:35 p.m. OK Python 3 TESTS 96 670 46387200 1500
56724835 chaudhary_19 A July 8, 2019, 7:01 p.m. OK Python 3 TESTS 96 685 20275200 1500
62371411 kopok2 A Oct. 11, 2019, 3:50 p.m. OK Python 3 TESTS 96 686 31948800 1500
46820449 jaaguptamme A Dec. 9, 2018, 2:57 p.m. OK Python 3 TESTS 96 686 48128000 1500
26512345 yigezhe A April 20, 2017, 9:49 a.m. OK Ruby TESTS 96 779 8908800 1500
25617804 Luxy deFazer A March 18, 2017, 4:39 p.m. OK Ruby TESTS 96 935 29900800 1500
39533913 ditsing A June 23, 2018, 6:39 a.m. OK Rust TESTS 96 78 2355200 1500
28776038 belovedeagle A July 22, 2017, 10:35 a.m. OK Rust TESTS 96 93 5222400 1500

remove filters

Back to search problems