Educational Codeforces Round 97 (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
1437 Educational Codeforces Round 97 (Rated for Div. 2) FINISHED False 7200 133543511 Oct. 27, 2020, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 10702 ) C Chef Monocarp PROGRAMMING dp flows graph matchings greedy

B"Chef Monocarp has just put n dishes into an oven. He knows that the i -th dish has its optimal cooking time equal to t_i minutes. At any positive integer minute T Monocarp can put no more than one dish out of the oven. If the i -th dish is put out at some minute T , then its unpleasant value is |T - t_i| -- the absolute difference between T and t_i . Once the dish is out of the oven, it can't go back in. Monocarp should put all the dishes out of the oven. What is the minimum total unpleasant value Monocarp can obtain? The first line contains a single integer q ( 1 <= q <= 200 ) -- the number of testcases. Then q testcases follow. The first line of the testcase contains a single integer n ( 1 <= n <= 200 ) -- the number of dishes in the oven. The second line of the testcase contains n integers t_1, t_2, ... , t_n ( 1 <= t_i <= n ) -- the optimal cooking time for each dish. The sum of n over all q testcases doesn't exceed 200 . Print a single integer for each testcase -- the minimum total unpleasant value Monocarp can obtain when he puts out all the dishes out of the oven. Remember that Monocarp can only put the dishes out at positive integer minutes and no more than one dish at any minute. In the first example Monocarp can put out the dishes at minutes 3, 1, 5, 4, 6, 2 . That way the total unpleasant value will be |4 - 3| + |2 - 1| + |4 - 5| + |4 - 4| + |6 - 5| + |2 - 2| = 4 . In the second example Monocarp can put out the dishes at minutes 4, 5, 6, 7, 8, 9, 10 . In the third example Monocarp can put out the dish at minute 1 . In the fourth example Monocarp can put out the dishes at minutes 5, 1, 2, 4, 3 . In the fifth example Monocarp can put out the dishes at minutes 1, 3, 4, 5 . "...

Tutorials

