Codeforces Round 335 (Div. 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
605 Codeforces Round 335 (Div. 1) FINISHED False 7200 287934904 Dec. 9, 2015, 4:05 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 7205 ) A Sorting Railway Cars PROGRAMMING constructive algorithms greedy 1600

B'An infinitely long railway has a train consisting of n cars, numbered from 1 to n (the numbers of all the cars are distinct) and positioned in arbitrary order. David Blaine wants to sort the railway cars in the order of increasing numbers. In one move he can make one of the cars disappear from its place and teleport it either to the beginning of the train, or to the end of the train, at his desire. What is the minimum number of actions David Blaine needs to perform in order to sort the train? 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 x89100 xe2 x80 x89000) -- the number of cars in the train. The second line contains n integers pi (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89pi xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n, pi xe2 x80 x89 xe2 x89 xa0 xe2 x80 x89pj if i xe2 x80 x89 xe2 x89 xa0 xe2 x80 x89j) -- the sequence of the numbers of the cars in the train. Print a single integer -- the minimum number of actions needed to sort the railway cars. In the first sample you need first to teleport the 4-th car, and then the 5-th car to the end of the train.'...

Tutorials

Codeforces Round #335 Problem Analysis

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
50653920 vjudge5 A March 1, 2019, 6:44 p.m. OK Clang++17 Diagnostics TESTS 66 436 409600 1600
14716177 Gassa A Dec. 9, 2015, 4:10 p.m. OK D TESTS 66 46 4198400 1600
14875578 EvieOneLove A Dec. 19, 2015, 12:38 p.m. OK Delphi TESTS 66 31 409600 1600
14764541 zero1778 A Dec. 11, 2015, 7:06 p.m. OK FPC TESTS 66 30 409600 1600
14782520 luckystars A Dec. 13, 2015, 9:14 a.m. OK FPC TESTS 66 30 512000 1600
15640019 MaRos A Jan. 29, 2016, 5:56 a.m. OK FPC TESTS 66 30 3993600 1600
14921142 huansuz_funs_club A Dec. 22, 2015, 5:56 a.m. OK FPC TESTS 66 31 409600 1600
14941380 k2nt A Dec. 23, 2015, 4:11 p.m. OK FPC TESTS 66 31 409600 1600
14769845 Kael007 A Dec. 12, 2015, 6:58 a.m. OK FPC TESTS 66 31 409600 1600
15002303 tieuchanlong A Dec. 25, 2015, 11:59 a.m. OK FPC TESTS 66 31 512000 1600
14845631 ez_zkj A Dec. 17, 2015, 12:26 p.m. OK FPC TESTS 66 31 512000 1600
14737399 miltonbw A Dec. 10, 2015, 12:12 a.m. OK FPC TESTS 66 31 512000 1600
14743916 Smaug A Dec. 10, 2015, 1:02 p.m. OK FPC TESTS 66 31 921600 1600
14871608 vjudge2 A Dec. 19, 2015, 7:29 a.m. OK GNU C TESTS 66 30 409600 1600
14916285 shets A Dec. 21, 2015, 5:15 p.m. OK GNU C TESTS 66 31 409600 1600
20999765 GusztavSzmolik A Sept. 29, 2016, 5:47 p.m. OK GNU C TESTS 66 31 409600 1600
16623697 moobar A March 9, 2016, 8:07 p.m. OK GNU C TESTS 66 31 409600 1600
15146708 ekrem A Jan. 1, 2016, 9:38 a.m. OK GNU C TESTS 66 31 409600 1600
14903776 tanjil5084 A Dec. 20, 2015, 7:14 p.m. OK GNU C TESTS 66 31 409600 1600
14871510 vjudge3 A Dec. 19, 2015, 7:21 a.m. OK GNU C TESTS 66 31 409600 1600
14838685 SilverScar A Dec. 16, 2015, 7:08 p.m. OK GNU C TESTS 66 31 409600 1600
14834784 kaykobad_reza A Dec. 16, 2015, 1:26 p.m. OK GNU C TESTS 66 31 409600 1600
14763685 Svetaxxx A Dec. 11, 2015, 6:22 p.m. OK GNU C TESTS 66 31 409600 1600
14804442 xttt A Dec. 14, 2015, 3:23 p.m. OK GNU C++ TESTS 66 15 204800 1600
32367242 yylidiw A Nov. 17, 2017, 12:24 a.m. OK GNU C++ TESTS 66 15 512000 1600
31217267 bestFy A Oct. 11, 2017, 1:18 p.m. OK GNU C++ TESTS 66 15 614400 1600
14812243 Arturia A Dec. 15, 2015, 8:16 a.m. OK GNU C++ TESTS 66 15 614400 1600
14812235 Arturia A Dec. 15, 2015, 8:15 a.m. OK GNU C++ TESTS 66 15 614400 1600
31217195 wzp233 A Oct. 11, 2017, 1:14 p.m. OK GNU C++ TESTS 66 15 819200 1600
14768106 Chinawyh A Dec. 12, 2015, 1:59 a.m. OK GNU C++ TESTS 66 15 819200 1600
14771630 make777 A Dec. 12, 2015, 12:13 p.m. OK GNU C++ TESTS 66 15 1433600 1600
28494694 Ajatar A July 13, 2017, 7:56 a.m. OK GNU C++ TESTS 66 15 2355200 1600
20041509 Wuvin A Aug. 22, 2016, 8:21 a.m. OK GNU C++ TESTS 66 15 2457600 1600
14940588 sagor1994 A Dec. 23, 2015, 3:14 p.m. OK GNU C11 TESTS 66 31 409600 1600
14781098 UuuuuxxxOwO A Dec. 13, 2015, 6:39 a.m. OK GNU C11 TESTS 66 31 819200 1600
14749995 articuno12 A Dec. 10, 2015, 8:05 p.m. OK GNU C11 TESTS 66 46 819200 1600
14770214 HackMyself A Dec. 12, 2015, 7:22 a.m. OK GNU C11 TESTS 66 46 819200 1600
62769423 luogu_bot5 A Oct. 17, 2019, 9:45 a.m. OK GNU C11 TESTS 66 46 80179200 1600
62734854 vjudge2 A Oct. 16, 2019, 6:12 p.m. OK GNU C11 TESTS 66 62 80179200 1600
14720079 MinakoKojima A Dec. 9, 2015, 4:29 p.m. OK GNU C++11 TESTS 66 15 409600 1600
15746333 Heisenbug A Feb. 2, 2016, 8:38 a.m. OK GNU C++11 TESTS 66 15 409600 1600
14717514 sokian A Dec. 9, 2015, 4:16 p.m. OK GNU C++11 TESTS 66 15 819200 1600
14721247 eddy1021 A Dec. 9, 2015, 4:37 p.m. OK GNU C++11 TESTS 66 15 819200 1600
14717563 zxqfl A Dec. 9, 2015, 4:16 p.m. OK GNU C++11 TESTS 66 15 819200 1600
34959198 Fuko_Ibuki A Feb. 6, 2018, 2:26 a.m. OK GNU C++11 TESTS 66 15 2457600 1600
34959223 vjudge1 A Feb. 6, 2018, 2:27 a.m. OK GNU C++11 TESTS 66 15 2457600 1600
20204289 UoA_ZQC A Aug. 28, 2016, 2:27 a.m. OK GNU C++11 TESTS 66 15 2457600 1600
17011930 ctlchild A March 28, 2016, 11:46 p.m. OK GNU C++11 TESTS 66 15 4608000 1600
28491487 Hermits A July 13, 2017, 6:08 a.m. OK GNU C++11 TESTS 66 15 5939200 1600
22714031 _HossamYehia_ A Dec. 5, 2016, 2:52 p.m. OK GNU C++14 TESTS 66 31 409600 1600
26889439 Felix_gg A May 5, 2017, 10:14 p.m. OK GNU C++14 TESTS 66 31 409600 1600
27323967 OmarAhmed A May 24, 2017, 5:15 p.m. OK GNU C++14 TESTS 66 31 409600 1600
27337677 Elghareb A May 25, 2017, 1:30 p.m. OK GNU C++14 TESTS 66 31 409600 1600
29859300 Kanna_19 A Aug. 29, 2017, 6:33 a.m. OK GNU C++14 TESTS 66 31 409600 1600
27472635 fqw A May 31, 2017, 6:29 p.m. OK GNU C++14 TESTS 66 31 819200 1600
20609493 srinu37 A Sept. 14, 2016, 8:34 a.m. OK GNU C++14 TESTS 66 31 819200 1600
31219367 Dalenator A Oct. 11, 2017, 2:39 p.m. OK GNU C++14 TESTS 66 31 819200 1600
50609806 tokitsukaze A Feb. 28, 2019, 4:20 p.m. OK GNU C++14 TESTS 66 31 921600 1600
22165093 dkflfkdeh A Nov. 11, 2016, 3:26 p.m. OK GNU C++14 TESTS 66 31 1228800 1600
66882909 ddh A Dec. 14, 2019, 5:11 p.m. OK GNU C++17 TESTS 66 31 921600 1600
37826711 GM_Targeted A May 1, 2018, 10:42 p.m. OK GNU C++17 TESTS 66 31 3788800 1600
61363191 vjudge3 A Sept. 27, 2019, 12:43 p.m. OK GNU C++17 TESTS 66 46 409600 1600
59365859 despair A Aug. 23, 2019, 5:09 p.m. OK GNU C++17 TESTS 66 46 409600 1600
62634818 vjudge3 A Oct. 15, 2019, 4:31 p.m. OK GNU C++17 TESTS 66 46 409600 1600
63026770 Aman19 A Oct. 20, 2019, 4:36 p.m. OK GNU C++17 TESTS 66 46 409600 1600
65330712 vjudge5 A Nov. 19, 2019, 5:52 a.m. OK GNU C++17 TESTS 66 46 409600 1600
65957141 vjudge5 A Nov. 29, 2019, 1:17 p.m. OK GNU C++17 TESTS 66 46 409600 1600
68830859 krishkhatri28 A Jan. 14, 2020, 10:10 p.m. OK GNU C++17 TESTS 66 46 409600 1600
69641606 joylintp A Jan. 27, 2020, 9:11 p.m. OK GNU C++17 TESTS 66 46 409600 1600
14772506 czm1989 A Dec. 12, 2015, 1:49 p.m. OK Go TESTS 66 1372 7372800 1600
14769322 czm1989 A Dec. 12, 2015, 6:08 a.m. OK Go TESTS 66 1434 7372800 1600
14900440 autotaker A Dec. 20, 2015, 2:29 p.m. OK Haskell TESTS 66 265 18022400 1600
14898981 autotaker A Dec. 20, 2015, 12:45 p.m. OK Haskell TESTS 66 343 21196800 1600
20638811 pavel.rosputko A Sept. 15, 2016, 11:54 a.m. OK Haskell TESTS 66 639 22220800 1600
14719899 Azat_Yusupov A Dec. 9, 2015, 4:28 p.m. OK Java 7 TESTS 66 124 0 1600
14717512 edorundo A Dec. 9, 2015, 4:16 p.m. OK Java 7 TESTS 66 124 0 1600
14733786 Ereke A Dec. 9, 2015, 6:56 p.m. OK Java 7 TESTS 66 140 0 1600
14716048 pashka A Dec. 9, 2015, 4:09 p.m. OK Java 7 TESTS 66 155 0 1600
14752608 shubham95 A Dec. 11, 2015, 4:04 a.m. OK Java 7 TESTS 66 264 0 1600
14746424 ziki A Dec. 10, 2015, 3:40 p.m. OK Java 7 TESTS 66 265 0 1600
15065203 kcai A Dec. 28, 2015, 5:01 a.m. OK Java 7 TESTS 66 265 0 1600
14850082 pili A Dec. 17, 2015, 6:36 p.m. OK Java 7 TESTS 66 265 0 1600
14786663 javaiu A Dec. 13, 2015, 3:07 p.m. OK Java 7 TESTS 66 265 0 1600
14848830 mabotkin A Dec. 17, 2015, 4:57 p.m. OK Java 7 TESTS 66 280 0 1600
27215420 Mihir_Gajera1 A May 19, 2017, 1:29 p.m. OK Java 8 TESTS 66 109 0 1600
52025225 Ikari_stream A March 30, 2019, 2:32 p.m. OK Java 8 TESTS 66 109 0 1600
19929332 hama-du A Aug. 17, 2016, 2:33 p.m. OK Java 8 TESTS 66 109 20172800 1600
16137704 poikniok A Feb. 18, 2016, 7:25 a.m. OK Java 8 TESTS 66 124 0 1600
14920961 miguelmaurizio A Dec. 22, 2015, 5:26 a.m. OK Java 8 TESTS 66 124 0 1600
14720928 sroyal A Dec. 9, 2015, 4:35 p.m. OK Java 8 TESTS 66 124 0 1600
14717188 Sumeet.Varma A Dec. 9, 2015, 4:14 p.m. OK Java 8 TESTS 66 124 0 1600
16137745 poikniok A Feb. 18, 2016, 7:30 a.m. OK Java 8 TESTS 66 124 0 1600
34448291 showmic96 A Jan. 22, 2018, 1:18 p.m. OK Java 8 TESTS 66 124 20684800 1600
14745586 tuna A Dec. 10, 2015, 2:48 p.m. OK Java 8 TESTS 66 139 0 1600
15988779 yurabezhentsev A Feb. 13, 2016, 2:33 p.m. OK JavaScript TESTS 66 78 13721600 1600
51292032 nemars A March 14, 2019, 10:53 a.m. OK Mono C# TESTS 66 78 12083200 1600
16186487 DoubleVee A Feb. 18, 2016, 8:33 p.m. OK MS C# TESTS 66 77 7168000 1600
14745520 azukun A Dec. 10, 2015, 2:45 p.m. OK MS C# TESTS 66 77 10649600 1600
17759911 Arcey A May 6, 2016, 11:29 a.m. OK MS C# TESTS 66 78 18534400 1600
16591012 Mem A March 7, 2016, 7:30 p.m. OK MS C# TESTS 66 93 10649600 1600
31812198 duke009 A Oct. 27, 2017, 4:29 p.m. OK MS C# TESTS 66 93 18124800 1600
20456340 Chubcheg A Sept. 8, 2016, 10:55 a.m. OK MS C# TESTS 66 108 10752000 1600
14732851 camypaper A Dec. 9, 2015, 6:28 p.m. OK MS C# TESTS 66 186 5222400 1600
14732778 camypaper A Dec. 9, 2015, 6:25 p.m. OK MS C# TESTS 66 218 5222400 1600
21960930 dwp A Nov. 1, 2016, 8:29 a.m. OK MS C++ TESTS 66 31 409600 1600
16629252 vjudge2 A March 10, 2016, 8:30 a.m. OK MS C++ TESTS 66 31 409600 1600
16550317 vjudge2 A March 6, 2016, 10:22 a.m. OK MS C++ TESTS 66 31 409600 1600
15588050 sz1231 A Jan. 26, 2016, 7:07 a.m. OK MS C++ TESTS 66 31 409600 1600
15157495 NVAL A Jan. 2, 2016, 10:57 a.m. OK MS C++ TESTS 66 31 409600 1600
14721592 TonySnark A Dec. 9, 2015, 4:39 p.m. OK MS C++ TESTS 66 31 409600 1600
14863233 vjudge5 A Dec. 18, 2015, 3:49 p.m. OK MS C++ TESTS 66 31 512000 1600
15675391 ice_cookie A Jan. 30, 2016, 8:47 a.m. OK MS C++ TESTS 66 31 819200 1600
15471820 Langostinko A Jan. 21, 2016, 3:09 p.m. OK MS C++ TESTS 66 31 819200 1600
14844875 Xhark A Dec. 17, 2015, 11:20 a.m. OK MS C++ TESTS 66 31 819200 1600
62755918 vjudge4 A Oct. 17, 2019, 4:39 a.m. OK MS C++ 2017 TESTS 66 61 921600 1600
50604589 eyesofgod123 A Feb. 28, 2019, 2:03 p.m. OK MS C++ 2017 TESTS 66 62 409600 1600
59476236 CtrlAlt A Aug. 25, 2019, 4 p.m. OK MS C++ 2017 TESTS 66 62 819200 1600
49494722 PavelChadnov A Feb. 5, 2019, 12:15 p.m. OK MS C++ 2017 TESTS 66 93 819200 1600
62541993 vjudge3 A Oct. 14, 2019, 4:07 a.m. OK MS C++ 2017 TESTS 66 93 4812800 1600
66532169 yuanyuan2048 A Dec. 9, 2019, 7:56 a.m. OK MS C++ 2017 TESTS 66 109 1024000 1600
14741237 ikatanic A Dec. 10, 2015, 9:39 a.m. OK Ocaml TESTS 66 46 204800 1600
14932096 nealzane A Dec. 23, 2015, 1:22 a.m. OK PyPy 2 TESTS 66 108 5120000 1600
20420223 ChiliuDog A Sept. 6, 2016, 2 p.m. OK PyPy 2 TESTS 66 108 5222400 1600
17373814 TokuchiToa A April 18, 2016, 9:43 a.m. OK PyPy 2 TESTS 66 108 27443200 1600
14757697 vjudge5 A Dec. 11, 2015, 12:41 p.m. OK PyPy 2 TESTS 66 109 4300800 1600
14796856 my-zhang A Dec. 14, 2015, 3:06 a.m. OK PyPy 2 TESTS 66 140 7782400 1600
14735241 merolish A Dec. 9, 2015, 8:06 p.m. OK PyPy 2 TESTS 66 155 5427200 1600
14809537 viralm A Dec. 14, 2015, 11:53 p.m. OK PyPy 2 TESTS 66 186 5324800 1600
36717744 shubhu1596 A March 29, 2018, 11:36 a.m. OK PyPy 2 TESTS 66 202 32665600 1600
56005493 soumyasarkar1998 A June 24, 2019, 3:18 p.m. OK PyPy 2 TESTS 66 404 9523200 1600
37535012 dothanhlam97 A April 22, 2018, 2:10 p.m. OK PyPy 2 TESTS 66 436 31744000 1600
14809174 Andreikkaa A Dec. 14, 2015, 10:43 p.m. OK PyPy 3 TESTS 66 186 7270400 1600
49333222 111vad111 A Feb. 1, 2019, 5:14 p.m. OK PyPy 3 TESTS 66 186 11059200 1600
48569535 toysheeyeyraku A Jan. 19, 2019, 11:19 a.m. OK PyPy 3 TESTS 66 187 14848000 1600
14736974 justinz2018 A Dec. 9, 2015, 11:02 p.m. OK PyPy 3 TESTS 66 202 7168000 1600
53587681 LevinLMKwong A April 30, 2019, 7:47 p.m. OK PyPy 3 TESTS 66 202 9830400 1600
44042303 Kalam A Oct. 9, 2018, 3:21 p.m. OK PyPy 3 TESTS 66 202 11059200 1600
14735226 merolish A Dec. 9, 2015, 8:05 p.m. OK PyPy 3 TESTS 66 218 7168000 1600
16845621 ximo A March 20, 2016, 7:54 p.m. OK PyPy 3 TESTS 66 514 31948800 1600
15324420 shangtai A Jan. 13, 2016, 12:24 a.m. OK Python 2 TESTS 66 124 5529600 1600
15078280 a2linx A Dec. 28, 2015, 11:45 p.m. OK Python 2 TESTS 66 124 5632000 1600
14780515 nwi A Dec. 13, 2015, 5:07 a.m. OK Python 2 TESTS 66 124 5632000 1600
34959248 vjudge5 A Feb. 6, 2018, 2:29 a.m. OK Python 2 TESTS 66 124 9932800 1600
14801411 learningmou A Dec. 14, 2015, 11:49 a.m. OK Python 2 TESTS 66 140 5632000 1600
14752745 KoreAn_Max A Dec. 11, 2015, 4:35 a.m. OK Python 2 TESTS 66 140 6963200 1600
14735233 merolish A Dec. 9, 2015, 8:06 p.m. OK Python 2 TESTS 66 155 5427200 1600
15065024 trunghieu11 A Dec. 28, 2015, 4:45 a.m. OK Python 2 TESTS 66 155 6041600 1600
14930820 xiaowuc1 A Dec. 22, 2015, 9:15 p.m. OK Python 2 TESTS 66 155 8396800 1600
14902903 Ljubitel A Dec. 20, 2015, 5:51 p.m. OK Python 2 TESTS 66 171 5324800 1600
14844098 Nymphet A Dec. 17, 2015, 9:50 a.m. OK Python 3 TESTS 66 109 6963200 1600
23543635 kcherdakov A Jan. 4, 2017, 8:36 p.m. OK Python 3 TESTS 66 109 12492800 1600
22405284 MrPoopybutthole A Nov. 22, 2016, 2:22 p.m. OK Python 3 TESTS 66 124 7577600 1600
35895960 _____k_____ A March 3, 2018, 4:57 p.m. OK Python 3 TESTS 66 124 12697600 1600
35895375 ______n______ A March 3, 2018, 4:41 p.m. OK Python 3 TESTS 66 124 12697600 1600
35895285 ______u______ A March 3, 2018, 4:40 p.m. OK Python 3 TESTS 66 124 12697600 1600
35895101 _____i_____ A March 3, 2018, 4:35 p.m. OK Python 3 TESTS 66 124 12697600 1600
35886758 ______h______ A March 3, 2018, 1:51 p.m. OK Python 3 TESTS 66 124 12697600 1600
35886317 ______k______ A March 3, 2018, 1:44 p.m. OK Python 3 TESTS 66 124 12697600 1600
35885494 ______i______ A March 3, 2018, 1:29 p.m. OK Python 3 TESTS 66 124 12697600 1600
14840619 m2ym A Dec. 17, 2015, 12:17 a.m. OK Ruby TESTS 66 155 10547200 1600
14737046 antonkov A Dec. 9, 2015, 11:11 p.m. OK Scala TESTS 66 249 0 1600
15833544 iakolzin A Feb. 5, 2016, 9:25 p.m. OK Scala TESTS 66 358 204800 1600
14771460 kobae964 A Dec. 12, 2015, 11:40 a.m. OK Scala TESTS 66 436 102400 1600
16443387 reldan A March 1, 2016, 2:53 p.m. OK Scala TESTS 66 623 716800 1600

remove filters

Back to search problems