Codeforces Round 351 (VK Cup 2016 Round 3, Div. 2 Edition)

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
673 Codeforces Round 351 (VK Cup 2016 Round 3, Div. 2 Edition) FINISHED False 10800 274978504 May 7, 2016, 3:05 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 3542 ) B Problems for Round PROGRAMMING greedy implementation 1400

B"There are n problems prepared for the next Codeforces round. They are arranged in ascending order by their difficulty, and no two problems have the same difficulty. Moreover, there are m pairs of similar problems. Authors want to split problems between two division according to the following rules: Your goal is count the number of ways to split problem between two divisions and satisfy all the rules. Two ways to split problems are considered to be different if there is at least one problem that belongs to division 1 in one of them and to division 2 in the other. Note, that the relation of similarity is not transitive. That is, if problem i is similar to problem j and problem j is similar to problem k, it doesn't follow that i is similar to k. The first line of the input contains two integers n and m (2 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89100 xe2 x80 x89000, 0 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89m xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89100 xe2 x80 x89000) -- the number of problems prepared for the round and the number of pairs of similar problems, respectively. Each of the following m lines contains a pair of similar problems 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, xe2 x80 x89ui xe2 x80 x89 xe2 x89 xa0 xe2 x80 x89vi). It's guaranteed, that no pair of problems meets twice in the input. Print one integer -- the number of ways to split problems in two divisions. In the first sample, problems 1 and 2 should be used in division 2, while problems 4 and 5 in division 1. Problem 3 may be used either in division 1 or in division 2. In the second sample, all pairs of problems are similar and there is no way to split problem between two divisions without breaking any rules. Third sample reminds you that the similarity relation is not transitive. Problem 3 is similar to both 1 and 2, but 1 is not similar to 2, so they may be used together. "...

Tutorials

