Educational Codeforces Round 79 (Rated for 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
1279 Educational Codeforces Round 79 (Rated for Div. 2) FINISHED False 7200 159981587 Dec. 27, 2019, 2:40 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 11831 ) C Stack of Presents PROGRAMMING data structures implementation 1400

B'Santa has to send presents to the kids. He has a large stack of n presents, numbered from 1 to n ; the topmost present has number a_1 , the next present is a_2 , and so on; the bottom present has number a_n . All numbers are distinct. Santa has a list of m distinct presents he has to send: b_1 , b_2 , ..., b_m . He will send them in the order they appear in the list. To send a present, Santa has to find it in the stack by removing all presents above it, taking this present and returning all removed presents on top of the stack. So, if there are k presents above the present Santa wants to send, it takes him 2k + 1 seconds to do it. Fortunately, Santa can speed the whole process up -- when he returns the presents to the stack, he may reorder them as he wishes (only those which were above the present he wanted to take; the presents below cannot be affected in any way). What is the minimum time required to send all of the presents, provided that Santa knows the whole list of presents he has to send and reorders the presents optimally? Santa cannot change the order of presents or interact with the stack of presents in any other way. Your program has to answer t different test cases. The first line contains one integer t ( 1 <= t <= 100 ) -- the number of test cases. Then the test cases follow, each represented by three lines. The first line contains two integers n and m ( 1 <= m <= n <= 10^5 ) -- the number of presents in the stack and the number of presents Santa wants to send, respectively. The second line contains n integers a_1 , a_2 , ..., a_n ( 1 <= a_i <= n , all a_i are unique) -- the order of presents in the stack. The third line contains m integers b_1 , b_2 , ..., b_m ( 1 <= b_i <= n , all b_i are unique) -- the ordered list of presents Santa has to send. The sum of n over'...

Tutorials

