Codeforces Round 1077 (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
2187 Codeforces Round 1077 (Div. 1) FINISHED False 10800 6708323 Jan. 29, 2026, 2:35 p.m.

Problems

Solved
Index
Name
Type
Tags
Community Tag
Rating
( 312 ) E Doors and Keys PROGRAMMING data structures dp

There are (n+1) rooms arranged in a line, numbered from (1) to (n+1) from left to right. There are also (n) doors numbered from (1) to (n), where the (i)-th door connects rooms (i) and (i+1). Each door (i) has an associated non-negative integer (a_i). You are given a binary string(^{\text{∗}}) (s) of length (n). For each (1 \le i \le n): If (s_i=1), then room (i) initially contains one key. Otherwise, room (i) contains no key. At the beginning of the (0)-th second, you are in room (1), and all doors are closed. For each (k \ge 0), the following events will happen in order in the (k)-th second: At the beginning of the (k)-th second, all doors (j) with (a_j=k) will open. Suppose you are in room (i): If you are not carrying any keys and there is at least one key in room (i), you may pick it up and carry it with you. If you are carrying a key, you may drop it in room (i). If you are not carrying any keys and there is at least one key in room (i), you may pick it up and carry it with you. If you are carrying a key, you may drop it in room (i). At the end of the (k)-th second: You may move to room (i+1). If door (i) is still closed, you have to be carrying a key to move to room (i+1). The key will be consumed after use, and door (i) will open. You may move to room (i-1) if (i>1). You may stay in room (i). You may move to room (i+1). If door (i) is still closed, you have to be carrying a key to move to room (i+1). The key will be consumed after use, and door (i) will open. You may move to room (i-1) if (i>1). You may stay in room (i). For any door, no matter how it was opened (automatically or with a key), it will remain open forever. At any moment, you may carry with you at most one key. Also, even though initially each room contains at most one key, during the process, multip

Tutorials

Codeforces Round 1077 (Div. 1, Div. 2) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
360602874 ItsMyGo E Jan. 29, 2026, 5 p.m. OK C++17 (GCC 7-32) TESTS 26 328 25088000
360568342 Um_nik E Jan. 29, 2026, 3:56 p.m. OK C++17 (GCC 7-32) TESTS 26 1000 1843200
360590169 Ormlis E Jan. 29, 2026, 4:32 p.m. OK C++20 (GCC 13-64) TESTS 26 171 14336000
360652215 Dinprosperity E Jan. 30, 2026, 2:22 a.m. OK C++20 (GCC 13-64) TESTS 26 437 1843200
360639552 Intellegent E Jan. 29, 2026, 9:22 p.m. OK C++20 (GCC 13-64) TESTS 26 515 102400
360597438 EnuTieTie E Jan. 29, 2026, 4:48 p.m. OK C++20 (GCC 13-64) TESTS 26 578 806400000
360659207 strapple E Jan. 30, 2026, 4:22 a.m. OK C++20 (GCC 13-64) TESTS 26 640 2662400
360580139 tourist E Jan. 29, 2026, 4:14 p.m. OK C++20 (GCC 13-64) TESTS 26 765 0
360658332 strapple E Jan. 30, 2026, 4:09 a.m. OK C++20 (GCC 13-64) TESTS 26 765 305664000
360652990 Austin__Griffin E Jan. 30, 2026, 2:39 a.m. OK C++20 (GCC 13-64) TESTS 26 1015 921600
360612481 ecnerwala E Jan. 29, 2026, 5:26 p.m. OK C++23 (GCC 14-64, msys2) TESTS 26 140 0
360606363 yuto1115 E Jan. 29, 2026, 5:09 p.m. OK C++23 (GCC 14-64, msys2) TESTS 26 156 2150400
360624511 DigitalVest E Jan. 29, 2026, 6:44 p.m. OK C++23 (GCC 14-64, msys2) TESTS 26 218 15052800
360661993 Ahmed_AL-Jebali E Jan. 30, 2026, 4:54 a.m. OK C++23 (GCC 14-64, msys2) TESTS 26 296 102400
360611794 antontrygubO_o E Jan. 29, 2026, 5:24 p.m. OK C++23 (GCC 14-64, msys2) TESTS 26 359 0
360613154 showtime E Jan. 29, 2026, 5:27 p.m. OK C++23 (GCC 14-64, msys2) TESTS 26 390 0
360605947 XVIII E Jan. 29, 2026, 5:08 p.m. OK C++23 (GCC 14-64, msys2) TESTS 26 421 102400
360589556 jeroenodb E Jan. 29, 2026, 4:31 p.m. OK C++23 (GCC 14-64, msys2) TESTS 26 484 0
360593913 ksun48 E Jan. 29, 2026, 4:40 p.m. OK C++23 (GCC 14-64, msys2) TESTS 26 484 385843200
360630047 RestlessMonk E Jan. 29, 2026, 7:32 p.m. OK C++23 (GCC 14-64, msys2) TESTS 26 500 102400
360664350 MBBN E Jan. 30, 2026, 5:16 a.m. OK Java 21 TESTS 26 609 12288000
360655147 Little_Sheep_Yawn E Jan. 30, 2026, 3:18 a.m. OK PyPy 3-64 TESTS 26 1359 27750400

remove filters

Back to search problems