Codeforces Round 153 (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
252 Codeforces Round 153 (Div. 2) FINISHED False 7200 382631387 Dec. 6, 2012, 3:30 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 1729 ) B Unsorting Array PROGRAMMING brute force sortings 1700

B"Little Petya likes arrays of integers a lot. Recently his mother has presented him one such array consisting of n elements. Petya is now wondering whether he can swap any two distinct integers in the array so that the array got unsorted. Please note that Petya can not swap equal integers even if they are in distinct positions in the array. Also note that Petya must swap some two integers even if the original array meets all requirements. Array a (the array elements are indexed from 1) consisting of n elements is called sorted if it meets at least one of the following two conditions: Help Petya find the two required positions to swap or else say that they do not exist. The first line contains a single integer n (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89105). The second line contains n non-negative space-separated integers a1, xe2 x80 x89a2, xe2 x80 x89..., xe2 x80 x89an -- the elements of the array that Petya's mother presented him. All integers in the input do not exceed 109. If there is a pair of positions that make the array unsorted if swapped, then print the numbers of these positions separated by a space. If there are several pairs of positions, print any of them. If such pair does not exist, print -1. The positions in the array are numbered with integers from 1 to n. In the first two samples the required pairs obviously don't exist. In the third sample you can swap the first two elements. After that the array will look like this: 2 1 3 4. This array is unsorted."...

Tutorials

