Codeforces Beta Round 52 (Div. 2)

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
56 Codeforces Beta Round 52 (Div. 2) FINISHED False 7200 436196999 Jan. 21, 2011, 4:10 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 3735 ) B Spoilt Permutation PROGRAMMING implementation 1400

B"Vasya collects coins: he has exactly one coin for every year from 1 to n. Naturally, Vasya keeps all the coins in his collection in the order in which they were released. Once Vasya's younger brother made a change -- he took all the coins whose release year dated from l to r inclusively and put them in the reverse order. That is, he took a certain segment [l, xe2 x80 x89r] and reversed it. At that the segment's endpoints did not coincide. For example, if n xe2 x80 x89= xe2 x80 x898, then initially Vasya's coins were kept in the order 1 2 3 4 5 6 7 8. If Vasya's younger brother chose the segment [2, xe2 x80 x896], then after the reversal the coin order will change to 1 6 5 4 3 2 7 8. Vasya suspects that someone else could have spoilt the permutation after his brother. Help him to find that out. Check if the given permutation can be obtained from the permutation 1 2 ... n using exactly one segment reversal. If it is possible, find the segment itself. The first line contains an integer n (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x891000) which is the number of coins in Vasya's collection. The second line contains space-separated n integers which are the spoilt sequence of coins. It is guaranteed that the given sequence is a permutation, i.e. it contains only integers from 1 to n, and every number is used exactly 1 time. If it is impossible to obtain the given permutation from the original one in exactly one action, print 0 0. Otherwise, print two numbers l r (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89l xe2 x80 x89< xe2 x80 x89r xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n) which are the endpoints of the segment that needs to be reversed to obtain from permutation 1 2 ... n the given one."...

Tutorials