84149

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
96928662 Gassa C Oct. 27, 2020, 5:02 p.m. OK D TESTS 7 31 0
96959421 1695651 C Oct. 28, 2020, 5:44 a.m. OK GNU C++11 TESTS 10 15 0
96952722 slayder21_0 C Oct. 28, 2020, 3:22 a.m. OK GNU C++11 TESTS 10 15 0
96941079 el_heffeh C Oct. 27, 2020, 8:26 p.m. OK GNU C++11 TESTS 7 15 0
96918544 Blade_owo C Oct. 27, 2020, 4:20 p.m. OK GNU C++11 TESTS 7 15 102400
96926997 jack112739 C Oct. 27, 2020, 4:47 p.m. OK GNU C++11 TESTS 7 15 204800
96952319 guanhuai04 C Oct. 28, 2020, 3:12 a.m. OK GNU C++11 TESTS 10 15 307200
96947656 AFOier C Oct. 28, 2020, 12:52 a.m. OK GNU C++11 TESTS 7 15 307200
96959009 Qingyu98821 C Oct. 28, 2020, 5:37 a.m. OK GNU C++11 TESTS 10 15 307200
96956175 Tom66 C Oct. 28, 2020, 4:38 a.m. OK GNU C++11 TESTS 10 15 307200
96951590 AFOier C Oct. 28, 2020, 2:55 a.m. OK GNU C++11 TESTS 10 15 307200
96941932 kit.shiron C Oct. 27, 2020, 8:51 p.m. OK GNU C++14 TESTS 7 15 512000
96944765 kfg021 C Oct. 27, 2020, 10:43 p.m. OK GNU C++14 TESTS 7 15 512000
96957587 ManojSharma C Oct. 28, 2020, 5:07 a.m. OK GNU C++14 TESTS 10 15 716800
96926888 IngaleAnkur10 C Oct. 27, 2020, 4:46 p.m. OK GNU C++14 TESTS 7 15 819200
96955355 sahil.kalamkar C Oct. 28, 2020, 4:21 a.m. OK GNU C++14 TESTS 10 15 1740800
96925025 Himanshu_77 C Oct. 27, 2020, 4:34 p.m. OK GNU C++14 TESTS 7 15 2457600
96942690 abhishek_ucs C Oct. 27, 2020, 9:17 p.m. OK GNU C++14 TESTS 7 15 5120000
96932580 wizist C Oct. 27, 2020, 5:45 p.m. OK GNU C++14 TESTS 7 30 102400
96927467 Pradyumna_ C Oct. 27, 2020, 4:51 p.m. OK GNU C++14 TESTS 7 30 102400
96922180 Sorrow_boy C Oct. 27, 2020, 4:29 p.m. OK GNU C++14 TESTS 7 30 102400
96929158 juggernaut_3 C Oct. 27, 2020, 5:07 p.m. OK GNU C++17 TESTS 7 15 102400
96929734 kennethyonghw C Oct. 27, 2020, 5:13 p.m. OK GNU C++17 TESTS 7 15 307200
96951810 Wolfhunter C Oct. 28, 2020, 3 a.m. OK GNU C++17 TESTS 10 15 307200
96951751 Evil_Hunter C Oct. 28, 2020, 2:59 a.m. OK GNU C++17 TESTS 10 15 307200
96950147 detele C Oct. 28, 2020, 2:19 a.m. OK GNU C++17 TESTS 10 15 307200
96939761 manag C Oct. 27, 2020, 7:55 p.m. OK GNU C++17 TESTS 7 15 307200
96938509 FedeNQ C Oct. 27, 2020, 7:28 p.m. OK GNU C++17 TESTS 7 15 307200
96935920 kyuhyunp C Oct. 27, 2020, 6:39 p.m. OK GNU C++17 TESTS 7 15 307200
96933469 p4lacios C Oct. 27, 2020, 5:58 p.m. OK GNU C++17 TESTS 7 15 307200
96933871 fillleon C Oct. 27, 2020, 6:03 p.m. OK GNU C++17 TESTS 7 15 307200
96941297 erray C Oct. 27, 2020, 8:31 p.m. OK GNU C++17 (64) TESTS 7 15 0
96936584 smurfer C Oct. 27, 2020, 6:51 p.m. OK GNU C++17 (64) TESTS 7 15 0
96950765 Kanoon C Oct. 28, 2020, 2:37 a.m. OK GNU C++17 (64) TESTS 10 15 0
96949481 forceac C Oct. 28, 2020, 1:58 a.m. OK GNU C++17 (64) TESTS 7 15 0
96949466 forceac C Oct. 28, 2020, 1:58 a.m. OK GNU C++17 (64) TESTS 7 15 0
96939430 Lost_Arrow C Oct. 27, 2020, 7:47 p.m. OK GNU C++17 (64) TESTS 7 15 0
96939777 airforceone747 C Oct. 27, 2020, 7:55 p.m. OK GNU C++17 (64) TESTS 7 15 307200
96941953 essi C Oct. 27, 2020, 8:52 p.m. OK GNU C++17 (64) TESTS 7 15 409600
96937276 GabrielNeri C Oct. 27, 2020, 7:03 p.m. OK GNU C++17 (64) TESTS 7 15 409600
96937378 GabrielNeri C Oct. 27, 2020, 7:05 p.m. OK GNU C++17 (64) TESTS 7 15 409600
96939695 eR6 C Oct. 27, 2020, 7:53 p.m. OK Go TESTS 7 31 0
96954015 synapse C Oct. 28, 2020, 3:50 a.m. OK Go TESTS 10 171 4915200
96954680 synapse C Oct. 28, 2020, 4:05 a.m. OK Go TESTS 10 218 5632000
96937774 vineet_001 C Oct. 27, 2020, 7:13 p.m. OK Java 11 TESTS 7 170 0
96926046 nirvana_rsc C Oct. 27, 2020, 4:41 p.m. OK Java 11 TESTS 7 171 0
96919026 Yash-Saxena C Oct. 27, 2020, 4:21 p.m. OK Java 11 TESTS 7 171 0
96958290 blackBird C Oct. 28, 2020, 5:21 a.m. OK Java 11 TESTS 10 171 0
96957136 sanju2504 C Oct. 28, 2020, 4:58 a.m. OK Java 11 TESTS 10 171 0
96953770 nirvana_rsc C Oct. 28, 2020, 3:45 a.m. OK Java 11 TESTS 10 171 0
96935409 Haresa C Oct. 27, 2020, 6:30 p.m. OK Java 11 TESTS 7 171 0
96930048 saikaushik C Oct. 27, 2020, 5:16 p.m. OK Java 11 TESTS 7 171 0
96927484 vaishnav_firebolt C Oct. 27, 2020, 4:51 p.m. OK Java 11 TESTS 7 171 0
96939031 idk321 C Oct. 27, 2020, 7:38 p.m. OK Java 11 TESTS 7 186 0
96919558 csn3rd C Oct. 27, 2020, 4:22 p.m. OK Java 8 TESTS 7 93 0
96933060 an09mous C Oct. 27, 2020, 5:52 p.m. OK Java 8 TESTS 7 93 0
96926871 Ad-007 C Oct. 27, 2020, 4:46 p.m. OK Java 8 TESTS 7 93 0
96958038 eng_hardik C Oct. 28, 2020, 5:16 a.m. OK Java 8 TESTS 10 108 0
96958670 gladwin_rojer C Oct. 28, 2020, 5:29 a.m. OK Java 8 TESTS 10 108 0
96947212 G.A.T.C C Oct. 28, 2020, 12:34 a.m. OK Java 8 TESTS 7 109 0
96960317 prasoon006 C Oct. 28, 2020, 5:59 a.m. OK Java 8 TESTS 10 109 0
96958515 physai C Oct. 28, 2020, 5:26 a.m. OK Java 8 TESTS 10 109 0
96956448 ragnarok001 C Oct. 28, 2020, 4:44 a.m. OK Java 8 TESTS 10 109 0
96943880 ay_08 C Oct. 27, 2020, 10:01 p.m. OK Java 8 TESTS 7 109 0
96941934 rupesh.thakur C Oct. 27, 2020, 8:51 p.m. OK Kotlin TESTS 7 124 921600
96943562 dominotim C Oct. 27, 2020, 9:49 p.m. OK MS C++ 2017 TESTS 7 30 716800
96938681 xsc C Oct. 27, 2020, 7:31 p.m. OK MS C++ 2017 TESTS 7 31 716800
96943792 Van9Lebed C Oct. 27, 2020, 9:58 p.m. OK MS C++ 2017 TESTS 7 31 1331200
96920226 Darisishe C Oct. 27, 2020, 4:24 p.m. OK MS C++ 2017 TESTS 7 62 512000
96934092 azukun C Oct. 27, 2020, 6:08 p.m. OK .NET Core C# TESTS 7 77 204800
96931918 Yupiteru C Oct. 27, 2020, 5:36 p.m. OK .NET Core C# TESTS 7 187 4505600
96956655 hxu10 C Oct. 28, 2020, 4:48 a.m. OK PyPy 2 TESTS 10 514 4300800
96939082 Bovniova C Oct. 27, 2020, 7:39 p.m. OK PyPy 3 TESTS 7 140 2150400
96944544 lucifer1004 C Oct. 27, 2020, 10:32 p.m. OK PyPy 3 TESTS 7 140 2867200
96942063 akshitm16 C Oct. 27, 2020, 8:54 p.m. OK PyPy 3 TESTS 7 140 3174400
96937171 anArtist C Oct. 27, 2020, 7:01 p.m. OK PyPy 3 TESTS 7 140 3276800
96928982 emil18 C Oct. 27, 2020, 5:05 p.m. OK PyPy 3 TESTS 7 155 1740800
96932450 Evil__Coder C Oct. 27, 2020, 5:44 p.m. OK PyPy 3 TESTS 7 155 2048000
96938565 mynk98 C Oct. 27, 2020, 7:29 p.m. OK PyPy 3 TESTS 7 155 2150400
96931190 DarkOverlord999 C Oct. 27, 2020, 5:27 p.m. OK PyPy 3 TESTS 7 155 2150400
96942396 akshitm16 C Oct. 27, 2020, 9:06 p.m. OK PyPy 3 TESTS 7 155 2355200
96942019 songsinger C Oct. 27, 2020, 8:53 p.m. OK PyPy 3 TESTS 7 155 2560000
96917597 nwi C Oct. 27, 2020, 4:17 p.m. OK Python 2 TESTS 7 1013 0
96930559 sh1194 C Oct. 27, 2020, 5:22 p.m. OK Python 3 TESTS 7 171 1433600
96952064 srijan.sarkar C Oct. 28, 2020, 3:07 a.m. OK Python 3 TESTS 10 171 5632000
96944602 Ravi_ISI C Oct. 27, 2020, 10:35 p.m. OK Python 3 TESTS 7 218 1331200
96930319 aberent C Oct. 27, 2020, 5:19 p.m. OK Rust TESTS 7 31 512000

remove filters

Back to search problems