Educational Codeforces Round 79 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
67850836 Mistakem4 C Dec. 29, 2019, 2:49 a.m. OK Clang++17 Diagnostics TESTS 12 733 1228800 1400
67722761 avm C Dec. 27, 2019, 3:23 p.m. OK D TESTS 12 31 25292800 1400
67712713 fluffyowl C Dec. 27, 2019, 3 p.m. OK D TESTS 12 61 11571200 1400
67725929 daut-dlang C Dec. 27, 2019, 3:31 p.m. OK D TESTS 12 77 22425600 1400
67724540 iica C Dec. 27, 2019, 3:27 p.m. OK D TESTS 12 77 22528000 1400
67718268 ruban C Dec. 27, 2019, 3:12 p.m. OK Delphi TESTS 12 77 49459200 1400
67727812 Fidisk C Dec. 27, 2019, 3:36 p.m. OK FPC TESTS 12 46 1331200 1400
67721310 Craspedacusta C Dec. 27, 2019, 3:19 p.m. OK FPC TESTS 12 61 409600 1400
67720264 LaSWeeG C Dec. 27, 2019, 3:17 p.m. OK FPC TESTS 12 61 1536000 1400
67719016 darkkcyan C Dec. 27, 2019, 3:14 p.m. OK FPC TESTS 12 62 512000 1400
67734394 minhanh C Dec. 27, 2019, 3:57 p.m. OK FPC TESTS 12 77 2457600 1400
67742339 rainboy C Dec. 27, 2019, 4:28 p.m. OK GNU C11 TESTS 12 46 409600 1400
67764074 kaiboy C Dec. 28, 2019, 2 a.m. OK GNU C11 TESTS 12 46 409600 1400
67760711 kaiboy C Dec. 27, 2019, 10:03 p.m. OK GNU C11 TESTS 12 46 819200 1400
67733287 tmpower C Dec. 27, 2019, 3:53 p.m. OK GNU C11 TESTS 12 46 819200 1400
68399637 BugLeave C Jan. 8, 2020, 12:38 p.m. OK GNU C11 TESTS 12 46 1228800 1400
68858791 Piccacu C Jan. 15, 2020, 11:25 a.m. OK GNU C11 TESTS 12 46 1228800 1400
67942156 NHNzhz C Dec. 30, 2019, 2:14 a.m. OK GNU C11 TESTS 12 46 1228800 1400
67738604 Trinadh724 C Dec. 27, 2019, 4:13 p.m. OK GNU C11 TESTS 12 46 2355200 1400
68080568 ashishkumarpcma1 C Jan. 2, 2020, 2:13 p.m. OK GNU C11 TESTS 12 61 1228800 1400
67996619 satya_chaitanya C Dec. 31, 2019, 8:31 a.m. OK GNU C11 TESTS 12 61 2355200 1400
67766893 pk01 C Dec. 28, 2019, 4:35 a.m. OK GNU C++11 TESTS 12 15 819200 1400
67963391 JoaoFelix7 C Dec. 30, 2019, 12:28 p.m. OK GNU C++11 TESTS 12 15 1331200 1400
67955092 luogu_bot4 C Dec. 30, 2019, 9:19 a.m. OK GNU C++11 TESTS 12 15 1331200 1400
68235324 wasa855 C Jan. 5, 2020, 10:43 a.m. OK GNU C++11 TESTS 12 30 819200 1400
68009525 chzhc C Dec. 31, 2019, 2:59 p.m. OK GNU C++11 TESTS 12 30 1228800 1400
67729104 hdgfgs C Dec. 27, 2019, 3:40 p.m. OK GNU C++11 TESTS 12 30 9625600 1400
67960177 Lanly C Dec. 30, 2019, 11:14 a.m. OK GNU C++11 TESTS 12 31 409600 1400
67714111 Sooke_Believer C Dec. 27, 2019, 3:03 p.m. OK GNU C++11 TESTS 12 31 409600 1400
67719674 forxen C Dec. 27, 2019, 3:15 p.m. OK GNU C++11 TESTS 12 31 409600 1400
68425793 3615 C Jan. 9, 2020, 3:07 a.m. OK GNU C++11 TESTS 12 31 614400 1400
67721710 wleung_bvg C Dec. 27, 2019, 3:20 p.m. OK GNU C++14 TESTS 12 31 1331200 1400
67723309 Orz_c---8 C Dec. 27, 2019, 3:24 p.m. OK GNU C++14 TESTS 12 46 409600 1400
68062303 ShivyShiv C Jan. 2, 2020, 5:15 a.m. OK GNU C++14 TESTS 12 46 409600 1400
67766390 down_down_bear C Dec. 28, 2019, 4:10 a.m. OK GNU C++14 TESTS 12 46 409600 1400
67736879 dima.arafat C Dec. 27, 2019, 4:06 p.m. OK GNU C++14 TESTS 12 46 409600 1400
67731274 ........ C Dec. 27, 2019, 3:47 p.m. OK GNU C++14 TESTS 12 46 409600 1400
67724957 iefnah06 C Dec. 27, 2019, 3:28 p.m. OK GNU C++14 TESTS 12 46 409600 1400
69478723 hola_hola C Jan. 24, 2020, 5:01 p.m. OK GNU C++14 TESTS 12 46 819200 1400
68300236 luoxinchen C Jan. 6, 2020, 6:07 a.m. OK GNU C++14 TESTS 12 46 819200 1400
69202642 AngelVzla99 C Jan. 20, 2020, 5:02 p.m. OK GNU C++14 TESTS 12 46 819200 1400
67871778 ironic C Dec. 29, 2019, 11:45 a.m. OK GNU C++17 TESTS 12 46 409600 1400
67968455 Mursaleen C Dec. 30, 2019, 2:08 p.m. OK GNU C++17 TESTS 12 46 409600 1400
69213044 oskarfiuk1 C Jan. 20, 2020, 9:18 p.m. OK GNU C++17 TESTS 12 46 409600 1400
68019712 YousefShereen C Dec. 31, 2019, 9:32 p.m. OK GNU C++17 TESTS 12 46 409600 1400
67733854 outline C Dec. 27, 2019, 3:55 p.m. OK GNU C++17 TESTS 12 46 409600 1400
67783721 i_merod C Dec. 28, 2019, 11:56 a.m. OK GNU C++17 TESTS 12 46 409600 1400
68102699 ZeroScar C Jan. 3, 2020, 4:49 a.m. OK GNU C++17 TESTS 12 46 819200 1400
68156578 _LogN_ C Jan. 4, 2020, 9:10 a.m. OK GNU C++17 TESTS 12 46 819200 1400
68047106 vjudge2 C Jan. 1, 2020, 4:57 p.m. OK GNU C++17 TESTS 12 46 819200 1400
69286163 knayan C Jan. 22, 2020, 8:16 a.m. OK GNU C++17 TESTS 12 46 819200 1400
67716779 u1s1reallycai C Dec. 27, 2019, 3:09 p.m. OK Go TESTS 12 140 0 1400
67731538 ShesMyNerd C Dec. 27, 2019, 3:48 p.m. OK Java 11 TESTS 12 171 0 1400
67721565 elkadymohammed01 C Dec. 27, 2019, 3:20 p.m. OK Java 11 TESTS 12 186 0 1400
68053656 about C Jan. 1, 2020, 8:29 p.m. OK Java 11 TESTS 12 202 0 1400
68080128 aswals8991 C Jan. 2, 2020, 2:03 p.m. OK Java 11 TESTS 12 202 0 1400
67723106 bleh0.5 C Dec. 27, 2019, 3:24 p.m. OK Java 11 TESTS 12 202 0 1400
67714717 barakraganosungam C Dec. 27, 2019, 3:04 p.m. OK Java 11 TESTS 12 202 3072000 1400
67741226 kashishsingh8700 C Dec. 27, 2019, 4:23 p.m. OK Java 11 TESTS 12 202 4812800 1400
68409833 exopeng C Jan. 8, 2020, 4:33 p.m. OK Java 11 TESTS 12 218 0 1400
68209912 Tardimgg C Jan. 4, 2020, 6:51 p.m. OK Java 11 TESTS 12 218 3379200 1400
67737387 ankyy_0103 C Dec. 27, 2019, 4:08 p.m. OK Java 11 TESTS 12 218 5734400 1400
67732561 arsh1598 C Dec. 27, 2019, 3:51 p.m. OK Java 8 TESTS 12 108 0 1400
67871131 courtesy C Dec. 29, 2019, 11:30 a.m. OK Java 8 TESTS 12 109 0 1400
67764690 luchy0120 C Dec. 28, 2019, 2:39 a.m. OK Java 8 TESTS 12 109 0 1400
67755340 shashwat07 C Dec. 27, 2019, 7:17 p.m. OK Java 8 TESTS 12 109 0 1400
67733882 saurabhs1206 C Dec. 27, 2019, 3:55 p.m. OK Java 8 TESTS 12 109 0 1400
67732807 Lior C Dec. 27, 2019, 3:52 p.m. OK Java 8 TESTS 12 109 0 1400
67715117 uwi C Dec. 27, 2019, 3:05 p.m. OK Java 8 TESTS 12 109 0 1400
68161325 In_The_Name_Of_Love C Jan. 4, 2020, 10:59 a.m. OK Java 8 TESTS 12 124 0 1400
68141758 flyingpurplepeopleeater C Jan. 3, 2020, 11:19 p.m. OK Java 8 TESTS 12 124 0 1400
68101414 _IAm_PM_ C Jan. 3, 2020, 3:26 a.m. OK Java 8 TESTS 12 124 0 1400
67845995 Spheniscine C Dec. 28, 2019, 9:38 p.m. OK Kotlin TESTS 12 155 614400 1400
67845548 Spheniscine C Dec. 28, 2019, 9:23 p.m. OK Kotlin TESTS 12 186 5120000 1400
67712793 Tlatoani C Dec. 27, 2019, 3 p.m. OK Kotlin TESTS 12 249 0 1400
67752819 Differum C Dec. 27, 2019, 6:22 p.m. OK Kotlin TESTS 12 326 4812800 1400
67771880 a11eca C Dec. 28, 2019, 7:09 a.m. OK Kotlin TESTS 12 358 6656000 1400
67753738 cmplx-xyttmt C Dec. 27, 2019, 6:42 p.m. OK Kotlin TESTS 12 358 16588800 1400
69538407 T-D-K C Jan. 25, 2020, 7:59 p.m. OK Mono C# TESTS 12 62 6451200 1400
67717539 mban259 C Dec. 27, 2019, 3:10 p.m. OK Mono C# TESTS 12 93 14950400 1400
67740898 sevimlikedicik C Dec. 27, 2019, 4:22 p.m. OK Mono C# TESTS 12 93 20275200 1400
67773311 nastya1199 C Dec. 28, 2019, 7:49 a.m. OK Mono C# TESTS 12 93 21708800 1400
67715408 hibatibati C Dec. 27, 2019, 3:05 p.m. OK Mono C# TESTS 12 108 20377600 1400
67859016 camypaper C Dec. 29, 2019, 7:18 a.m. OK Mono C# TESTS 12 108 56627200 1400
67746826 Metwally92 C Dec. 27, 2019, 4:51 p.m. OK Mono C# TESTS 12 109 17510400 1400
67777269 artworks C Dec. 28, 2019, 9:30 a.m. OK Mono C# TESTS 12 124 22016000 1400
67725405 sergmel C Dec. 27, 2019, 3:30 p.m. OK Mono C# TESTS 12 124 25804800 1400
67718262 Yupiteru C Dec. 27, 2019, 3:12 p.m. OK Mono C# TESTS 12 124 161996800 1400
68699066 vjudge1 C Jan. 13, 2020, 8:51 a.m. OK MS C++ TESTS 12 46 409600 1400
67725693 tarattata1 C Dec. 27, 2019, 3:30 p.m. OK MS C++ TESTS 12 93 3276800 1400
68405644 vjudge2 C Jan. 8, 2020, 2:47 p.m. OK MS C++ TESTS 12 124 1228800 1400
67743968 Denx24x C Dec. 27, 2019, 4:34 p.m. OK MS C++ TESTS 12 139 12390400 1400
69413338 kwfumou1242 C Jan. 23, 2020, 12:21 p.m. OK MS C++ TESTS 12 171 12902400 1400
67714020 youx C Dec. 27, 2019, 3:03 p.m. OK MS C++ 2017 TESTS 12 62 819200 1400
67722082 Ivan11 C Dec. 27, 2019, 3:21 p.m. OK MS C++ 2017 TESTS 12 62 819200 1400
67714043 pichulia C Dec. 27, 2019, 3:03 p.m. OK MS C++ 2017 TESTS 12 62 1638400 1400
67723782 dkyun C Dec. 27, 2019, 3:25 p.m. OK MS C++ 2017 TESTS 12 62 1638400 1400
67776858 ningBr C Dec. 28, 2019, 9:20 a.m. OK MS C++ 2017 TESTS 12 62 2457600 1400
67780940 mr.shuai C Dec. 28, 2019, 10:56 a.m. OK MS C++ 2017 TESTS 12 62 8396800 1400
67870426 ZA139 C Dec. 29, 2019, 11:15 a.m. OK MS C++ 2017 TESTS 12 77 1740800 1400
67741303 Laaahu_ C Dec. 27, 2019, 4:24 p.m. OK MS C++ 2017 TESTS 12 77 3481600 1400
67746876 hack2kong C Dec. 27, 2019, 4:51 p.m. OK MS C++ 2017 TESTS 12 78 819200 1400
67730388 Tangerine C Dec. 27, 2019, 3:44 p.m. OK MS C++ 2017 TESTS 12 78 1228800 1400
67782345 shivam1420 C Dec. 28, 2019, 11:26 a.m. OK Node.js TESTS 12 202 16076800 1400
67742373 Tomasz43 C Dec. 27, 2019, 4:28 p.m. OK Node.js TESTS 12 202 23961600 1400
67843426 mayakin C Dec. 28, 2019, 8:20 p.m. OK PHP TESTS 12 124 18534400 1400
67720870 pajenegod C Dec. 27, 2019, 3:18 p.m. OK PyPy 2 TESTS 12 140 13209600 1400
68074207 MVP C Jan. 2, 2020, 11:48 a.m. OK PyPy 2 TESTS 12 155 9216000 1400
67738628 yamatoumi C Dec. 27, 2019, 4:13 p.m. OK PyPy 2 TESTS 12 155 11468800 1400
67709936 alexwice C Dec. 27, 2019, 2:55 p.m. OK PyPy 2 TESTS 12 156 11264000 1400
67720737 ashok123 C Dec. 27, 2019, 3:18 p.m. OK PyPy 2 TESTS 12 170 12185600 1400
67731788 raj1307 C Dec. 27, 2019, 3:48 p.m. OK PyPy 2 TESTS 12 171 12390400 1400
67713669 Jonte_98 C Dec. 27, 2019, 3:02 p.m. OK PyPy 2 TESTS 12 171 12390400 1400
67731293 iamprayush C Dec. 27, 2019, 3:47 p.m. OK PyPy 2 TESTS 12 202 15462400 1400
67772685 aaa_bbb_ccc C Dec. 28, 2019, 7:32 a.m. OK PyPy 2 TESTS 12 280 10649600 1400
67788293 jolt.tks C Dec. 28, 2019, 1:39 p.m. OK PyPy 2 TESTS 12 451 12185600 1400
67719971 tamato C Dec. 27, 2019, 3:16 p.m. OK PyPy 3 TESTS 12 171 12697600 1400
67739214 snape_here C Dec. 27, 2019, 4:15 p.m. OK PyPy 3 TESTS 12 202 10752000 1400
67734136 Gaurav1 C Dec. 27, 2019, 3:56 p.m. OK PyPy 3 TESTS 12 202 14131200 1400
67951128 codershuvo C Dec. 30, 2019, 7:42 a.m. OK PyPy 3 TESTS 12 233 10854400 1400
67726854 IKnoom C Dec. 27, 2019, 3:34 p.m. OK PyPy 3 TESTS 12 233 11161600 1400
67744662 mstr_shifu C Dec. 27, 2019, 4:36 p.m. OK PyPy 3 TESTS 12 233 11468800 1400
67966790 jasonsebastian C Dec. 30, 2019, 1:37 p.m. OK PyPy 3 TESTS 12 233 13107200 1400
67714746 Kiri8128 C Dec. 27, 2019, 3:04 p.m. OK PyPy 3 TESTS 12 233 13414400 1400
67725312 Paixao C Dec. 27, 2019, 3:29 p.m. OK PyPy 3 TESTS 12 234 11059200 1400
67756623 SinKing C Dec. 27, 2019, 7:48 p.m. OK PyPy 3 TESTS 12 248 10956800 1400
67720789 nwi C Dec. 27, 2019, 3:18 p.m. OK Python 2 TESTS 12 233 7782400 1400
68022604 pengyuhe C Jan. 1, 2020, 1:34 a.m. OK Python 2 TESTS 12 265 10752000 1400
67765504 mkcrt C Dec. 28, 2019, 3:23 a.m. OK Python 2 TESTS 12 311 13312000 1400
67715363 anonymous0314 C Dec. 27, 2019, 3:05 p.m. OK Python 2 TESTS 12 327 10649600 1400
67745538 rkaiser C Dec. 27, 2019, 4:39 p.m. OK Python 3 TESTS 12 186 9830400 1400
67739516 hokekiyoo C Dec. 27, 2019, 4:17 p.m. OK Python 3 TESTS 12 187 12492800 1400
68211025 Gikinet C Jan. 4, 2020, 7:22 p.m. OK Python 3 TESTS 12 202 9830400 1400
67750564 Kagemeka C Dec. 27, 2019, 5:42 p.m. OK Python 3 TESTS 12 202 9830400 1400
68287124 TumsaUmata C Jan. 5, 2020, 7 p.m. OK Python 3 TESTS 12 202 10956800 1400
67730005 deepjuly90 C Dec. 27, 2019, 3:43 p.m. OK Python 3 TESTS 12 202 11878400 1400
67725594 okkkk C Dec. 27, 2019, 3:30 p.m. OK Python 3 TESTS 12 202 12185600 1400
68770419 Zogrina C Jan. 14, 2020, 11:39 a.m. OK Python 3 TESTS 12 202 14540800 1400
67733572 codejudge C Dec. 27, 2019, 3:54 p.m. OK Python 3 TESTS 12 217 9830400 1400
67740854 bhy_ahmed C Dec. 27, 2019, 4:22 p.m. OK Python 3 TESTS 12 217 10240000 1400
67743520 majali C Dec. 27, 2019, 4:32 p.m. OK Ruby TESTS 12 202 20172800 1400
68103254 Rara. C Jan. 3, 2020, 5:20 a.m. OK Ruby TESTS 12 202 23040000 1400
67793645 alleycat-at-git C Dec. 28, 2019, 3:37 p.m. OK Rust TESTS 12 31 3276800 1400
68972673 akiradeveloper C Jan. 17, 2020, 7:37 a.m. OK Rust TESTS 12 31 3686400 1400
69290114 bmerry C Jan. 22, 2020, 9:53 a.m. OK Rust TESTS 12 61 2867200 1400
67731741 manta1130 C Dec. 27, 2019, 3:48 p.m. OK Rust TESTS 12 62 3174400 1400

remove filters

Back to search problems