CodeForces Beta Round #52 :: Разбор задач

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
4333121 Al2K B Aug. 24, 2013, 3:06 p.m. OK Delphi TESTS 33 30 102400 1400
338576 Belonogov B March 16, 2011, 3:31 p.m. OK Delphi TESTS 33 30 819200 1400
274368 BaJIuK B Feb. 3, 2011, 2:27 p.m. OK Delphi TESTS 33 30 819200 1400
267250 Mazeev B Jan. 29, 2011, 11:06 a.m. OK Delphi TESTS 33 30 819200 1400
1385637 Ramp B March 21, 2012, 8:54 p.m. OK Delphi TESTS 33 30 921600 1400
1161067 heartsinatlantis B Feb. 10, 2012, 11:05 a.m. OK Delphi TESTS 33 30 921600 1400
929628 Flyrise B Jan. 21, 2011, 4:55 p.m. OK Delphi TESTS 33 30 921600 1400
755354 DenStep B Jan. 21, 2011, 5:02 p.m. OK Delphi TESTS 33 30 921600 1400
755330 Depool B Jan. 21, 2011, 4:42 p.m. OK Delphi TESTS 33 30 921600 1400
352815 equi B March 23, 2011, 8:34 p.m. OK Delphi TESTS 33 30 921600 1400
734397 memphis0603 B Jan. 21, 2011, 4:32 p.m. OK FPC TESTS 33 10 1024000 1400
4919610 xfce8888 B Oct. 28, 2013, 1:11 p.m. OK FPC TESTS 33 15 0 1400
2952747 ptnk021215 B Jan. 17, 2013, 12:46 p.m. OK FPC TESTS 33 15 0 1400
19515090 dailong B July 30, 2016, 10:56 a.m. OK FPC TESTS 33 30 0 1400
16340659 Jicote B Feb. 26, 2016, 5:49 a.m. OK FPC TESTS 33 30 0 1400
15184616 Smaug B Jan. 4, 2016, 6:51 p.m. OK FPC TESTS 33 30 0 1400
9447079 VAVAvile B Jan. 17, 2015, 2:06 a.m. OK FPC TESTS 33 30 0 1400
5003130 Ermac B Nov. 6, 2013, 12:06 p.m. OK FPC TESTS 33 30 0 1400
5003125 balsa_knez B Nov. 6, 2013, 12:05 p.m. OK FPC TESTS 33 30 0 1400
5002925 vjudge2 B Nov. 6, 2013, 11:36 a.m. OK FPC TESTS 33 30 0 1400
2804886 sarveshmahajan B Dec. 21, 2012, 9:27 p.m. OK GNU C TESTS 33 15 0 1400
2864446 priy2201 B Jan. 1, 2013, 5:56 p.m. OK GNU C TESTS 33 15 0 1400
8628273 yungpin B Nov. 10, 2014, 5:09 a.m. OK GNU C TESTS 33 30 0 1400
5518966 hariompatnayak B Dec. 25, 2013, 12:59 p.m. OK GNU C TESTS 33 30 0 1400
656565 kawatea B Sept. 3, 2011, 12:02 a.m. OK GNU C TESTS 33 30 1331200 1400
300704 tk_ B Feb. 23, 2011, 12:54 p.m. OK GNU C TESTS 33 30 1331200 1400
277352 pavankrish1 B Feb. 8, 2011, 5:51 p.m. OK GNU C TESTS 33 30 1331200 1400
261308 madxmad B Jan. 25, 2011, 2:44 a.m. OK GNU C TESTS 33 30 1331200 1400
258244 tracer B Jan. 21, 2011, 5:28 p.m. OK GNU C TESTS 33 30 1331200 1400
258173 vijitthetopcoder B Jan. 21, 2011, 5:22 p.m. OK GNU C TESTS 33 30 1331200 1400
2089233 mystery_boy B Sept. 2, 2012, 5:04 a.m. OK GNU C++ TESTS 33 10 819200 1400
266000 wub B Jan. 27, 2011, 3:20 a.m. OK GNU C++ TESTS 33 10 1331200 1400
257650 vishwakarma B Jan. 21, 2011, 4:47 p.m. OK GNU C++ TESTS 33 10 1331200 1400
1515940 KBakozoda B April 12, 2012, 3:25 p.m. OK GNU C++ TESTS 33 10 1433600 1400
4077216 hssh B July 15, 2013, 8:20 p.m. OK GNU C++ TESTS 33 15 0 1400
4059254 mnorouzi B July 13, 2013, 10:56 a.m. OK GNU C++ TESTS 33 15 0 1400
4000215 GaryWong B July 1, 2013, 3:44 p.m. OK GNU C++ TESTS 33 15 0 1400
3690876 runrun889 B May 7, 2013, 3:11 p.m. OK GNU C++ TESTS 33 15 0 1400
3562137 eduarc B April 18, 2013, 9:56 p.m. OK GNU C++ TESTS 33 15 0 1400
3558912 yerminson B April 18, 2013, 5:12 a.m. OK GNU C++ TESTS 33 15 0 1400
3757541 A_Le_K B May 22, 2013, 2:51 p.m. OK GNU C++0x TESTS 33 15 0 1400
3297641 randrew B March 13, 2013, 8:50 a.m. OK GNU C++0x TESTS 33 15 0 1400
3139235 Doxer B Feb. 17, 2013, 11:27 a.m. OK GNU C++0x TESTS 33 15 0 1400
10172680 ErzhaNN B March 6, 2015, 5:02 a.m. OK GNU C++0x TESTS 33 30 0 1400
10175557 Manny B March 6, 2015, 10:26 a.m. OK GNU C++0x TESTS 33 30 0 1400
9733864 JustME B Feb. 6, 2015, 5:46 a.m. OK GNU C++0x TESTS 33 30 0 1400
9670695 dionysios B Feb. 2, 2015, 12:34 a.m. OK GNU C++0x TESTS 33 30 0 1400
9366057 nosy B Jan. 5, 2015, 1:35 p.m. OK GNU C++0x TESTS 33 30 0 1400
7816057 Elibay B Sept. 17, 2014, 8:48 a.m. OK GNU C++0x TESTS 33 30 0 1400
7486969 MohamadAdel B Aug. 16, 2014, 7:40 p.m. OK GNU C++0x TESTS 33 30 0 1400
60779014 akash19jain B Sept. 18, 2019, 3:33 p.m. OK GNU C11 TESTS 33 62 0 1400
64368506 vjudge2 B Nov. 6, 2019, 1:39 p.m. OK GNU C11 TESTS 33 62 0 1400
29708948 albeXL B Aug. 23, 2017, 1:47 p.m. OK GNU C++11 TESTS 33 30 0 1400
27830244 Dalgerok B June 16, 2017, 5:15 p.m. OK GNU C++11 TESTS 33 30 0 1400
27828047 saisurya027 B June 16, 2017, 3:02 p.m. OK GNU C++11 TESTS 33 30 0 1400
27727003 eisenheim01 B June 11, 2017, 8:14 p.m. OK GNU C++11 TESTS 33 30 0 1400
27715755 mrwhite B June 11, 2017, 6:04 a.m. OK GNU C++11 TESTS 33 30 0 1400
39520819 Ahmedabdalmola B June 22, 2018, 3:38 p.m. OK GNU C++11 TESTS 33 30 0 1400
32067861 edisonhello B Nov. 5, 2017, 4:43 a.m. OK GNU C++11 TESTS 33 30 0 1400
30096655 ea6102 B Sept. 5, 2017, 10:28 a.m. OK GNU C++11 TESTS 33 30 0 1400
30767640 hamtory B Sept. 27, 2017, 4:45 a.m. OK GNU C++11 TESTS 33 30 0 1400
29836831 AVM.Martin B Aug. 28, 2017, 1:18 a.m. OK GNU C++11 TESTS 33 30 0 1400
29815038 farukkastamonuda B Aug. 26, 2017, 8:54 p.m. OK GNU C++14 TESTS 33 30 0 1400
66203349 vjudge1 B Dec. 2, 2019, 11:24 p.m. OK GNU C++14 TESTS 33 30 0 1400
65623818 prodipdatta7 B Nov. 24, 2019, 7:11 a.m. OK GNU C++14 TESTS 33 30 0 1400
57817226 ritesh1340 B July 26, 2019, 8:24 p.m. OK GNU C++14 TESTS 33 30 0 1400
57089820 Black_hat123 B July 15, 2019, 10:19 a.m. OK GNU C++14 TESTS 33 30 0 1400
50572481 Prozac B Feb. 27, 2019, 4:11 p.m. OK GNU C++14 TESTS 33 30 0 1400
48590431 vjudge3 B Jan. 20, 2019, 1:33 a.m. OK GNU C++14 TESTS 33 30 0 1400
39582896 maxim12321 B June 23, 2018, 9:23 p.m. OK GNU C++14 TESTS 33 30 0 1400
30835135 Python3 B Sept. 29, 2017, 4:19 p.m. OK GNU C++14 TESTS 33 30 0 1400
30700474 OmarSaber B Sept. 25, 2017, 10:08 a.m. OK GNU C++14 TESTS 33 30 0 1400
65372721 XDazzle-C B Nov. 19, 2019, 3:36 p.m. OK GNU C++17 TESTS 33 30 0 1400
59671557 watchman B Aug. 29, 2019, 4:16 p.m. OK GNU C++17 TESTS 33 30 0 1400
44060682 Harolinch B Oct. 10, 2018, 5:39 a.m. OK GNU C++17 TESTS 33 30 0 1400
41686067 jizhenjun B Aug. 17, 2018, 2:13 p.m. OK GNU C++17 TESTS 33 30 0 1400
66590326 Sephiroth_Shinra B Dec. 10, 2019, 12:46 p.m. OK GNU C++17 TESTS 33 30 0 1400
69649967 666666madhav B Jan. 28, 2020, 4:34 a.m. OK GNU C++17 TESTS 33 30 0 1400
48603019 Kk1506 B Jan. 20, 2019, 9:16 a.m. OK GNU C++17 TESTS 33 30 307200 1400
64077868 shouryaa B Nov. 2, 2019, 9:16 a.m. OK GNU C++17 TESTS 33 30 1638400 1400
35897001 arbitrary_A B March 3, 2018, 5:41 p.m. OK GNU C++17 TESTS 33 30 1945600 1400
35757519 Qumeric B Feb. 27, 2018, 9:54 a.m. OK GNU C++17 TESTS 33 30 2048000 1400
3192983 U_E_D B Feb. 25, 2013, 5:31 a.m. OK Haskell TESTS 33 15 0 1400
267430 watashi B Jan. 29, 2011, 5:44 p.m. OK Haskell TESTS 33 30 1638400 1400
258234 Vintik B Jan. 21, 2011, 5:27 p.m. OK Haskell TESTS 33 30 1638400 1400
2101200 DimsFromDergachy B Sept. 6, 2012, 7:13 p.m. OK Haskell TESTS 33 30 1638400 1400
671237 mkut B Sept. 6, 2011, 5:32 p.m. OK Haskell TESTS 33 30 2048000 1400
468548 rexim B May 23, 2011, 3:58 p.m. OK Haskell TESTS 33 30 2048000 1400
331083 enots B March 11, 2011, 5:42 p.m. OK Haskell TESTS 33 30 2048000 1400
258700 slycelote B Jan. 21, 2011, 7:36 p.m. OK Haskell TESTS 33 50 1638400 1400
257265 calculus.saransh B Jan. 21, 2011, 4:34 p.m. OK Java 6 TESTS 33 60 43417600 1400
1116215 Mostafa.Ali B Jan. 25, 2012, 6:34 a.m. OK Java 6 TESTS 33 80 43008000 1400
445386 Sammarize B May 12, 2011, 12:22 a.m. OK Java 6 TESTS 33 80 43315200 1400
267989 pius_88 B Jan. 30, 2011, 9:09 p.m. OK Java 6 TESTS 33 80 43315200 1400
261331 Di735 B Jan. 25, 2011, 4:36 a.m. OK Java 6 TESTS 33 80 43417600 1400
259591 Rania_Salama B Jan. 22, 2011, 12:29 p.m. OK Java 6 TESTS 33 80 43417600 1400
258351 marque B Jan. 21, 2011, 5:38 p.m. OK Java 6 TESTS 33 80 43417600 1400
257518 LifeMaker B Jan. 21, 2011, 4:41 p.m. OK Java 6 TESTS 33 80 43417600 1400
257184 SpookyCookie B Jan. 21, 2011, 4:31 p.m. OK Java 6 TESTS 33 80 43417600 1400
256973 pyshnograev B Jan. 21, 2011, 4:25 p.m. OK Java 6 TESTS 33 80 43417600 1400
3821392 CurbStomp B June 4, 2013, 11:51 a.m. OK Java 7 TESTS 33 78 0 1400
1688834 bidzilya B May 15, 2012, 9:57 a.m. OK Java 7 TESTS 33 90 44851200 1400
1477422 bogdan.sumy.ua B April 5, 2012, 8:37 a.m. OK Java 7 TESTS 33 90 44851200 1400
8165056 coolmaksat B Oct. 10, 2014, 11:56 a.m. OK Java 7 TESTS 33 124 0 1400
8165048 I_love_Malika B Oct. 10, 2014, 11:55 a.m. OK Java 7 TESTS 33 124 0 1400
5642330 tiny_code B Jan. 9, 2014, 10:57 a.m. OK Java 7 TESTS 33 124 0 1400
5269316 0p9o8i B Nov. 27, 2013, 7:34 a.m. OK Java 7 TESTS 33 124 0 1400
1507663 HAPKOMAH B April 9, 2012, 6 p.m. OK Java 7 TESTS 33 130 44851200 1400
1768509 jiangzhijie B June 7, 2012, 5:07 a.m. OK Java 7 TESTS 33 140 44953600 1400
13082431 maitony B Sept. 18, 2015, 8:37 a.m. OK Java 7 TESTS 33 154 0 1400
48566576 AWCXV B Jan. 19, 2019, 9:53 a.m. OK Java 8 TESTS 33 218 0 1400
22416432 Sanatbek B Nov. 23, 2016, 5:13 a.m. OK Java 8 TESTS 33 218 0 1400
16390890 flyman3046 B Feb. 27, 2016, 6:58 p.m. OK Java 8 TESTS 33 218 0 1400
13101944 di_halt B Sept. 19, 2015, 1:03 p.m. OK Java 8 TESTS 33 218 0 1400
11924713 Guliash B July 4, 2015, 4:10 p.m. OK Java 8 TESTS 33 218 0 1400
10188616 upsolving B March 7, 2015, 10:10 a.m. OK Java 8 TESTS 33 218 0 1400
26907878 Don_1234 B May 6, 2017, 6:30 p.m. OK Java 8 TESTS 33 218 15872000 1400
19939726 Kharouba B Aug. 18, 2016, 5 a.m. OK Java 8 TESTS 33 218 20480000 1400
19735651 dhruvil_1bhuptani B Aug. 8, 2016, 8 p.m. OK Java 8 TESTS 33 218 20480000 1400
68776178 sanskriti0512 B Jan. 14, 2020, 1:30 p.m. OK Java 8 TESTS 33 248 0 1400
6323030 Eeyore B April 11, 2014, 2:52 p.m. OK JavaScript TESTS 33 62 0 1400
19187359 anvesh16 B July 17, 2016, 9:10 a.m. OK JavaScript TESTS 33 62 1228800 1400
16631645 agat00 B March 10, 2016, 11:52 a.m. OK JavaScript TESTS 33 62 1331200 1400
267565 ifrit B Jan. 29, 2011, 9:19 p.m. OK Mono C# TESTS 33 110 5529600 1400
257974 edem.kwadzo B Jan. 21, 2011, 5:06 p.m. OK Mono C# TESTS 33 110 5632000 1400
256901 tanzaku B Jan. 21, 2011, 4:24 p.m. OK Mono C# TESTS 33 130 5632000 1400
257735 Ragvena B Jan. 21, 2011, 4:52 p.m. OK Mono C# TESTS 33 130 5632000 1400
309135 Utka B Feb. 27, 2011, 11:41 p.m. OK Mono C# TESTS 33 130 5836800 1400
258767 Hadi_Asiaie B Jan. 21, 2011, 7:44 p.m. OK Mono C# TESTS 33 220 6758400 1400
19230278 Matvey B July 19, 2016, 11:14 a.m. OK MS C# TESTS 33 92 204800 1400
16906511 vjudge1 B March 24, 2016, 1:08 p.m. OK MS C# TESTS 33 92 9113600 1400
33151949 phaserescu B Dec. 12, 2017, 10:50 a.m. OK MS C# TESTS 33 92 11161600 1400
7375638 dimiter B Aug. 8, 2014, 11:17 a.m. OK MS C# TESTS 33 122 204800 1400
23363195 og.kostya B Dec. 27, 2016, 4:40 p.m. OK MS C# TESTS 33 122 9216000 1400
27523455 fr0st B June 2, 2017, 12:27 p.m. OK MS C# TESTS 33 124 2560000 1400
28329516 HikeNoAce B July 6, 2017, 2:38 p.m. OK MS C# TESTS 33 216 11776000 1400
3193005 wena0715 B Feb. 25, 2013, 5:36 a.m. OK MS C++ TESTS 33 15 0 1400
3071319 abhilekh04 B Feb. 4, 2013, 3:11 p.m. OK MS C++ TESTS 33 15 0 1400
3785587 juarez.paulino B May 27, 2013, 9:27 p.m. OK MS C++ TESTS 33 15 0 1400
3705881 fastholf B May 12, 2013, 12:01 p.m. OK MS C++ TESTS 33 15 0 1400
3376431 tomas.svab B March 21, 2013, 6:37 p.m. OK MS C++ TESTS 33 15 0 1400
2927801 snake13 B Jan. 15, 2013, 6:10 p.m. OK MS C++ TESTS 33 15 102400 1400
3828624 abistrigova B June 6, 2013, 4:30 p.m. OK MS C++ TESTS 33 15 409600 1400
3693703 mazurok B May 8, 2013, 10:56 a.m. OK MS C++ TESTS 33 15 7987200 1400
20365211 Mher97 B Sept. 3, 2016, 3:37 p.m. OK MS C++ TESTS 33 30 0 1400
19477855 Up-2-110H B July 29, 2016, 10:39 a.m. OK MS C++ TESTS 33 30 0 1400
56973379 2462478392 B July 13, 2019, 11:14 a.m. OK MS C++ 2017 TESTS 33 62 0 1400
64775062 vjudge5 B Nov. 13, 2019, 3:34 a.m. OK MS C++ 2017 TESTS 33 62 0 1400
49957503 iamgodiva B Feb. 15, 2019, 4:43 p.m. OK MS C++ 2017 TESTS 33 92 102400 1400
49957443 klross B Feb. 15, 2019, 4:41 p.m. OK MS C++ 2017 TESTS 33 92 102400 1400
4027231 mayakin B July 5, 2013, 2 p.m. OK PHP TESTS 33 31 307200 1400
20031345 yashar_sb_sb B Aug. 21, 2016, 5:04 p.m. OK PyPy 3 TESTS 33 248 23142400 1400
21805428 HugoSV B Oct. 26, 2016, 7:04 p.m. OK PyPy 3 TESTS 33 280 0 1400
65612200 kchau B Nov. 24, 2019, 12:10 a.m. OK PyPy 3 TESTS 33 312 0 1400
3916180 atubo B June 19, 2013, 5:41 a.m. OK Python 2 TESTS 33 46 0 1400
3165249 dr.ikros B Feb. 21, 2013, 5:33 a.m. OK Python 2 TESTS 33 46 0 1400
2974562 m1_k3 B Jan. 20, 2013, 7:07 p.m. OK Python 2 TESTS 33 46 0 1400
276039 Alexanderrrr B Feb. 6, 2011, 8:49 a.m. OK Python 2 TESTS 33 50 2764800 1400
732935 htvu B Jan. 21, 2011, 4:39 p.m. OK Python 2 TESTS 33 50 2867200 1400
543001 compales2 B July 12, 2011, 9:32 a.m. OK Python 2 TESTS 33 50 2867200 1400
277711 cuiaoxiang B Feb. 9, 2011, 1:34 p.m. OK Python 2 TESTS 33 60 2764800 1400
272046 duviteck B Jan. 31, 2011, 10:21 p.m. OK Python 2 TESTS 33 60 2764800 1400
266941 Aleksey B Jan. 28, 2011, 8:21 p.m. OK Python 2 TESTS 33 60 2764800 1400
266767 Zhuravlyov.A B Jan. 28, 2011, 2:29 p.m. OK Python 2 TESTS 33 60 2764800 1400
21875894 Sanae_L B Oct. 29, 2016, 4:09 p.m. OK Python 3 TESTS 33 122 0 1400
21828994 imaif B Oct. 27, 2016, 4:28 p.m. OK Python 3 TESTS 33 124 0 1400
21804784 LadyVador B Oct. 26, 2016, 6:44 p.m. OK Python 3 TESTS 33 124 0 1400
21774381 Mathieu41 B Oct. 25, 2016, 3:20 p.m. OK Python 3 TESTS 33 124 0 1400
21694025 puig.franciscopierre B Oct. 22, 2016, 8:55 p.m. OK Python 3 TESTS 33 124 0 1400
14828936 merolish B Dec. 16, 2015, 2:51 a.m. OK Python 3 TESTS 33 124 0 1400
13335876 kewl B Oct. 1, 2015, 8:16 p.m. OK Python 3 TESTS 33 124 0 1400
5272509 yugle7 B Nov. 27, 2013, 1:15 p.m. OK Python 3 TESTS 33 124 0 1400
15184926 Passenger B Jan. 4, 2016, 7:31 p.m. OK Python 3 TESTS 33 124 204800 1400
5040302 agnusmaximus B Nov. 10, 2013, 6:47 a.m. OK Python 3 TESTS 33 124 307200 1400
344225 Fixeg B March 19, 2011, 5:29 p.m. OK Ruby TESTS 33 80 3993600 1400
273392 Wahba B Feb. 2, 2011, 11:25 a.m. OK Ruby TESTS 33 90 3072000 1400
768039 K_operafan B Oct. 15, 2011, 9:37 a.m. OK Ruby TESTS 33 90 3686400 1400
23190803 karthickpdy B Dec. 21, 2016, 4:18 a.m. OK Ruby TESTS 33 186 6553600 1400

remove filters

Back to search problems