Codeforces Round 277.5 (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
489 Codeforces Round 277.5 (Div. 2) FINISHED False 9000 321373504 Nov. 17, 2014, 3:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 10152 ) A SwapSort PROGRAMMING greedy implementation sortings 1300

B'In this problem your goal is to sort an array consisting of n integers in at most n swaps. For the given array find the sequence of swaps that makes the array sorted in the non-descending order. Swaps are performed consecutively, one after another. Note that in this problem you do not have to minimize the number of swaps -- your task is to find any sequence that is no longer than n. The first line of the input contains integer n (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x893000) -- the number of array elements. The second line contains elements of array: a0, xe2 x80 x89a1, xe2 x80 x89..., xe2 x80 x89an xe2 x80 x89- xe2 x80 x891 ( xe2 x80 x89- xe2 x80 x89109 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89ai xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89109), where ai is the i-th element of the array. The elements are numerated from 0 to n xe2 x80 x89- xe2 x80 x891 from left to right. Some integers may appear in the array more than once. In the first line print k (0 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89k xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n) -- the number of swaps. Next k lines must contain the descriptions of the k swaps, one per line. Each swap should be printed as a pair of integers i, j (0 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89i, xe2 x80 x89j xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89- xe2 x80 x891), representing the swap of elements ai and aj. You can print indices in the pairs in any order. The swaps are performed in the order they appear in the output, from the first to the last. It is allowed to print i xe2 x80 x89= xe2 x80 x89j and swap the same pair of elements multiple times. If there are multiple answers, print any of them. It is guaranteed that at least one answer exists.'...

Tutorials

