Codeforces Round 1074 (Div. 4)

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
2185 Codeforces Round 1074 (Div. 4) FINISHED False 8100 7658723 Jan. 18, 2026, 2:35 p.m.

Problems

Solved
Index
Name
Type
Tags
Community Tag
Rating
( 10040 ) E The Robotic Rush PROGRAMMING binary search implementation two pointers

There exists an infinitely long number line. On the number line, there are (n) robots and (m) spikes, each located at a specific point on the number line. The (i)-th robot is located at position (a_i), and the (i)-th spike is located at position (b_i). If a robot touches a spike, it dies. (k) instructions are transmitted to the robots, with each instruction being to either move left by one unit or to move right by one unit. For each value (i) ((1 \leq i \leq k)), output how many robots are still alive after the first (i) instructions have been processed. The first line of the input contains a single integer (t) ((1 \leq t \leq 10^4)) — the number of test cases. The first line of each test case contains three integers (n, m, k) ((1 \le n, m, k \le 2 \cdot 10^5)) — the number of robots, spikes, and instructions respectively. The second line contains (n) integers (a_1, a_2, \ldots, a_n) ((0 \le a_i \le 10^9)) — the locations of the robots. It is guaranteed that all elements of (a) are distinct. The third line contains (m) integers (b_1, b_2, \ldots, b_m) ((0 \le b_i \le 10^9)) — the locations of the spikes. It is guaranteed that all elements of (b) are distinct. The fourth line contains a string of length (k) — the instructions transmitted to the robots. Each character is either (L), representing an instruction to move to the left, or (R), representing an instruction to move to the right. It is guaranteed that the sum of each of (n, m, k) over all test cases does not exceed (2 \cdot 10^5). Additional constraint : it is guaranteed that there are no robots and spikes at the same position. Output (k) integers, where the (i)-th integer indicates how many robots are alive after the first (i) instructions have been processed. For Python users, make sure to select PyPy3 / PyPy2 (depending on which version of Python you're using) i

Tutorials

Codeforces Round 1074 (Div. 4) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
358674001 Uniocean E Jan. 19, 2026, 3:34 a.m. OK C++17 (GCC 7-32) TESTS 10 140 6963200
358632547 Agni0410 E Jan. 18, 2026, 4:46 p.m. OK C++17 (GCC 7-32) TESTS 10 156 716800
358630063 justinhh E Jan. 18, 2026, 4:42 p.m. OK C++17 (GCC 7-32) TESTS 10 156 819200
358651196 yorichi13 E Jan. 18, 2026, 6:52 p.m. OK C++17 (GCC 7-32) TESTS 10 156 2252800
358632911 nitheeshchowdary26 E Jan. 18, 2026, 4:46 p.m. OK C++17 (GCC 7-32) TESTS 10 156 2355200
358656646 m4y4nk_ E Jan. 18, 2026, 8:08 p.m. OK C++17 (GCC 7-32) TESTS 10 156 2355200
358633701 itzme09 E Jan. 18, 2026, 4:47 p.m. OK C++17 (GCC 7-32) TESTS 10 156 2355200
358630914 Denge E Jan. 18, 2026, 4:44 p.m. OK C++17 (GCC 7-32) TESTS 10 156 3686400
358634611 Ahmed_Elbadry1234 E Jan. 18, 2026, 4:48 p.m. OK C++17 (GCC 7-32) TESTS 10 156 5529600
358630718 aadicodesdaily E Jan. 18, 2026, 4:43 p.m. OK C++17 (GCC 7-32) TESTS 10 171 716800
358631125 altshreyas E Jan. 18, 2026, 4:44 p.m. OK C++20 (GCC 13-64) TESTS 10 125 614400
358630862 hashPratikk E Jan. 18, 2026, 4:43 p.m. OK C++20 (GCC 13-64) TESTS 10 125 2048000
358635328 Nagmani E Jan. 18, 2026, 4:49 p.m. OK C++20 (GCC 13-64) TESTS 10 125 4403200
358667387 Galaxy_Ivan E Jan. 19, 2026, 1:32 a.m. OK C++20 (GCC 13-64) TESTS 10 125 4505600
358637487 VshwkM07 E Jan. 18, 2026, 5 p.m. OK C++20 (GCC 13-64) TESTS 10 125 4710400
358633184 jatin2006 E Jan. 18, 2026, 4:47 p.m. OK C++20 (GCC 13-64) TESTS 10 125 4710400
358675014 Kalditeen E Jan. 19, 2026, 3:50 a.m. OK C++20 (GCC 13-64) TESTS 10 125 8396800
358657884 Alex_Belu E Jan. 18, 2026, 8:30 p.m. OK C++20 (GCC 13-64) TESTS 10 125 11673600
358657006 Abuseini E Jan. 18, 2026, 8:14 p.m. OK C++20 (GCC 13-64) TESTS 10 140 716800
358633390 ast592006 E Jan. 18, 2026, 4:47 p.m. OK C++20 (GCC 13-64) TESTS 10 140 2764800
358660224 kske E Jan. 18, 2026, 9:18 p.m. OK C++23 (GCC 14-64, msys2) TESTS 10 78 2764800
358634932 iamAditya-Pandey E Jan. 18, 2026, 4:49 p.m. OK C++23 (GCC 14-64, msys2) TESTS 10 109 4505600
358646168 nehl E Jan. 18, 2026, 6:01 p.m. OK C++23 (GCC 14-64, msys2) TESTS 10 125 102400
358650733 DarkMatrix E Jan. 18, 2026, 6:46 p.m. OK C++23 (GCC 14-64, msys2) TESTS 10 125 512000
358660756 Dell_Know E Jan. 18, 2026, 9:32 p.m. OK C++23 (GCC 14-64, msys2) TESTS 10 125 512000
358659971 kske E Jan. 18, 2026, 9:12 p.m. OK C++23 (GCC 14-64, msys2) TESTS 10 125 512000
358634063 ozasone E Jan. 18, 2026, 4:48 p.m. OK C++23 (GCC 14-64, msys2) TESTS 10 125 512000
358631800 Nykyo E Jan. 18, 2026, 4:45 p.m. OK C++23 (GCC 14-64, msys2) TESTS 10 125 819200
358635314 ashutoshkr24012001 E Jan. 18, 2026, 4:49 p.m. OK C++23 (GCC 14-64, msys2) TESTS 10 125 2150400
358636116 modi.yash3108 E Jan. 18, 2026, 4:52 p.m. OK C++23 (GCC 14-64, msys2) TESTS 10 125 2867200
358633533 hollow_knight_27 E Jan. 18, 2026, 4:47 p.m. OK C# 8 TESTS 10 281 37171200
358647381 NenadDapic E Jan. 18, 2026, 6:13 p.m. OK FPC TESTS 10 265 3072000
358646639 NenadDapic E Jan. 18, 2026, 6:05 p.m. OK FPC TESTS 10 328 3072000
358633990 pragyan__ E Jan. 18, 2026, 4:48 p.m. OK GNU C11 TESTS 10 937 5734400
358635047 warrior66766 E Jan. 18, 2026, 4:49 p.m. OK GNU C11 TESTS 10 968 5120000
358633225 Hsaka_nox E Jan. 18, 2026, 4:47 p.m. OK GNU C11 TESTS 10 984 6860800
358635421 Kashmam E Jan. 18, 2026, 4:49 p.m. OK GNU C11 TESTS 10 1000 4096000
358636850 warrior66766 E Jan. 18, 2026, 4:56 p.m. OK GNU C11 TESTS 10 1015 5734400
358635728 Azurebeast-69420 E Jan. 18, 2026, 4:49 p.m. OK GNU C11 TESTS 10 1031 7372800
358631838 Yo-Pta E Jan. 18, 2026, 4:45 p.m. OK Go TESTS 10 453 39526400
358649778 rajeevrebel_34 E Jan. 18, 2026, 6:36 p.m. OK Go TESTS 10 531 109977600
358654413 rajeevrebel_34 E Jan. 18, 2026, 7:34 p.m. OK Go TESTS 10 546 108032000
358653771 rajeevrebel_34 E Jan. 18, 2026, 7:24 p.m. OK Go TESTS 10 546 110387200
358684017 swords1234 E Jan. 19, 2026, 5:43 a.m. OK Go TESTS 10 1265 14336000
358678495 swords1234 E Jan. 19, 2026, 4:42 a.m. OK Go TESTS 10 1281 15360000
358635582 ILikeThemThicc E Jan. 18, 2026, 4:49 p.m. OK Go TESTS 10 1296 11878400
358678818 swords1234 E Jan. 19, 2026, 4:46 a.m. OK Go TESTS 10 1312 14643200
358685704 InvariantCut E Jan. 19, 2026, 6 a.m. OK Java 21 TESTS 10 375 9113600
358655497 HarshitYash E Jan. 18, 2026, 7:51 p.m. OK Java 21 TESTS 10 390 15462400
358631280 RuDr7A E Jan. 18, 2026, 4:44 p.m. OK Java 21 TESTS 10 421 7475200
358631766 premkur5555 E Jan. 18, 2026, 4:45 p.m. OK Java 21 TESTS 10 437 17408000
358629104 EVILBUSTER E Jan. 18, 2026, 4:41 p.m. OK Java 21 TESTS 10 453 10444800
358631776 crypt_nick E Jan. 18, 2026, 4:45 p.m. OK Java 21 TESTS 10 484 19558400
358678680 shyamPrajapat E Jan. 19, 2026, 4:45 a.m. OK Java 21 TESTS 10 531 716800
358636742 AminjonAmonov E Jan. 18, 2026, 4:56 p.m. OK Java 21 TESTS 10 562 27033600
358634878 ChinmayGhosh E Jan. 18, 2026, 4:49 p.m. OK Java 21 TESTS 10 625 19353600
358645315 Satyasarthi E Jan. 18, 2026, 5:54 p.m. OK Java 21 TESTS 10 625 41164800
358629060 jamwal47 E Jan. 18, 2026, 4:41 p.m. OK Java 8 TESTS 10 296 12697600
358635419 suhridpaulofficial E Jan. 18, 2026, 4:49 p.m. OK Java 8 TESTS 10 312 20684800
358632130 Picklzes E Jan. 18, 2026, 4:45 p.m. OK Java 8 TESTS 10 484 15974400
358662613 abhayrajnegi0416 E Jan. 18, 2026, 10:28 p.m. OK Java 8 TESTS 10 718 20480000
358634107 Mr.Curious E Jan. 18, 2026, 4:48 p.m. OK Java 8 TESTS 10 828 20070400
358631417 hetshah16 E Jan. 18, 2026, 4:44 p.m. OK Java 8 TESTS 10 921 4403200
358651604 Techoo5 E Jan. 18, 2026, 6:56 p.m. OK Java 8 TESTS 10 1109 73932800
358683665 jagbarrameda E Jan. 19, 2026, 5:40 a.m. OK Kotlin 2.2 TESTS 10 984 64102400
358632676 Aroson E Jan. 18, 2026, 4:46 p.m. OK PyPy 3 TESTS 10 828 21504000
358661462 crucious E Jan. 18, 2026, 9:50 p.m. OK PyPy 3 TESTS 10 859 30924800
358635084 nandini_ch22 E Jan. 18, 2026, 4:49 p.m. OK PyPy 3 TESTS 10 953 20684800
358630690 shxd1k E Jan. 18, 2026, 4:43 p.m. OK PyPy 3 TESTS 10 953 25804800
358664258 xashh E Jan. 18, 2026, 11:34 p.m. OK PyPy 3 TESTS 10 1015 50073600
358658604 chyragym E Jan. 18, 2026, 8:44 p.m. OK PyPy 3-64 TESTS 10 234 36147200
358629231 Dash10107 E Jan. 18, 2026, 4:41 p.m. OK PyPy 3-64 TESTS 10 281 29286400
358660059 OAY71011 E Jan. 18, 2026, 9:15 p.m. OK PyPy 3-64 TESTS 10 312 36352000
358657437 kaushik.atla E Jan. 18, 2026, 8:21 p.m. OK PyPy 3-64 TESTS 10 328 37990400
358633007 ihsanul.huq.25 E Jan. 18, 2026, 4:46 p.m. OK PyPy 3-64 TESTS 10 328 38195200
358630404 akshay_2211 E Jan. 18, 2026, 4:43 p.m. OK PyPy 3-64 TESTS 10 343 40243200
358629814 7vik-13 E Jan. 18, 2026, 4:42 p.m. OK PyPy 3-64 TESTS 10 343 40550400
358643340 doubtfulfish E Jan. 18, 2026, 5:39 p.m. OK PyPy 3-64 TESTS 10 375 29798400
358638329 kaikaiwnk E Jan. 18, 2026, 5:05 p.m. OK PyPy 3-64 TESTS 10 375 34201600
358628904 dulat_akbulatov E Jan. 18, 2026, 4:41 p.m. OK PyPy 3-64 TESTS 10 375 35328000
358661397 yesh1212 E Jan. 18, 2026, 9:48 p.m. OK Python 3 TESTS 10 609 37990400
358639419 iamthe_orm E Jan. 18, 2026, 5:12 p.m. OK Python 3 TESTS 10 687 101376000
358632318 snehasishghosh115 E Jan. 18, 2026, 4:45 p.m. OK Python 3 TESTS 10 734 49254400
358631773 Ipsit E Jan. 18, 2026, 4:45 p.m. OK Python 3 TESTS 10 734 49254400
358676421 Ne_xt_ E Jan. 19, 2026, 4:11 a.m. OK Python 3 TESTS 10 828 45056000
358638925 Vishal3463 E Jan. 18, 2026, 5:08 p.m. OK Python 3 TESTS 10 859 36147200
358680771 khantnandeesh3205 E Jan. 19, 2026, 5:10 a.m. OK Python 3 TESTS 10 921 70553600
358673900 mxq E Jan. 19, 2026, 3:33 a.m. OK Python 3 TESTS 10 921 94822400
358662765 VioletVal E Jan. 18, 2026, 10:33 p.m. OK Python 3 TESTS 10 953 119091200
358638349 AminjonAmonov E Jan. 18, 2026, 5:05 p.m. OK Python 3 TESTS 10 1156 124928000
358681369 Spheniscine E Jan. 19, 2026, 5:16 a.m. OK Rust 2021 TESTS 10 187 17305600
358672669 Spheniscine E Jan. 19, 2026, 3:14 a.m. OK Rust 2021 TESTS 10 187 20172800

remove filters

Back to search problems