Editorial of Codeforces Round #153

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
2713773 arukuka B Dec. 7, 2012, 6:38 a.m. OK D TESTS 58 218 10649600 1700
2927781 wasyapetya B Jan. 15, 2013, 5:58 p.m. OK Delphi TESTS 58 46 409600 1700
2824994 Nevedaren B Dec. 25, 2012, 8:42 a.m. OK Delphi TESTS 58 46 409600 1700
3110851 AHTuTTuTyX B Feb. 13, 2013, 8:42 a.m. OK Delphi TESTS 58 46 409600 1700
2711215 Misha100896 B Dec. 6, 2012, 8:05 p.m. OK Delphi TESTS 58 46 409600 1700
2711202 Ocean1001 B Dec. 6, 2012, 8:04 p.m. OK Delphi TESTS 58 46 409600 1700
2754082 sha384 B Dec. 12, 2012, 10:40 a.m. OK Delphi TESTS 58 46 512000 1700
2749973 AleksanderBalobanov B Dec. 11, 2012, 7:31 a.m. OK Delphi TESTS 58 46 512000 1700
2717749 Depool B Dec. 7, 2012, 7:56 p.m. OK Delphi TESTS 58 46 512000 1700
2703114 Frommi B Dec. 6, 2012, 3:55 p.m. OK Delphi TESTS 58 46 512000 1700
2702791 pufff B Dec. 6, 2012, 3:51 p.m. OK Delphi TESTS 58 46 512000 1700
2716401 alex700 B Dec. 7, 2012, 2:45 p.m. OK FPC TESTS 58 46 102400 1700
2705253 studytolive B Dec. 6, 2012, 4:20 p.m. OK FPC TESTS 58 46 409600 1700
2907761 Sherbina_Evgeniy B Jan. 12, 2013, 12:50 p.m. OK FPC TESTS 58 46 409600 1700
2715229 guguna1998 B Dec. 7, 2012, 11:25 a.m. OK FPC TESTS 58 46 409600 1700
2706969 betapboi95 B Dec. 6, 2012, 4:43 p.m. OK FPC TESTS 58 46 409600 1700
2715622 turkmen B Dec. 7, 2012, 12:36 p.m. OK FPC TESTS 58 46 512000 1700
2714893 yoihito B Dec. 7, 2012, 10:20 a.m. OK FPC TESTS 58 46 3993600 1700
2805902 android_andrei B Dec. 22, 2012, 8:16 a.m. OK FPC TESTS 58 46 32051200 1700
2799322 Conan B Dec. 20, 2012, 4:18 p.m. OK FPC TESTS 58 46 32051200 1700
2799041 sirdat_LS B Dec. 20, 2012, 2:35 p.m. OK FPC TESTS 58 46 32051200 1700
4105839 honeyslawyer31 B July 19, 2013, 12:13 p.m. OK GNU C TESTS 58 46 409600 1700
4105789 picaso B July 19, 2013, 12:05 p.m. OK GNU C TESTS 58 46 409600 1700
4105782 honeyslawyer31 B July 19, 2013, 12:04 p.m. OK GNU C TESTS 58 46 409600 1700
4105333 picaso B July 19, 2013, 12:02 p.m. OK GNU C TESTS 58 46 409600 1700
4105154 honeyslawyer31 B July 19, 2013, 11:43 a.m. OK GNU C TESTS 58 46 409600 1700
4104293 honeyslawyer31 B July 19, 2013, 10:55 a.m. OK GNU C TESTS 58 46 409600 1700
4000811 gct B July 1, 2013, 6:29 p.m. OK GNU C TESTS 58 46 409600 1700
2803272 sarveshmahajan B Dec. 21, 2012, 11:26 a.m. OK GNU C TESTS 58 46 409600 1700
3644013 vjudge1 B April 27, 2013, 2:37 p.m. OK GNU C TESTS 58 46 614400 1700
6544939 vjudge5 B May 4, 2014, 2:17 p.m. OK GNU C TESTS 58 62 409600 1700
4189294 Dimi B July 27, 2013, 1:07 p.m. OK GNU C++ TESTS 58 30 409600 1700
2794086 Css B Dec. 19, 2012, 10:15 a.m. OK GNU C++ TESTS 58 31 0 1700
3409508 ycid B March 26, 2013, 7:07 p.m. OK GNU C++ TESTS 58 31 409600 1700
4921494 Zzyzx B Oct. 28, 2013, 2:42 p.m. OK GNU C++ TESTS 58 31 1024000 1700
2794107 Css B Dec. 19, 2012, 10:21 a.m. OK GNU C++ TESTS 58 46 0 1700
2794057 Css B Dec. 19, 2012, 10:07 a.m. OK GNU C++ TESTS 58 46 0 1700
2794048 Css B Dec. 19, 2012, 10:02 a.m. OK GNU C++ TESTS 58 46 0 1700
2794091 Css B Dec. 19, 2012, 10:17 a.m. OK GNU C++ TESTS 58 46 0 1700
2796714 Css B Dec. 20, 2012, 4:19 a.m. OK GNU C++ TESTS 58 46 0 1700
2794252 Css B Dec. 19, 2012, 10:57 a.m. OK GNU C++ TESTS 58 46 0 1700
2796838 PinkieDashForever B Dec. 20, 2012, 5:32 a.m. OK GNU C++0x TESTS 58 46 409600 1700
2796830 PinkieDashForever B Dec. 20, 2012, 5:30 a.m. OK GNU C++0x TESTS 58 46 409600 1700
2711097 Xerxes B Dec. 6, 2012, 7:56 p.m. OK GNU C++0x TESTS 58 46 1228800 1700
2707025 rofer B Dec. 6, 2012, 4:44 p.m. OK GNU C++0x TESTS 58 62 0 1700
2713205 rexim B Dec. 7, 2012, 4:52 a.m. OK GNU C++0x TESTS 58 62 409600 1700
10253978 No_Use_Anymore B March 13, 2015, 5:59 a.m. OK GNU C++0x TESTS 58 62 409600 1700
5470312 vjudge2 B Dec. 18, 2013, 7:12 p.m. OK GNU C++0x TESTS 58 62 409600 1700
2711010 Xerxes B Dec. 6, 2012, 7:50 p.m. OK GNU C++0x TESTS 58 62 1228800 1700
2716870 masibonge B Dec. 7, 2012, 4:14 p.m. OK GNU C++0x TESTS 58 62 2048000 1700
6026400 isurugieri B March 16, 2014, 10:46 a.m. OK GNU C++0x TESTS 58 62 2457600 1700
18343103 anothervjudge B June 9, 2016, 2:29 p.m. OK GNU C11 TESTS 58 92 3276800 1700
14639931 bill_kondo B Dec. 3, 2015, 9 p.m. OK GNU C++11 TESTS 58 62 409600 1700
27270454 Momentaiii B May 21, 2017, 4:14 p.m. OK GNU C++11 TESTS 58 62 409600 1700
27102256 bagpipe B May 14, 2017, 7:24 a.m. OK GNU C++11 TESTS 58 62 614400 1700
20814447 Freedom B Sept. 22, 2016, 10:22 a.m. OK GNU C++11 TESTS 58 62 819200 1700
14138633 KK_ncv91 B Nov. 8, 2015, 9:32 a.m. OK GNU C++11 TESTS 58 62 921600 1700
18639259 vj98 B June 22, 2016, 2:26 a.m. OK GNU C++11 TESTS 58 62 1024000 1700
32525252 wozuinb2 B Nov. 21, 2017, 12:35 p.m. OK GNU C++11 TESTS 58 62 1228800 1700
17129513 freebsdx B April 2, 2016, 11:59 a.m. OK GNU C++11 TESTS 58 62 2457600 1700
19658242 FLEXer B Aug. 5, 2016, 8:22 p.m. OK GNU C++11 TESTS 58 62 2560000 1700
19766701 aka.Foda B Aug. 10, 2016, 1:44 p.m. OK GNU C++11 TESTS 58 62 3276800 1700
58897751 vjudge2 B Aug. 16, 2019, 8:09 a.m. OK GNU C++14 TESTS 58 92 409600 1700
44544910 vjudge1 B Oct. 19, 2018, 1:05 p.m. OK GNU C++14 TESTS 58 92 409600 1700
30483118 rdiachenko B Sept. 18, 2017, 7:25 p.m. OK GNU C++14 TESTS 58 92 409600 1700
54386371 sabertooth B May 19, 2019, 1:37 p.m. OK GNU C++14 TESTS 58 92 614400 1700
58536531 vjudge5 B Aug. 10, 2019, 12:09 p.m. OK GNU C++14 TESTS 58 92 819200 1700
52482098 --__-1-___-4-___-3-__-- B April 8, 2019, 6:21 a.m. OK GNU C++14 TESTS 58 92 819200 1700
58651517 vjudge5 B Aug. 12, 2019, 7:39 a.m. OK GNU C++14 TESTS 58 92 819200 1700
54397502 Kar98k B May 19, 2019, 9:43 p.m. OK GNU C++14 TESTS 58 92 1638400 1700
32859701 I_Love_Nova B Dec. 2, 2017, 1:49 p.m. OK GNU C++14 TESTS 58 92 2252800 1700
34160357 dionysios B Jan. 13, 2018, 7:30 p.m. OK GNU C++14 TESTS 58 92 2355200 1700
40540156 WhiteCrow B July 19, 2018, 8:13 a.m. OK GNU C++17 TESTS 58 92 409600 1700
44413824 CodeBreaker_6 B Oct. 16, 2018, 6:01 p.m. OK GNU C++17 TESTS 58 92 716800 1700
69645073 tnakao B Jan. 28, 2020, 12:20 a.m. OK GNU C++17 TESTS 58 92 819200 1700
58535315 vjudge3 B Aug. 10, 2019, 11:35 a.m. OK GNU C++17 TESTS 58 92 1228800 1700
42788512 Sanitator B Sept. 12, 2018, 6:38 a.m. OK GNU C++17 TESTS 58 122 819200 1700
53685169 yuhta B May 2, 2019, 11:41 p.m. OK GNU C++17 TESTS 58 122 819200 1700
48773897 viethuy99 B Jan. 23, 2019, 2:35 a.m. OK GNU C++17 TESTS 58 122 1024000 1700
69248083 IbraheemJanajreh B Jan. 21, 2020, 1:29 p.m. OK GNU C++17 TESTS 58 122 1228800 1700
58537004 vjudge2 B Aug. 10, 2019, 12:20 p.m. OK GNU C++17 TESTS 58 122 1228800 1700
69267643 SondoS-JaRRaR B Jan. 21, 2020, 7:16 p.m. OK GNU C++17 TESTS 58 122 1228800 1700
8531055 Eeyore B Nov. 3, 2014, 4:47 a.m. OK Go TESTS 58 92 1228800 1700
2711194 cojna B Dec. 6, 2012, 8:04 p.m. OK Haskell TESTS 58 62 1638400 1700
33181913 sighingnow B Dec. 12, 2017, 4:27 p.m. OK Haskell TESTS 58 62 54374400 1700
2712168 vanchope B Dec. 7, 2012, 12:19 a.m. OK Java 6 TESTS 58 125 21401600 1700
2712081 vanchope B Dec. 6, 2012, 11:48 p.m. OK Java 6 TESTS 58 125 21401600 1700
2705228 gh_ost B Dec. 6, 2012, 4:20 p.m. OK Java 6 TESTS 58 140 0 1700
2704693 lightning B Dec. 6, 2012, 4:14 p.m. OK Java 6 TESTS 58 140 0 1700
2714501 Wahba B Dec. 7, 2012, 9:03 a.m. OK Java 6 TESTS 58 156 0 1700
2711332 wcp1231 B Dec. 6, 2012, 8:19 p.m. OK Java 6 TESTS 58 156 0 1700
2710785 gh_ost B Dec. 6, 2012, 7:37 p.m. OK Java 6 TESTS 58 156 0 1700
2708133 SharpBlade B Dec. 6, 2012, 5 p.m. OK Java 6 TESTS 58 156 0 1700
3226194 zulkan B March 1, 2013, 4:10 p.m. OK Java 6 TESTS 58 156 102400 1700
4086956 mkirsche B July 17, 2013, 1:11 p.m. OK Java 6 TESTS 58 156 204800 1700
2710879 trunghieu11 B Dec. 6, 2012, 7:41 p.m. OK Java 7 TESTS 58 109 102400 1700
3062379 vjudge1 B Feb. 2, 2013, 7:51 a.m. OK Java 7 TESTS 58 125 0 1700
3017540 ocelopilli B Jan. 27, 2013, 7:46 p.m. OK Java 7 TESTS 58 125 0 1700
2707482 yasser_adel B Dec. 6, 2012, 4:51 p.m. OK Java 7 TESTS 58 140 0 1700
2703788 RussianObama B Dec. 6, 2012, 4:03 p.m. OK Java 7 TESTS 58 140 0 1700
3199847 unit7 B Feb. 26, 2013, 5:17 p.m. OK Java 7 TESTS 58 140 102400 1700
2708050 andreyrmg B Dec. 6, 2012, 4:59 p.m. OK Java 7 TESTS 58 140 102400 1700
2711560 balazstx B Dec. 6, 2012, 8:54 p.m. OK Java 7 TESTS 58 140 204800 1700
2731372 gkiko B Dec. 8, 2012, 6:52 p.m. OK Java 7 TESTS 58 156 0 1700
2712860 acmer179 B Dec. 7, 2012, 3:39 a.m. OK Java 7 TESTS 58 156 0 1700
12325085 pmarecki B Aug. 3, 2015, 11:25 a.m. OK Java 8 TESTS 58 280 0 1700
25685734 Noureldin B March 21, 2017, 10:32 a.m. OK Java 8 TESTS 58 280 20684800 1700
40845382 Md_Ibrahim_Khan B July 27, 2018, 11:45 a.m. OK Java 8 TESTS 58 312 0 1700
13323753 MedoN11 B Oct. 1, 2015, midnight OK Java 8 TESTS 58 340 0 1700
13323756 MedoN11 B Oct. 1, 2015, 12:01 a.m. OK Java 8 TESTS 58 342 0 1700
43801917 ShowStopper728 B Oct. 4, 2018, 5:46 p.m. OK Java 8 TESTS 58 372 0 1700
27962812 kocko B June 22, 2017, 10:39 a.m. OK Java 8 TESTS 58 374 22220800 1700
27955905 kaseik B June 22, 2017, 2:59 a.m. OK Java 8 TESTS 58 466 20684800 1700
13356539 flk B Oct. 3, 2015, 9:41 a.m. OK Java 8 TESTS 58 622 0 1700
7823132 Alexey_Nikitin B Sept. 18, 2014, 5:59 a.m. OK Java 8 TESTS 58 622 819200 1700
2909954 dwoolley3 B Jan. 13, 2013, 3:13 a.m. OK Mono C# TESTS 58 62 13721600 1700
2761820 harhrayr B Dec. 13, 2012, 8:21 p.m. OK Mono C# TESTS 58 109 307200 1700
2953005 jonyrock B Jan. 17, 2013, 2:15 p.m. OK Mono C# TESTS 58 109 16281600 1700
4328483 k1nval B Aug. 23, 2013, 9:49 a.m. OK MS C# TESTS 58 156 13209600 1700
5231206 marat.snowbear B Nov. 24, 2013, 9:22 p.m. OK MS C# TESTS 58 186 20377600 1700
2714226 -Emilchess- B Dec. 7, 2012, 8:14 a.m. OK MS C++ TESTS 58 46 409600 1700
2802987 gotoac B Dec. 21, 2012, 9:55 a.m. OK MS C++ TESTS 58 46 409600 1700
2789419 vas.and.tor B Dec. 18, 2012, 4:03 a.m. OK MS C++ TESTS 58 46 409600 1700
3749429 zmryyj B May 20, 2013, 10:53 a.m. OK MS C++ TESTS 58 46 409600 1700
2712459 mola.mola B Dec. 7, 2012, 2:29 a.m. OK MS C++ TESTS 58 46 4403200 1700
4209185 xin5739 B July 31, 2013, 12:21 p.m. OK MS C++ TESTS 58 62 307200 1700
5354219 lihaitao B Dec. 5, 2013, 1:08 p.m. OK MS C++ TESTS 58 62 307200 1700
5354194 lihaitao B Dec. 5, 2013, 1:04 p.m. OK MS C++ TESTS 58 62 307200 1700
2718865 Stolyarov B Dec. 8, 2012, 7:46 a.m. OK MS C++ TESTS 58 62 409600 1700
2752795 ztimin B Dec. 11, 2012, 10:54 p.m. OK MS C++ TESTS 58 62 409600 1700
69403563 vjudge5 B Jan. 23, 2020, 10:02 a.m. OK MS C++ 2017 TESTS 58 218 2867200 1700
54075473 Still_Theory B May 13, 2019, 7:32 p.m. OK MS C++ 2017 TESTS 58 278 3993600 1700
2711813 Darooha B Dec. 6, 2012, 9:40 p.m. OK Ocaml TESTS 58 93 3276800 1700
11767689 poikniok B June 26, 2015, 2:41 a.m. OK PyPy 3 TESTS 58 436 10444800 1700
47878002 Beyond_Zilch B Jan. 3, 2019, 4:34 p.m. OK PyPy 3 TESTS 58 436 16793600 1700
2792636 alexey.enkov B Dec. 18, 2012, 11:18 p.m. OK Python 2 TESTS 58 140 5734400 1700
2827367 joshuahmaynez B Dec. 25, 2012, 11:42 p.m. OK Python 2 TESTS 58 156 5632000 1700
2792623 alexey.enkov B Dec. 18, 2012, 11:01 p.m. OK Python 2 TESTS 58 156 5734400 1700
2706595 hota911 B Dec. 6, 2012, 4:38 p.m. OK Python 2 TESTS 58 203 5836800 1700
2981450 tux1986 B Jan. 21, 2013, 10:10 p.m. OK Python 2 TESTS 58 203 6553600 1700
3142623 m1_k3 B Feb. 18, 2013, 9:27 a.m. OK Python 2 TESTS 58 203 7782400 1700
3953839 Neil B June 24, 2013, 4:50 a.m. OK Python 2 TESTS 58 218 5836800 1700
3173889 vlad107 B Feb. 22, 2013, 7:17 p.m. OK Python 2 TESTS 58 218 6144000 1700
5489951 Stomach_ache B Dec. 22, 2013, 3:01 a.m. OK Python 2 TESTS 58 248 6246400 1700
2743201 KBRCH B Dec. 9, 2012, 2:53 p.m. OK Python 2 TESTS 58 265 5427200 1700
11767697 poikniok B June 26, 2015, 2:42 a.m. OK Python 3 TESTS 58 248 8499200 1700
11767692 poikniok B June 26, 2015, 2:42 a.m. OK Python 3 TESTS 58 248 8499200 1700
5397703 yugle7 B Dec. 9, 2013, 2:32 p.m. OK Python 3 TESTS 58 248 9216000 1700
48783231 uknowGrenore B Jan. 23, 2019, 7:42 a.m. OK Python 3 TESTS 58 342 8396800 1700
42124223 Mk_Python_v1 B Aug. 26, 2018, 2:09 p.m. OK Python 3 TESTS 58 342 8396800 1700
8531076 Eeyore B Nov. 3, 2014, 4:52 a.m. OK Python 3 TESTS 58 374 8499200 1700
40775981 yura200253 B July 26, 2018, 11:21 a.m. OK Python 3 TESTS 58 434 8192000 1700
54227354 Mohamed_Ayman B May 16, 2019, 7:03 a.m. OK Python 3 TESTS 58 436 8499200 1700
51815869 ashok123 B March 25, 2019, 9:08 a.m. OK Python 3 TESTS 58 466 8396800 1700
51815852 ashok123 B March 25, 2019, 9:07 a.m. OK Python 3 TESTS 58 466 8396800 1700
3818866 delta_4d B June 3, 2013, 1:18 p.m. OK Ruby TESTS 58 359 6553600 1700
2954003 YoriK B Jan. 17, 2013, 5:56 p.m. OK Ruby TESTS 58 687 7680000 1700
12890165 M.Sabra B Sept. 7, 2015, 9:05 p.m. OK Ruby TESTS 58 748 17920000 1700
12714001 M.Sabra B Aug. 27, 2015, 12:53 a.m. OK Ruby TESTS 58 778 17920000 1700
3141296 peking2 B Feb. 17, 2013, 5:44 p.m. OK Scala TESTS 58 468 614400 1700
3141285 peking2 B Feb. 17, 2013, 5:40 p.m. OK Scala TESTS 58 484 614400 1700
3141339 peking2 B Feb. 17, 2013, 5:55 p.m. OK Scala TESTS 58 514 614400 1700

remove filters

Back to search problems