Codeforces Round #277.5 (Div. 2) Editorial [A-D for now]

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
58395856 hatsuyuki15 A Aug. 6, 2019, 3:35 p.m. OK D TESTS 22 46 0 1300
41568641 RAhim A Aug. 13, 2018, 7:17 p.m. OK GNU C++ TESTS 22 31 0 1300
40987655 ReaLNero1 A July 30, 2018, 9:24 p.m. OK GNU C++ TESTS 22 31 0 1300
41390066 vjudge3 A Aug. 9, 2018, 8 a.m. OK GNU C++ TESTS 22 31 102400 1300
41384074 vjudge1 A Aug. 9, 2018, 4:25 a.m. OK GNU C++ TESTS 22 31 102400 1300
42092255 vjudge3 A Aug. 25, 2018, 1:56 p.m. OK GNU C++ TESTS 22 31 72192000 1300
41568566 RAhim A Aug. 13, 2018, 7:14 p.m. OK GNU C++ TESTS 22 46 0 1300
41387213 vjudge4 A Aug. 9, 2018, 6:37 a.m. OK GNU C++ TESTS 22 46 102400 1300
40556265 Byakko A July 19, 2018, 6:18 p.m. OK GNU C++ TESTS 22 46 102400 1300
41392343 vjudge3 A Aug. 9, 2018, 9:04 a.m. OK GNU C++ TESTS 22 46 409600 1300
42255903 vjudge2 A Aug. 29, 2018, 9:06 p.m. OK GNU C++ TESTS 22 46 72192000 1300
52739042 Mahi812 A April 14, 2019, 7:58 a.m. OK GNU C11 TESTS 22 31 0 1300
54667285 You_Know_Who A May 26, 2019, 2:07 p.m. OK GNU C11 TESTS 22 31 0 1300
60337837 vjudge1 A Sept. 10, 2019, 9:24 a.m. OK GNU C11 TESTS 22 31 0 1300
60413787 kaiboy A Sept. 12, 2019, 12:24 a.m. OK GNU C11 TESTS 22 31 0 1300
62432034 vjudge4 A Oct. 12, 2019, 4:08 p.m. OK GNU C11 TESTS 22 31 0 1300
52819675 Aa23 A April 16, 2019, 11:22 a.m. OK GNU C11 TESTS 22 46 0 1300
43866909 Tanjim49 A Oct. 5, 2018, 6:27 p.m. OK GNU C11 TESTS 22 46 0 1300
60406823 kaiboy A Sept. 11, 2019, 7:03 p.m. OK GNU C11 TESTS 22 46 102400 1300
46677912 artemis2 A Dec. 6, 2018, 10:47 a.m. OK GNU C11 TESTS 22 46 102400 1300
53425768 MQstafa A April 27, 2019, 1:31 p.m. OK GNU C11 TESTS 22 46 71987200 1300
59698273 strawberrry A Aug. 30, 2019, 9:31 a.m. OK GNU C++11 TESTS 22 30 102400 1300
49361318 N0ne_ A Feb. 2, 2019, 1 p.m. OK GNU C++11 TESTS 22 31 0 1300
48561880 bk222 A Jan. 19, 2019, 7:43 a.m. OK GNU C++11 TESTS 22 31 0 1300
47351777 AuroraPrz1809 A Dec. 22, 2018, 3:29 a.m. OK GNU C++11 TESTS 22 31 0 1300
62131791 vjudge2 A Oct. 8, 2019, 3:08 p.m. OK GNU C++11 TESTS 22 31 0 1300
62243264 vjudge4 A Oct. 10, 2019, 2:59 a.m. OK GNU C++11 TESTS 22 31 0 1300
62244215 vjudge4 A Oct. 10, 2019, 4:07 a.m. OK GNU C++11 TESTS 22 31 0 1300
69005107 return01 A Jan. 17, 2020, 10:23 p.m. OK GNU C++11 TESTS 22 31 0 1300
70001005 futa A Feb. 2, 2020, 1:36 a.m. OK GNU C++11 TESTS 22 31 0 1300
62056758 vjudge2 A Oct. 7, 2019, 12:20 p.m. OK GNU C++11 TESTS 22 31 0 1300
54886384 DurjOy A May 31, 2019, 5:33 p.m. OK GNU C++14 TESTS 22 15 0 1300
42234286 avuu A Aug. 29, 2018, 8:36 a.m. OK GNU C++14 TESTS 22 15 102400 1300
61384295 Omar.Yasser A Sept. 27, 2019, 6:29 p.m. OK GNU C++14 TESTS 22 15 102400 1300
41431479 devil_itself A Aug. 10, 2018, 12:50 p.m. OK GNU C++14 TESTS 22 15 102400 1300
67584945 jajajajajaja A Dec. 25, 2019, 7:53 a.m. OK GNU C++14 TESTS 22 15 307200 1300
67584793 jajajajajaja A Dec. 25, 2019, 7:50 a.m. OK GNU C++14 TESTS 22 15 307200 1300
39697081 LODB---D A June 27, 2018, 9:28 a.m. OK GNU C++14 TESTS 22 15 921600 1300
44103821 vjudge2 A Oct. 11, 2018, 7:58 a.m. OK GNU C++14 TESTS 22 30 0 1300
48575932 maet98 A Jan. 19, 2019, 2:03 p.m. OK GNU C++14 TESTS 22 30 102400 1300
55416543 landcold7 A June 11, 2019, 2:55 a.m. OK GNU C++14 TESTS 22 30 102400 1300
48091198 ICL A Jan. 8, 2019, 1:55 p.m. OK GNU C++17 TESTS 22 15 0 1300
54833466 vjudge3 A May 30, 2019, 9:51 a.m. OK GNU C++17 TESTS 22 15 0 1300
58146339 ScarletS A Aug. 1, 2019, 9:41 p.m. OK GNU C++17 TESTS 22 15 102400 1300
60473963 Abugozah A Sept. 13, 2019, 7:04 a.m. OK GNU C++17 TESTS 22 15 102400 1300
69292283 thnkdiff A Jan. 22, 2020, 10:46 a.m. OK GNU C++17 TESTS 22 15 102400 1300
50246861 hmzsalem39 A Feb. 20, 2019, 3:20 p.m. OK GNU C++17 TESTS 22 15 102400 1300
55431701 Arsenal_FC A June 11, 2019, 11:45 a.m. OK GNU C++17 TESTS 22 15 204800 1300
40709300 Dasha_Gnedko A July 24, 2018, 2:56 p.m. OK GNU C++17 TESTS 22 30 102400 1300
54483933 tomsyd A May 22, 2019, 12:14 p.m. OK GNU C++17 TESTS 22 30 102400 1300
57643480 lee-jinhen A July 24, 2019, 1:25 p.m. OK GNU C++17 TESTS 22 30 204800 1300
50261376 Ahmed..Adel..Selim A Feb. 21, 2019, 1:08 a.m. OK Java 8 TESTS 22 109 0 1300
58403082 Jetch A Aug. 6, 2019, 6:50 p.m. OK Java 8 TESTS 22 124 0 1300
40319503 Ahmad-Abusbeih A July 14, 2018, 1 p.m. OK Java 8 TESTS 22 124 0 1300
40150020 MoeAdel A July 9, 2018, 7:51 p.m. OK Java 8 TESTS 22 124 0 1300
54797475 Ikari_stream A May 29, 2019, 10:21 a.m. OK Java 8 TESTS 22 140 0 1300
40888010 Naman_123 A July 28, 2018, 1:56 p.m. OK Java 8 TESTS 22 140 0 1300
40072104 YahiaBadr A July 8, 2018, 12:04 a.m. OK Java 8 TESTS 22 140 0 1300
64773379 vjudge5 A Nov. 13, 2019, 2:06 a.m. OK Java 8 TESTS 22 155 0 1300
64772894 vjudge2 A Nov. 13, 2019, 1:41 a.m. OK Java 8 TESTS 22 155 0 1300
63873499 sahiltakkar A Oct. 30, 2019, 6:14 p.m. OK Java 8 TESTS 22 155 0 1300
61797157 david_varela A Oct. 3, 2019, 5:38 p.m. OK Kotlin TESTS 22 170 1228800 1300
61797391 david_varela A Oct. 3, 2019, 5:43 p.m. OK Kotlin TESTS 22 186 1228800 1300
50553394 aziz.enginr A Feb. 27, 2019, 6:24 a.m. OK Mono C# TESTS 22 62 614400 1300
44524109 nemars A Oct. 18, 2018, 11:55 p.m. OK Mono C# TESTS 22 62 4505600 1300
44063305 vjudge5 A Oct. 10, 2018, 7:30 a.m. OK MS C++ TESTS 22 30 0 1300
62342912 vjudge3 A Oct. 11, 2019, 6:08 a.m. OK MS C++ TESTS 22 31 0 1300
62243235 vjudge4 A Oct. 10, 2019, 2:58 a.m. OK MS C++ TESTS 22 31 0 1300
62089804 vjudge3 A Oct. 8, 2019, 4:58 a.m. OK MS C++ TESTS 22 31 0 1300
64061581 vjudge3 A Nov. 2, 2019, 4:06 a.m. OK MS C++ TESTS 22 31 0 1300
62061148 vjudge1 A Oct. 7, 2019, 1:41 p.m. OK MS C++ TESTS 22 31 0 1300
62057769 vjudge1 A Oct. 7, 2019, 12:39 p.m. OK MS C++ TESTS 22 31 0 1300
44079276 vjudge1 A Oct. 10, 2018, 2:21 p.m. OK MS C++ TESTS 22 31 0 1300
62088059 vjudge3 A Oct. 8, 2019, 3:48 a.m. OK MS C++ TESTS 22 31 0 1300
63481514 vjudge5 A Oct. 26, 2019, 12:52 p.m. OK MS C++ TESTS 22 31 0 1300
62355497 vjudge5 A Oct. 11, 2019, 10:51 a.m. OK MS C++ 2017 TESTS 22 30 102400 1300
57600285 CtrlAlt A July 23, 2019, 3:31 p.m. OK MS C++ 2017 TESTS 22 46 0 1300
57338643 raj1307 A July 19, 2019, 5:22 p.m. OK PyPy 2 TESTS 22 171 2560000 1300
50229693 ashok123 A Feb. 20, 2019, 8:41 a.m. OK PyPy 2 TESTS 22 265 2150400 1300
54743655 shiv1470 A May 28, 2019, 9:24 a.m. OK PyPy 3 TESTS 22 155 2764800 1300
55980884 scheduler A June 23, 2019, 8:54 p.m. OK PyPy 3 TESTS 22 171 3686400 1300
56266387 ParsaBahrami A June 29, 2019, 10:04 a.m. OK PyPy 3 TESTS 22 186 4505600 1300
59352168 rjv A Aug. 23, 2019, 12:13 p.m. OK PyPy 3 TESTS 22 187 4096000 1300
64497155 vjudge5 A Nov. 8, 2019, 1 a.m. OK PyPy 3 TESTS 22 202 4812800 1300
64362629 AvinashKartik A Nov. 6, 2019, 12:08 p.m. OK PyPy 3 TESTS 22 217 4915200 1300
43490471 Beyond_Zilch A Sept. 27, 2018, 12:23 p.m. OK PyPy 3 TESTS 22 436 4198400 1300
42275697 franckmy A Aug. 30, 2018, 11:19 a.m. OK Python 2 TESTS 22 296 614400 1300
54743741 SoSooding A May 28, 2019, 9:27 a.m. OK Python 2 TESTS 22 701 614400 1300
50229705 ashok123 A Feb. 20, 2019, 8:41 a.m. OK Python 2 TESTS 22 748 307200 1300
54085513 MajAK A May 14, 2019, 7:06 a.m. OK Python 3 TESTS 22 139 921600 1300
47482650 xumouyi A Dec. 25, 2018, 6:26 a.m. OK Python 3 TESTS 22 140 921600 1300
41550726 Maaddy A Aug. 13, 2018, 8:06 a.m. OK Python 3 TESTS 22 170 614400 1300
55998210 code_code_code A June 24, 2019, 11:40 a.m. OK Python 3 TESTS 22 171 921600 1300
48784628 mame_is_me A Jan. 23, 2019, 8:23 a.m. OK Python 3 TESTS 22 202 819200 1300
48694464 Andras675 A Jan. 21, 2019, 7:56 p.m. OK Python 3 TESTS 22 233 1331200 1300
65530271 virajudaysingh A Nov. 22, 2019, 12:09 p.m. OK Python 3 TESTS 22 249 1228800 1300
53478863 Sevlll A April 28, 2019, 5:49 p.m. OK Python 3 TESTS 22 265 1024000 1300
42005711 Mk_Python_v1 A Aug. 23, 2018, 6:17 p.m. OK Python 3 TESTS 22 296 716800 1300
40540515 Elvis25 A July 19, 2018, 8:23 a.m. OK Python 3 TESTS 22 296 716800 1300

remove filters

Back to search problems