Neowise Labs Contest 1 (Codeforces Round 1018, Div. 1 + 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
2096 Neowise Labs Contest 1 (Codeforces Round 1018, Div. 1 + Div. 2) FINISHED False 7200 31332323 April 19, 2025, 2:35 p.m.

Problems

Solved
Index
Name
Type
Tags
Community Tag
Rating
( 456 ) F Wonderful Impostors PROGRAMMING data structures implementation two pointers

You are a proud live streamer known as Gigi Murin. Today, you will play a game with (n) viewers numbered (1) to (n). In the game, each player is either a crewmate or an impostor. You don't know the role of each viewer. There are (m) statements numbered (1) to (m), which are either true or false . For each (i) from (1) to (m), statement (i) is one of two types: (0\:a_i\:b_i) ((1 \leq a_i \leq b_i \leq n)) — there are no impostors among viewers (a_i, a_i + 1, \ldots, b_i); (1\:a_i\:b_i) ((1 \leq a_i \leq b_i \leq n)) — there is at least one impostor among viewers (a_i, a_i + 1, \ldots, b_i). Answer (q) questions of the following form: (l\:r) ((1 \leq l \leq r \leq m)) — is it possible that statements (l, l + 1, \ldots, r) are all true ? Note that it is not guaranteed that there is at least one impostor among all viewers, and it is not guaranteed that there is at least one crewmate among all viewers. Each test contains multiple test cases. The first line contains the number of test cases (t) ((1 \le t \le 10^4)). The description of the test cases follows. The first line of each test case contains two integers (n), (m) ((1 \leq n, m \leq 2 \cdot 10^5)) — the number of viewers, and the number of statements. The (i)-th of the next (m) lines contains three integers (x_i), (a_i), (b_i) ((x_i \in \{0, 1\}), (1 \leq a_i \leq b_i \leq n)) — describing statement (i). The next line contains a single integer (q) ((1 \le q \le 2 \cdot 10^5)) — the number of questions. Each of the next (q) lines contains two integers (l) and (r) ((1 \leq l \leq r \leq m)) — describing a question. It is guaranteed that the sum of (n) over all test cases does not exceed (2 \cdot 10^5), the sum of (m) over all test cases does not exceed (2 \cdot 10^5), and the sum of (q) over all test cases does not exceed $$$2 \cdot 1

Tutorials

Neowise Labs Contest 1 (Codeforces Round 1018, 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
316338990 ggg F April 20, 2025, 6:03 a.m. OK C++17 (GCC 7-32) TESTS 36 562 20684800
316274196 AiPd F April 19, 2025, 3:51 p.m. OK C++17 (GCC 7-32) TESTS 36 593 19558400
316335322 wanggk F April 20, 2025, 5:18 a.m. OK C++17 (GCC 7-32) TESTS 36 593 20787200
316285786 liyouran F April 19, 2025, 4:26 p.m. OK C++17 (GCC 7-32) TESTS 36 639 26316800
316282617 ITIS_DuyAnh F April 19, 2025, 4:16 p.m. OK C++17 (GCC 7-32) TESTS 36 718 15257600
316274503 ABCaCaCa_ F April 19, 2025, 3:52 p.m. OK C++17 (GCC 7-32) TESTS 36 889 17612800
316314174 kai824 F April 19, 2025, 9:19 p.m. OK C++17 (GCC 7-32) TESTS 36 906 29184000
316304684 TadijaSebez F April 19, 2025, 7:09 p.m. OK C++17 (GCC 7-32) TESTS 36 983 23961600
316291467 toilanvd_HUST F April 19, 2025, 5:12 p.m. OK C++17 (GCC 7-32) TESTS 36 984 23142400
316322022 urosk F April 20, 2025, 12:53 a.m. OK C++17 (GCC 7-32) TESTS 36 1108 130150400
316272567 Z-301 F April 19, 2025, 3:47 p.m. OK C++20 (GCC 13-64) TESTS 36 484 46899200
316309182 kaiboy F April 19, 2025, 8:05 p.m. OK C++20 (GCC 13-64) TESTS 36 499 10956800
316335085 wsc2008qwq F April 20, 2025, 5:15 a.m. OK C++20 (GCC 13-64) TESTS 36 499 29184000
316308476 kaiboy F April 19, 2025, 7:56 p.m. OK C++20 (GCC 13-64) TESTS 36 515 10956800
316279915 Daniel777 F April 19, 2025, 4:08 p.m. OK C++20 (GCC 13-64) TESTS 36 515 39526400
316318694 jeroenodb F April 19, 2025, 11:04 p.m. OK C++20 (GCC 13-64) TESTS 36 515 76800000
316284421 qwq123 F April 19, 2025, 4:22 p.m. OK C++20 (GCC 13-64) TESTS 36 531 29184000
316275531 shiomusubi496 F April 19, 2025, 3:55 p.m. OK C++20 (GCC 13-64) TESTS 36 546 30720000
316319284 jeroenodb F April 19, 2025, 11:22 p.m. OK C++20 (GCC 13-64) TESTS 36 546 76902400
316283355 YocyCraft F April 19, 2025, 4:19 p.m. OK C++20 (GCC 13-64) TESTS 36 561 24883200
316327612 interlude F April 20, 2025, 3:04 a.m. OK C++23 (GCC 14-64, msys2) TESTS 36 359 34304000
316276972 maspy F April 19, 2025, 3:59 p.m. OK C++23 (GCC 14-64, msys2) TESTS 36 390 23449600
316313510 Aotsuki F April 19, 2025, 9:07 p.m. OK C++23 (GCC 14-64, msys2) TESTS 36 421 24883200
316305426 aaryaibtedafoyez F April 19, 2025, 7:18 p.m. OK C++23 (GCC 14-64, msys2) TESTS 36 421 46899200
316315310 ko_osaga F April 19, 2025, 9:40 p.m. OK C++23 (GCC 14-64, msys2) TESTS 36 437 25804800
316326305 A_G F April 20, 2025, 2:35 a.m. OK C++23 (GCC 14-64, msys2) TESTS 36 468 7884800
316313002 ecnerwala F April 19, 2025, 8:59 p.m. OK C++23 (GCC 14-64, msys2) TESTS 36 483 34713600
316334662 STB6 F April 20, 2025, 5:09 a.m. OK C++23 (GCC 14-64, msys2) TESTS 36 499 29286400
316334173 STB6 F April 20, 2025, 5:02 a.m. OK C++23 (GCC 14-64, msys2) TESTS 36 530 29286400
316308085 abezr88 F April 19, 2025, 7:51 p.m. OK C++23 (GCC 14-64, msys2) TESTS 36 561 30822400
316308698 rainboy F April 19, 2025, 7:59 p.m. OK GNU C11 TESTS 36 1233 10137600
316300727 arnabmanna F April 19, 2025, 6:27 p.m. OK Java 8 TESTS 36 1046 78643200

remove filters

Back to search problems