VK Cup 2016 — Round 3 — Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
18061672 Z8N B May 24, 2016, 4:51 p.m. OK Delphi TESTS 51 31 2662400 1400
17824968 den_mel B May 9, 2016, 8:33 p.m. OK Delphi TESTS 51 46 2662400 1400
17783891 Semenar B May 7, 2016, 3:24 p.m. OK Delphi TESTS 51 46 3072000 1400
17783720 ruban B May 7, 2016, 3:23 p.m. OK Delphi TESTS 51 46 71577600 1400
19440467 programmer228 B July 27, 2016, 11:27 a.m. OK FPC TESTS 51 31 0 1400
20982255 thienanh1999 B Sept. 29, 2016, 2:35 a.m. OK FPC TESTS 51 31 512000 1400
19659849 nhnguyen_vietnam B Aug. 6, 2016, 12:19 a.m. OK FPC TESTS 51 31 1638400 1400
18012619 Galahad B May 21, 2016, 2:58 a.m. OK FPC TESTS 51 31 1843200 1400
18267911 banany2001 B June 6, 2016, 9:29 a.m. OK FPC TESTS 51 31 2560000 1400
17795725 PAG B May 7, 2016, 5:38 p.m. OK FPC TESTS 51 31 2560000 1400
17794398 Secret_Eagle B May 7, 2016, 5:11 p.m. OK FPC TESTS 51 31 17817600 1400
17785562 GiannisAntetokounmpo B May 7, 2016, 3:33 p.m. OK FPC TESTS 51 31 122163200 1400
25382540 chb19 B March 10, 2017, 3 p.m. OK FPC TESTS 51 46 1638400 1400
18220938 agarajaev B June 2, 2016, 5:22 p.m. OK FPC TESTS 51 46 1740800 1400
17809713 jade891022 B May 8, 2016, 3:28 p.m. OK GNU C TESTS 51 31 2457600 1400
22491399 flying_turtle B Nov. 25, 2016, 2:49 p.m. OK GNU C TESTS 51 46 0 1400
19324744 soleil B July 22, 2016, 1:10 p.m. OK GNU C TESTS 51 46 0 1400
18543027 vietnakid B June 17, 2016, 12:52 p.m. OK GNU C TESTS 51 46 0 1400
19412297 Elalay B July 26, 2016, 1:18 a.m. OK GNU C TESTS 51 46 409600 1400
25588790 buctacm2 B March 18, 2017, 4:36 a.m. OK GNU C TESTS 51 46 1843200 1400
18038868 SilverScar B May 23, 2016, 4:16 a.m. OK GNU C TESTS 51 46 1945600 1400
17887313 r.e.gerasimov B May 13, 2016, 10:45 a.m. OK GNU C TESTS 51 46 2048000 1400
18343927 peitoasd B June 9, 2016, 3:25 p.m. OK GNU C TESTS 51 46 2048000 1400
17836799 btzolo B May 10, 2016, 8:43 p.m. OK GNU C TESTS 51 46 2048000 1400
17790081 chentong B May 7, 2016, 4:11 p.m. OK GNU C++ TESTS 51 15 2048000 1400
17800619 KingsNeverDie B May 8, 2016, 12:28 a.m. OK GNU C++ TESTS 51 15 2252800 1400
17788548 kimbbakar B May 7, 2016, 3:55 p.m. OK GNU C++ TESTS 51 15 2662400 1400
19028915 __faith B July 11, 2016, 11:36 a.m. OK GNU C++ TESTS 51 30 0 1400
24619129 imverypupil B Feb. 13, 2017, 1:08 a.m. OK GNU C++ TESTS 51 30 1843200 1400
17783385 wzj152501 B May 7, 2016, 3:21 p.m. OK GNU C++ TESTS 51 30 2048000 1400
17784516 Amber00_Chen B May 7, 2016, 3:27 p.m. OK GNU C++ TESTS 51 30 2252800 1400
17834073 stony_oi B May 10, 2016, 3:47 p.m. OK GNU C++ TESTS 51 30 2662400 1400
17804227 sengxian B May 8, 2016, 7:39 a.m. OK GNU C++ TESTS 51 30 2662400 1400
17927202 ShockProof B May 16, 2016, 5:46 a.m. OK GNU C++ TESTS 51 30 5324800 1400
63950800 kaiboy B Oct. 31, 2019, 9:10 p.m. OK GNU C11 TESTS 51 46 0 1400
22224542 vjudge2 B Nov. 15, 2016, 2:55 p.m. OK GNU C11 TESTS 51 46 819200 1400
17821936 MusfiqxShohan B May 9, 2016, 2:58 p.m. OK GNU C11 TESTS 51 46 2048000 1400
18064707 srijansingh B May 24, 2016, 11:21 p.m. OK GNU C11 TESTS 51 46 2662400 1400
17797126 Rebeca B May 7, 2016, 6:02 p.m. OK GNU C11 TESTS 51 46 2867200 1400
17795501 ali_iva B May 7, 2016, 5:33 p.m. OK GNU C11 TESTS 51 61 3686400 1400
20334982 HandsomeHow B Sept. 2, 2016, 5:08 a.m. OK GNU C++11 TESTS 51 15 409600 1400
17800974 eddy1021 B May 8, 2016, 1:43 a.m. OK GNU C++11 TESTS 51 15 2252800 1400
17781599 zzblack B May 7, 2016, 3:13 p.m. OK GNU C++11 TESTS 51 15 2252800 1400
20641478 yukihana0416 B Sept. 15, 2016, 1:59 p.m. OK GNU C++11 TESTS 51 30 0 1400
69956580 vjudge4 B Feb. 1, 2020, 10:17 a.m. OK GNU C++11 TESTS 51 31 0 1400
20309824 Bobocan B Aug. 31, 2016, 6:38 p.m. OK GNU C++11 TESTS 51 31 0 1400
18372364 DEGwer B June 11, 2016, 10:02 a.m. OK GNU C++11 TESTS 51 31 2048000 1400
18148049 vjudge5 B May 29, 2016, 2:19 p.m. OK GNU C++11 TESTS 51 31 2048000 1400
23669707 _Noor B Jan. 9, 2017, 7:18 p.m. OK GNU C++11 TESTS 51 31 2048000 1400
57915545 luogu_bot4 B July 29, 2019, 12:57 a.m. OK GNU C++11 TESTS 51 31 2048000 1400
40894339 Linkus B July 28, 2018, 6:27 p.m. OK GNU C++14 TESTS 51 31 0 1400
47447014 liulise B Dec. 24, 2018, 7:01 a.m. OK GNU C++14 TESTS 51 46 0 1400
26891565 sugim48 B May 6, 2017, 2:43 a.m. OK GNU C++14 TESTS 51 46 0 1400
30216402 Lazyman B Sept. 9, 2017, 3:14 a.m. OK GNU C++14 TESTS 51 46 409600 1400
42449042 ..vince B Sept. 4, 2018, 6:33 a.m. OK GNU C++14 TESTS 51 46 409600 1400
34426520 -Green B Jan. 21, 2018, 10:40 p.m. OK GNU C++14 TESTS 51 46 1843200 1400
24603652 mengxiang000 B Feb. 12, 2017, 7:44 a.m. OK GNU C++14 TESTS 51 46 1843200 1400
23478053 sekiya9311 B Jan. 1, 2017, 4:20 a.m. OK GNU C++14 TESTS 51 46 2764800 1400
30192751 ongvn B Sept. 8, 2017, 1:04 a.m. OK GNU C++14 TESTS 51 61 409600 1400
32487305 hnam288 B Nov. 20, 2017, 1:37 a.m. OK GNU C++14 TESTS 51 61 409600 1400
47896200 cgiosy0 B Jan. 4, 2019, 10:39 a.m. OK GNU C++17 TESTS 51 46 409600 1400
53894674 trungvthe130284 B May 9, 2019, 4:44 a.m. OK GNU C++17 TESTS 51 61 409600 1400
55362894 FUFUFUFU B June 9, 2019, 3:55 p.m. OK GNU C++17 TESTS 51 61 1228800 1400
49826790 ACtowards B Feb. 12, 2019, 12:03 p.m. OK GNU C++17 TESTS 51 61 1638400 1400
55970295 rsk0315 B June 23, 2019, 2:24 p.m. OK GNU C++17 TESTS 51 62 0 1400
65507192 Nazarbek. B Nov. 22, 2019, 12:03 a.m. OK GNU C++17 TESTS 51 62 0 1400
62656076 wjli B Oct. 16, 2019, 1:44 a.m. OK GNU C++17 TESTS 51 62 0 1400
60530316 vjudge1 B Sept. 14, 2019, 12:08 p.m. OK GNU C++17 TESTS 51 62 0 1400
55520893 ahmedibrahim404 B June 13, 2019, 8:25 a.m. OK GNU C++17 TESTS 51 62 0 1400
53894759 trungvthe130284 B May 9, 2019, 4:50 a.m. OK GNU C++17 TESTS 51 62 0 1400
17886953 CyberZHG B May 13, 2016, 10:11 a.m. OK Haskell TESTS 51 1013 65126400 1400
17790012 thedark B May 7, 2016, 4:10 p.m. OK Java 7 TESTS 51 124 39116800 1400
17782798 kmisura123 B May 7, 2016, 3:18 p.m. OK Java 7 TESTS 51 139 39219200 1400
17797766 Sanatbek B May 7, 2016, 6:52 p.m. OK Java 7 TESTS 51 140 39116800 1400
17784544 ahmad_mamdouh B May 7, 2016, 3:27 p.m. OK Java 7 TESTS 51 140 39116800 1400
17786269 mIchanic B May 7, 2016, 3:38 p.m. OK Java 7 TESTS 51 140 39219200 1400
17877704 Ereke B May 12, 2016, 3:02 p.m. OK Java 7 TESTS 51 155 39219200 1400
17903838 seryp B May 14, 2016, 9:58 a.m. OK Java 7 TESTS 51 155 39219200 1400
17830382 buzaubakov.raman B May 10, 2016, 10:52 a.m. OK Java 7 TESTS 51 155 39219200 1400
17809235 lebaur B May 8, 2016, 2:47 p.m. OK Java 7 TESTS 51 155 39219200 1400
17786865 Nirmit B May 7, 2016, 3:42 p.m. OK Java 7 TESTS 51 155 39321600 1400
60481504 gaidash B Sept. 13, 2019, 10:41 a.m. OK Java 8 TESTS 51 124 0 1400
17785395 t8m8 B May 7, 2016, 3:32 p.m. OK Java 8 TESTS 51 124 20377600 1400
18274809 megaspazz B June 6, 2016, 7:20 p.m. OK Java 8 TESTS 51 124 20582400 1400
17801132 yamidark B May 8, 2016, 2:07 a.m. OK Java 8 TESTS 51 139 20480000 1400
67490956 Hamadneh B Dec. 23, 2019, 7:23 p.m. OK Java 8 TESTS 51 140 0 1400
62617051 vaibhavpulastya B Oct. 15, 2019, 11:45 a.m. OK Java 8 TESTS 51 140 0 1400
18350385 tookunn B June 10, 2016, 12:54 a.m. OK Java 8 TESTS 51 140 20480000 1400
17985043 MichaelGrammar B May 18, 2016, 8:23 p.m. OK Java 8 TESTS 51 140 20582400 1400
18271829 keijiyoshida B June 6, 2016, 2:35 p.m. OK Java 8 TESTS 51 140 20582400 1400
17785029 kvafy B May 7, 2016, 3:30 p.m. OK Java 8 TESTS 51 140 20582400 1400
17791370 kuuso B May 7, 2016, 4:26 p.m. OK Mono C# TESTS 51 124 19660800 1400
18825004 AnatolyTolstobrov B June 30, 2016, 1:47 p.m. OK MS C# TESTS 51 61 204800 1400
17803096 og.kostya B May 8, 2016, 6:09 a.m. OK MS C# TESTS 51 62 9113600 1400
17787745 Beresta B May 7, 2016, 3:49 p.m. OK MS C# TESTS 51 62 9318400 1400
17801980 lpm B May 8, 2016, 4:10 a.m. OK MS C# TESTS 51 62 11980800 1400
17784808 renadeen B May 7, 2016, 3:29 p.m. OK MS C# TESTS 51 93 12185600 1400
17787132 Zvigintsev B May 7, 2016, 3:44 p.m. OK MS C# TESTS 51 93 12390400 1400
17804410 azukun B May 8, 2016, 7:54 a.m. OK MS C# TESTS 51 108 12288000 1400
17794471 eulerscheZahl B May 7, 2016, 5:12 p.m. OK MS C# TESTS 51 109 12185600 1400
17783797 Neverauskas B May 7, 2016, 3:23 p.m. OK MS C# TESTS 51 109 14438400 1400
18048548 zazak B May 23, 2016, 9:39 p.m. OK MS C# TESTS 51 124 12185600 1400
17783136 Kasparyan_Mikhail B May 7, 2016, 3:19 p.m. OK MS C++ TESTS 51 31 2150400 1400
17784551 grandrogue B May 7, 2016, 3:27 p.m. OK MS C++ TESTS 51 31 2252800 1400
17791756 Abhwl14130 B May 7, 2016, 4:30 p.m. OK MS C++ TESTS 51 31 2560000 1400
17801700 prateep B May 8, 2016, 3:22 a.m. OK MS C++ TESTS 51 31 2969600 1400
51258491 vjudge4 B March 13, 2019, 12:20 p.m. OK MS C++ TESTS 51 46 819200 1400
34600083 ys1468362286 B Jan. 27, 2018, 8:59 a.m. OK MS C++ TESTS 51 46 2048000 1400
34603140 vjudge4 B Jan. 27, 2018, 11:04 a.m. OK MS C++ TESTS 51 46 2048000 1400
34601721 vjudge4 B Jan. 27, 2018, 10:12 a.m. OK MS C++ TESTS 51 46 2048000 1400
28990864 vjudge1 B July 30, 2017, 12:48 p.m. OK MS C++ TESTS 51 46 2048000 1400
17786329 Hannibalsc2 B May 7, 2016, 3:38 p.m. OK MS C++ TESTS 51 46 2150400 1400
17784765 Darooha B May 7, 2016, 3:28 p.m. OK Ocaml TESTS 51 62 4198400 1400
17798199 mayakin B May 7, 2016, 7:18 p.m. OK PHP TESTS 51 249 4915200 1400
17925783 zzz1322 B May 15, 2016, 11:57 p.m. OK PyPy 2 TESTS 51 234 24985600 1400
18974045 tastymath75025 B July 8, 2016, 5:57 p.m. OK PyPy 2 TESTS 51 389 4300800 1400
25454121 ragingbull B March 13, 2017, 12:56 p.m. OK PyPy 2 TESTS 51 389 29798400 1400
17925780 zzz1322 B May 15, 2016, 11:55 p.m. OK PyPy 2 TESTS 51 390 26726400 1400
17786872 mehrankhodabandeh B May 7, 2016, 3:42 p.m. OK PyPy 2 TESTS 51 390 26726400 1400
17815928 nealzane B May 9, 2016, 5:52 a.m. OK PyPy 2 TESTS 51 405 27136000 1400
17789112 dezdichado B May 7, 2016, 4 p.m. OK PyPy 2 TESTS 51 421 25497600 1400
18047066 Eeyore B May 23, 2016, 6:17 p.m. OK PyPy 2 TESTS 51 421 26726400 1400
17792434 buzzvil B May 7, 2016, 4:39 p.m. OK PyPy 2 TESTS 51 436 39321600 1400
17925697 poikniok B May 15, 2016, 11:19 p.m. OK PyPy 2 TESTS 51 452 27443200 1400
17783746 cugel B May 7, 2016, 3:23 p.m. OK PyPy 3 TESTS 51 342 28876800 1400
17788885 ssmiler B May 7, 2016, 3:59 p.m. OK PyPy 3 TESTS 51 467 39936000 1400
18036367 Amores B May 22, 2016, 10:42 p.m. OK PyPy 3 TESTS 51 1060 32358400 1400
17783840 yhn112 B May 7, 2016, 3:23 p.m. OK PyPy 3 TESTS 51 1091 33177600 1400
18127041 Vosatorp B May 28, 2016, 6:53 a.m. OK PyPy 3 TESTS 51 1138 31334400 1400
17798996 kennyhothedev B May 7, 2016, 8:03 p.m. OK Python 2 TESTS 51 280 11161600 1400
17786382 seeprybyrun B May 7, 2016, 3:39 p.m. OK Python 2 TESTS 51 311 18739200 1400
17792395 packwolf B May 7, 2016, 4:39 p.m. OK Python 2 TESTS 51 343 6348800 1400
17884375 phoen1x B May 13, 2016, 6:07 a.m. OK Python 2 TESTS 51 358 4710400 1400
18222973 raviojha2105 B June 2, 2016, 8:21 p.m. OK Python 2 TESTS 51 358 4812800 1400
17800067 varunm22 B May 7, 2016, 10:04 p.m. OK Python 2 TESTS 51 358 6348800 1400
17788270 slitvinov B May 7, 2016, 3:53 p.m. OK Python 2 TESTS 51 358 6348800 1400
17905658 vladvin B May 14, 2016, 12:57 p.m. OK Python 2 TESTS 51 373 15155200 1400
17929013 NEIL74 B May 16, 2016, 9:12 a.m. OK Python 2 TESTS 51 374 4710400 1400
17791161 rek B May 7, 2016, 4:23 p.m. OK Python 2 TESTS 51 374 6348800 1400
17800563 orailly B May 8, 2016, 12:12 a.m. OK Python 3 TESTS 51 311 5120000 1400
17807212 harry_potter_28 B May 8, 2016, 11:57 a.m. OK Python 3 TESTS 51 326 5120000 1400
23471819 SendThemToHell B Dec. 31, 2016, 3:25 p.m. OK Python 3 TESTS 51 327 4710400 1400
18146560 Campaigner B May 29, 2016, 12:09 p.m. OK Python 3 TESTS 51 327 5120000 1400
17789081 skystar_p B May 7, 2016, 4 p.m. OK Python 3 TESTS 51 342 9830400 1400
17971728 sayapinpavel B May 17, 2016, 6:40 p.m. OK Python 3 TESTS 51 358 10752000 1400
17783886 111vad111 B May 7, 2016, 3:24 p.m. OK Python 3 TESTS 51 374 5120000 1400
27117790 serg3000 B May 15, 2017, 8:28 a.m. OK Python 3 TESTS 51 390 0 1400
18243330 Vasiliy_48 B June 4, 2016, 12:01 p.m. OK Python 3 TESTS 51 390 5120000 1400
18725020 totsamyzed B June 25, 2016, 7:43 p.m. OK Python 3 TESTS 51 405 0 1400
17783750 ATSTNG B May 7, 2016, 3:23 p.m. OK Ruby TESTS 51 436 6553600 1400
28393414 Baklazan B July 9, 2017, 7:43 p.m. OK Ruby TESTS 51 452 6451200 1400
18405093 MoOfMo B June 13, 2016, 3:34 a.m. OK Ruby TESTS 51 498 6553600 1400
17962618 MishaPrigara B May 17, 2016, 8:03 a.m. OK Ruby TESTS 51 514 6553600 1400
17788203 tkain B May 7, 2016, 3:53 p.m. OK Ruby TESTS 51 529 6860800 1400

remove filters

Back to search problems