Codeforces Round 942 (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
1972 Codeforces Round 942 (Div. 2) FINISHED False 9000 22692263 April 30, 2024, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 23576 ) A Contest Proposal PROGRAMMING brute force greedy two pointers 800

B"A contest contains n problems and the difficulty of the i -th problem is expected to be at most b_i . There are already n problem proposals and the difficulty of the i -th problem is a_i . Initially, both a_1, a_2, ldots, a_n and b_1, b_2, ldots, b_n are sorted in non-decreasing order. Some of the problems may be more difficult than expected, so the writers must propose more problems. When a new problem with difficulty w is proposed, the most difficult problem will be deleted from the contest, and the problems will be sorted in a way that the difficulties are non-decreasing. In other words, in each operation, you choose an integer w , insert it into the array a , sort array a in non-decreasing order, and remove the last element from it. Find the minimum number of new problems to make a_i <= b_i for all i . Each test contains multiple test cases. The first line contains the number of test cases t ( 1 <= t <= 100 ). The description of the test cases follows. The first line of each test case contains only one positive integer n ( 1 <= q n <= q 100 ), representing the number of problems. The second line of each test case contains an array a of length n ( 1 <= a_1 <= a_2 <= cdots <= a_n <= 10^9 ). The third line of each test case contains an array b of length n ( 1 <= b_1 <= b_2 <= cdots <= b_n <= 10^9 ). For each test case, print an integer as your answer in a new line. In the first test case: It can be proved that it's impossible to reach the goal by proposing fewer new problems. In the second test case: It can be proved that it's impossible to reach the goal by proposing fewer new problems. "...

Tutorials

Tutorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
260655562 Kol-UI A May 12, 2024, 11:40 a.m. OK C# 10 TESTS 7 93 1638400 800
263328299 justunderdog A May 30, 2024, 3:38 p.m. OK C# 10 TESTS 7 93 2560000 800
260877478 raselislambabu0677 A May 14, 2024, 4:52 a.m. OK C# 10 TESTS 7 108 1843200 800
261195556 Aatrowen A May 16, 2024, 12:36 p.m. OK C# 10 TESTS 7 109 1740800 800
261716452 YefersonSC A May 20, 2024, 3:07 a.m. OK C# 10 TESTS 7 124 1945600 800
263628503 Upadhyay_07 A June 1, 2024, 12:25 p.m. OK C++14 (GCC 6-32) TESTS 7 46 0 800
263156927 Vignesh_VR A May 29, 2024, 2:36 p.m. OK C++14 (GCC 6-32) TESTS 7 46 0 800
263138083 leafone A May 29, 2024, 12:09 p.m. OK C++14 (GCC 6-32) TESTS 7 46 0 800
263100234 Shah_0024 A May 29, 2024, 7:04 a.m. OK C++14 (GCC 6-32) TESTS 7 46 0 800
263082173 hemanagireddy A May 29, 2024, 3:36 a.m. OK C++14 (GCC 6-32) TESTS 7 46 0 800
262712072 pluto09 A May 26, 2024, 1:46 p.m. OK C++14 (GCC 6-32) TESTS 7 46 0 800
262654422 cyrxdzj A May 26, 2024, 5:52 a.m. OK C++14 (GCC 6-32) TESTS 7 46 0 800
262513086 cyrxdzj A May 25, 2024, 1:15 p.m. OK C++14 (GCC 6-32) TESTS 7 46 0 800
262174711 paramgoswami A May 22, 2024, 5:11 p.m. OK C++14 (GCC 6-32) TESTS 7 46 0 800
262011979 rik_iiitb A May 21, 2024, 12:04 p.m. OK C++14 (GCC 6-32) TESTS 7 46 0 800
262421639 Dhiraj_k_gupta A May 24, 2024, 5:47 p.m. OK C++17 (GCC 7-32) TESTS 7 31 0 800
261192445 aryantiwary2003 A May 16, 2024, 12:13 p.m. OK C++17 (GCC 7-32) TESTS 7 31 0 800
260577363 paphangkon009 A May 11, 2024, 7:05 p.m. OK C++17 (GCC 7-32) TESTS 7 31 0 800
260492539 bkifhr7 A May 11, 2024, 6:19 a.m. OK C++17 (GCC 7-32) TESTS 7 31 0 800
260251197 arvsrv025 A May 10, 2024, 12:37 p.m. OK C++17 (GCC 7-32) TESTS 7 31 0 800
261157643 Kiri_ba A May 16, 2024, 7:24 a.m. OK C++17 (GCC 7-32) TESTS 7 31 819200 800
261017915 vjudge.4 A May 15, 2024, 7:36 a.m. OK C++17 (GCC 7-32) TESTS 7 31 1638400 800
263674132 harshit417 A June 1, 2024, 7:14 p.m. OK C++17 (GCC 7-32) TESTS 7 46 0 800
263662923 Jarviscoder A June 1, 2024, 5:21 p.m. OK C++17 (GCC 7-32) TESTS 7 46 0 800
263650994 Amazed A June 1, 2024, 3:43 p.m. OK C++17 (GCC 7-32) TESTS 7 46 0 800
263635753 ycc-41 A June 1, 2024, 1:30 p.m. OK C++20 (GCC 13-64) TESTS 7 31 0 800
263247958 anuragak021 A May 30, 2024, 12:32 p.m. OK C++20 (GCC 13-64) TESTS 7 31 0 800
262708224 Abodeh_Alshammaa A May 26, 2024, 1:11 p.m. OK C++20 (GCC 13-64) TESTS 7 31 0 800
261509631 Circlezero A May 18, 2024, 9:58 a.m. OK C++20 (GCC 13-64) TESTS 7 31 0 800
260811361 huihooj A May 13, 2024, 2:15 p.m. OK C++20 (GCC 13-64) TESTS 7 31 0 800
263700394 bonh A June 2, 2024, 4:59 a.m. OK C++20 (GCC 13-64) TESTS 7 46 0 800
263700138 pNitesh7 A June 2, 2024, 4:55 a.m. OK C++20 (GCC 13-64) TESTS 7 46 0 800
263644278 Uakkes A June 1, 2024, 2:44 p.m. OK C++20 (GCC 13-64) TESTS 7 46 0 800
263595559 utsav_07 A June 1, 2024, 8 a.m. OK C++20 (GCC 13-64) TESTS 7 46 0 800
263570915 CriticalSpy A June 1, 2024, 4 a.m. OK C++20 (GCC 13-64) TESTS 7 46 0 800
261065743 ohnoisit A May 15, 2024, 2:06 p.m. OK FPC TESTS 7 61 0 800
260851136 AbdullahAlHadi A May 13, 2024, 7:47 p.m. OK GNU C11 TESTS 7 30 102400 800
262499950 kumarchad A May 25, 2024, 11 a.m. OK GNU C11 TESTS 7 31 0 800
261062034 kohlidhoni A May 15, 2024, 1:38 p.m. OK GNU C11 TESTS 7 31 0 800
262632859 ujjwaljain2506 A May 26, 2024, 12:26 a.m. OK GNU C11 TESTS 7 31 102400 800
261992242 Virat_Garg A May 21, 2024, 9:42 a.m. OK GNU C11 TESTS 7 31 102400 800
261211114 Omi_2203101 A May 16, 2024, 2:29 p.m. OK GNU C11 TESTS 7 31 102400 800
260256714 daschristiefan008 A May 10, 2024, 1:34 p.m. OK GNU C11 TESTS 7 31 102400 800
261064081 magnuson02 A May 15, 2024, 1:53 p.m. OK GNU C11 TESTS 7 31 307200 800
262480707 anand.7 A May 25, 2024, 8:26 a.m. OK GNU C11 TESTS 7 46 0 800
261648993 notawiseman A May 19, 2024, 12:08 p.m. OK GNU C11 TESTS 7 46 0 800
260971592 PepRe A May 14, 2024, 6:30 p.m. OK Go TESTS 7 46 716800 800
260785573 docilebody A May 13, 2024, 11:13 a.m. OK Go TESTS 7 61 512000 800
260639086 01217 A May 12, 2024, 9:12 a.m. OK Go TESTS 7 61 512000 800
263111255 nguyenquocthao00 A May 29, 2024, 8:28 a.m. OK Go TESTS 7 61 819200 800
262183761 yuaren A May 22, 2024, 6:35 p.m. OK Go TESTS 7 61 819200 800
260990071 Young A May 15, 2024, 12:43 a.m. OK Go TESTS 7 62 512000 800
260783767 docilebody A May 13, 2024, 10:58 a.m. OK Go TESTS 7 187 1536000 800
262108271 Biniyamseid A May 22, 2024, 7:47 a.m. OK Haskell TESTS 7 93 0 800
262034339 october_rain A May 21, 2024, 2:34 p.m. OK Haskell TESTS 7 124 0 800
261338550 fs_fz A May 17, 2024, 1:47 p.m. OK Java 21 TESTS 7 202 307200 800
260840942 csdain A May 13, 2024, 6 p.m. OK Java 21 TESTS 7 203 409600 800
261446647 snkv A May 18, 2024, 2:09 a.m. OK Java 21 TESTS 7 218 204800 800
261336548 krish1832 A May 17, 2024, 1:32 p.m. OK Java 21 TESTS 7 233 307200 800
261784919 Mg718 A May 20, 2024, 1:18 p.m. OK Java 21 TESTS 7 234 0 800
261177156 yashvardhansingh112233 A May 16, 2024, 10:11 a.m. OK Java 21 TESTS 7 249 409600 800
262969518 mashurov2028 A May 28, 2024, 6:47 a.m. OK Java 21 TESTS 7 249 512000 800
260688812 Kshitiz_san A May 12, 2024, 4:05 p.m. OK Java 21 TESTS 7 249 512000 800
260193658 GoldenShadow A May 10, 2024, 2:20 a.m. OK Java 21 TESTS 7 249 512000 800
261246561 himneesh9 A May 16, 2024, 7:29 p.m. OK Java 21 TESTS 7 249 614400 800
261947789 continued258 A May 21, 2024, 1:22 a.m. OK Java 8 TESTS 7 124 0 800
260859991 AttackDolphin215 A May 13, 2024, 10:23 p.m. OK Java 8 TESTS 7 124 0 800
260890333 yvbf A May 14, 2024, 7:20 a.m. OK Java 8 TESTS 7 139 0 800
262955760 Ovetsar_ilish A May 28, 2024, 4:32 a.m. OK Java 8 TESTS 7 140 0 800
262502131 Sumitsingh7 A May 25, 2024, 11:21 a.m. OK Java 8 TESTS 7 140 0 800
260836981 sam_20101999 A May 13, 2024, 5:21 p.m. OK Java 8 TESTS 7 140 0 800
260812329 devil_the_coder A May 13, 2024, 2:22 p.m. OK Java 8 TESTS 7 140 0 800
261063051 dogfootone A May 15, 2024, 1:45 p.m. OK Java 8 TESTS 7 155 0 800
260489030 harsh_1806 A May 11, 2024, 5:49 a.m. OK Java 8 TESTS 7 155 0 800
260809386 RubenCP A May 13, 2024, 2 p.m. OK Java 8 TESTS 7 156 0 800
261248366 Mostafa_A_kader A May 16, 2024, 7:52 p.m. OK Kotlin 1.7 TESTS 7 374 5939200 800
260489111 jzavaglia A May 11, 2024, 5:50 a.m. OK Kotlin 1.7 TESTS 7 405 5632000 800
260953900 wz.wahffle A May 14, 2024, 4:15 p.m. OK Kotlin 1.9 TESTS 7 234 204800 800
261285058 sushilm2011 A May 17, 2024, 6:13 a.m. OK Node.js TESTS 7 93 1740800 800
261536107 Salamander_ A May 18, 2024, 1:30 p.m. OK Node.js TESTS 7 93 1843200 800
263033780 parth_7042 A May 28, 2024, 3:39 p.m. OK PHP TESTS 7 77 0 800
263087485 sankeerthanajadi A May 29, 2024, 4:59 a.m. OK PyPy 3 TESTS 7 108 2252800 800
261242979 duffyishere A May 16, 2024, 6:48 p.m. OK PyPy 3 TESTS 7 108 2560000 800
263377422 batchunikhil A May 30, 2024, 6:47 p.m. OK PyPy 3 TESTS 7 109 1945600 800
263106476 Ashutosh352 A May 29, 2024, 7:50 a.m. OK PyPy 3 TESTS 7 109 2048000 800
262684519 Cy9her A May 26, 2024, 9:53 a.m. OK PyPy 3 TESTS 7 109 2150400 800
261600111 redstormguard A May 19, 2024, 5:03 a.m. OK PyPy 3 TESTS 7 109 2150400 800
260731891 abilanger A May 13, 2024, 4:12 a.m. OK PyPy 3 TESTS 7 109 2355200 800
261050308 9c_ccccccccc A May 15, 2024, 12:10 p.m. OK PyPy 3 TESTS 7 109 2560000 800
260997549 salsab A May 15, 2024, 3:29 a.m. OK PyPy 3 TESTS 7 124 2150400 800
260985865 xfahim9 A May 14, 2024, 10:22 p.m. OK PyPy 3 TESTS 7 124 2150400 800
262008325 dona07nhanlt A May 21, 2024, 11:41 a.m. OK PyPy 3-64 TESTS 7 77 1536000 800
261435977 danib A May 17, 2024, 9:27 p.m. OK PyPy 3-64 TESTS 7 77 1536000 800
261083995 FancyIce A May 15, 2024, 4:53 p.m. OK PyPy 3-64 TESTS 7 77 1536000 800
260992060 SoleProprietor A May 15, 2024, 1:40 a.m. OK PyPy 3-64 TESTS 7 77 1536000 800
262282162 admin007 A May 23, 2024, 3:49 p.m. OK PyPy 3-64 TESTS 7 77 1638400 800
261672020 shikhar_8935 A May 19, 2024, 3:30 p.m. OK PyPy 3-64 TESTS 7 77 1638400 800
261261530 bufferacct A May 17, 2024, 12:22 a.m. OK PyPy 3-64 TESTS 7 77 1638400 800
260907350 HossamElbesh A May 14, 2024, 9:58 a.m. OK PyPy 3-64 TESTS 7 77 1638400 800
260179464 YeniRuth A May 9, 2024, 9:21 p.m. OK PyPy 3-64 TESTS 7 77 1638400 800
261689245 ow3nL A May 19, 2024, 6:06 p.m. OK PyPy 3-64 TESTS 7 78 1638400 800
261324690 avaniagr A May 17, 2024, 11:59 a.m. OK Python 3 TESTS 7 61 0 800
261016155 kit27csbs15 A May 15, 2024, 7:19 a.m. OK Python 3 TESTS 7 61 0 800
260640999 m.olimovvv A May 12, 2024, 9:28 a.m. OK Python 3 TESTS 7 61 0 800
260542601 epicman_06 A May 11, 2024, 1:32 p.m. OK Python 3 TESTS 7 61 0 800
263654845 ratul72885 A June 1, 2024, 4:14 p.m. OK Python 3 TESTS 7 62 0 800
263636241 barghav A June 1, 2024, 1:34 p.m. OK Python 3 TESTS 7 62 0 800
263573008 vatsaltrivedi509 A June 1, 2024, 4:25 a.m. OK Python 3 TESTS 7 62 0 800
263127124 BinaryWu A May 29, 2024, 10:39 a.m. OK Python 3 TESTS 7 62 0 800
262670200 Mick_8p A May 26, 2024, 8 a.m. OK Python 3 TESTS 7 62 0 800
262645746 Rakibul.Islam A May 26, 2024, 4:06 a.m. OK Python 3 TESTS 7 62 0 800
262441448 ethanjimenez A May 24, 2024, 10:24 p.m. OK Rust 2021 TESTS 7 46 0 800
261116808 Sternstunde A May 16, 2024, 2:15 a.m. OK Rust 2021 TESTS 7 46 0 800
260649162 Chalaghoram A May 12, 2024, 10:44 a.m. OK Rust 2021 TESTS 7 46 0 800
260470561 trickster_in_hit A May 11, 2024, 2:01 a.m. OK Rust 2021 TESTS 7 46 0 800
261071822 ali_rnik A May 15, 2024, 2:58 p.m. OK Rust 2021 TESTS 7 77 0 800

remove filters

Back to search problems