Educational Codeforces Round 167 (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
1989 Educational Codeforces Round 167 (Rated for Div. 2) FINISHED False 7200 17681063 June 27, 2024, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 19251 ) C Two Movies PROGRAMMING greedy

B"A movie company has released 2 movies. These 2 movies were watched by n people. For each person, we know their attitude towards the first movie (liked it, neutral, or disliked it) and towards the second movie. If a person is asked to leave a review for the movie, then: Every person will review exactly one movie -- and for every person, you can choose which movie they will review. The company's rating is the minimum of the ratings of the two movies. Your task is to calculate the maximum possible rating of the company. The first line contains a single integer t ( 1 <= t <= 10^4 ) -- the number of test cases. The first line of each test case contains a single integer n ( 1 <= n <= 2 cdot 10^5 ). The second line contains n integers a_1, a_2, ... , a_n ( -1 <= a_i <= 1 ), where a_i is equal to -1 if the first movie was disliked by the i -th viewer; equal to 1 if the first movie was liked; and 0 if the attitude is neutral. The third line contains n integers b_1, b_2, ... , b_n ( -1 <= b_i <= 1 ), where b_i is equal to -1 if the second movie was disliked by the i -th viewer; equal to 1 if the second movie was liked; and 0 if the attitude is neutral. Additional constraint on the input: the sum of n over all test cases does not exceed 2 cdot 10^5 . For each test case, print a single integer -- the maximum possible rating of the company, if for each person, choose which movie to leave a review on. "...

Tutorials

Educational Codeforces Round 167 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
267871759 15532256331 C June 28, 2024, 2:19 p.m. OK C++14 (GCC 6-32) TESTS 10 78 1638400
267941433 yogeshrajput63 C June 29, 2024, 3:51 a.m. OK C++14 (GCC 6-32) TESTS 10 93 0
267941403 eeeeeel C June 29, 2024, 3:50 a.m. OK C++14 (GCC 6-32) TESTS 10 93 0
267877316 Voltair C June 28, 2024, 2:58 p.m. OK C++14 (GCC 6-32) TESTS 10 93 0
267795709 DEAD_TCT C June 28, 2024, 2:14 a.m. OK C++14 (GCC 6-32) TESTS 10 93 1638400
267835155 zhouzepeng_2023 C June 28, 2024, 9:43 a.m. OK C++14 (GCC 6-32) TESTS 10 93 1638400
267951326 Komeijizen C June 29, 2024, 5:54 a.m. OK C++14 (GCC 6-32) TESTS 10 93 3276800
267801699 skangude5 C June 28, 2024, 4:50 a.m. OK C++14 (GCC 6-32) TESTS 10 108 0
267936554 Marinkovic C June 29, 2024, 2:30 a.m. OK C++14 (GCC 6-32) TESTS 10 108 0
267859404 anuragtomar10 C June 28, 2024, 12:51 p.m. OK C++14 (GCC 6-32) TESTS 10 108 1638400
267861066 Snowball_511 C June 28, 2024, 1:02 p.m. OK C++17 (GCC 7-32) TESTS 10 78 0
267860840 Snowball_511 C June 28, 2024, 1 p.m. OK C++17 (GCC 7-32) TESTS 10 92 0
267906203 JoksimKaktus C June 28, 2024, 6:26 p.m. OK C++17 (GCC 7-32) TESTS 10 93 0
267948860 Eeezoe C June 29, 2024, 5:25 a.m. OK C++17 (GCC 7-32) TESTS 10 93 0
267947454 jensonjenkins C June 29, 2024, 5:09 a.m. OK C++17 (GCC 7-32) TESTS 10 93 0
267945149 abracodeabra C June 29, 2024, 4:39 a.m. OK C++17 (GCC 7-32) TESTS 10 93 0
267931542 DiegoIvan C June 29, 2024, 12:42 a.m. OK C++17 (GCC 7-32) TESTS 10 93 0
267922441 Jorgitox C June 28, 2024, 9:32 p.m. OK C++17 (GCC 7-32) TESTS 10 93 0
267918351 mokshkajaliya_2230 C June 28, 2024, 8:33 p.m. OK C++17 (GCC 7-32) TESTS 10 93 0
267906187 SH_989 C June 28, 2024, 6:26 p.m. OK C++17 (GCC 7-32) TESTS 10 93 0
267896697 Master32WSP C June 28, 2024, 5:10 p.m. OK C++20 (GCC 13-64) TESTS 10 46 307200
267843667 MVP_DukeX C June 28, 2024, 10:46 a.m. OK C++20 (GCC 13-64) TESTS 10 62 102400
267941213 peiyinsong C June 29, 2024, 3:47 a.m. OK C++20 (GCC 13-64) TESTS 10 62 1638400
267930241 smilemask C June 29, 2024, 12:10 a.m. OK C++20 (GCC 13-64) TESTS 10 62 3276800
267936275 lucky_cloud C June 29, 2024, 2:26 a.m. OK C++20 (GCC 13-64) TESTS 10 62 3379200
267794558 Duck_sajin C June 28, 2024, 1:33 a.m. OK C++20 (GCC 13-64) TESTS 10 77 0
267847464 programmingysx C June 28, 2024, 11:16 a.m. OK C++20 (GCC 13-64) TESTS 10 77 3174400
267798513 yyyz04 C June 28, 2024, 3:39 a.m. OK C++20 (GCC 13-64) TESTS 10 77 7987200
267942279 SkyWave2022 C June 29, 2024, 4:03 a.m. OK C++20 (GCC 13-64) TESTS 10 78 2355200
267795945 TLE_Automaton C June 28, 2024, 2:22 a.m. OK C++20 (GCC 13-64) TESTS 10 78 2457600
267924788 bluemegane C June 28, 2024, 10:14 p.m. OK C# 8 TESTS 10 171 20480000
267827354 atharvatol04 C June 28, 2024, 8:48 a.m. OK GNU C11 TESTS 10 108 3174400
267883848 Boomchillsss C June 28, 2024, 3:40 p.m. OK GNU C11 TESTS 10 124 921600
267931070 1435730 C June 29, 2024, 12:31 a.m. OK GNU C11 TESTS 10 124 1638400
267835522 alotoffunlol C June 28, 2024, 9:45 a.m. OK Go TESTS 10 140 4608000
267804270 ramitg254 C June 28, 2024, 5:22 a.m. OK Java 21 TESTS 10 265 307200
267802383 amit_roy C June 28, 2024, 5:01 a.m. OK Java 21 TESTS 10 265 614400
267898973 rumpy_pumpy C June 28, 2024, 5:29 p.m. OK Java 21 TESTS 10 281 819200
267911958 Siddharth_Singh_here C June 28, 2024, 7:21 p.m. OK Java 21 TESTS 10 296 614400
267871769 ItsLever C June 28, 2024, 2:19 p.m. OK Java 21 TESTS 10 296 2048000
267827196 vk_45 C June 28, 2024, 8:47 a.m. OK Java 21 TESTS 10 311 307200
267826136 vikash_45 C June 28, 2024, 8:39 a.m. OK Java 21 TESTS 10 311 307200
267865326 Mg718 C June 28, 2024, 1:33 p.m. OK Java 21 TESTS 10 311 716800
267864418 Sylvester_ C June 28, 2024, 1:27 p.m. OK Java 21 TESTS 10 312 102400
267898838 testtest111ksjfrdvn C June 28, 2024, 5:28 p.m. OK Java 21 TESTS 10 312 819200
267848783 ND_ C June 28, 2024, 11:27 a.m. OK Java 8 TESTS 10 155 0
267805785 nis1234 C June 28, 2024, 5:39 a.m. OK Java 8 TESTS 10 155 0
267868320 Sumitsingh7 C June 28, 2024, 1:55 p.m. OK Java 8 TESTS 10 171 8192000
267874084 bommidilaxman1017 C June 28, 2024, 2:35 p.m. OK Java 8 TESTS 10 186 0
267848705 ND_ C June 28, 2024, 11:26 a.m. OK Java 8 TESTS 10 187 0
267796449 achyut88 C June 28, 2024, 2:37 a.m. OK Java 8 TESTS 10 218 1638400
267893428 beingrajkamal C June 28, 2024, 4:45 p.m. OK Java 8 TESTS 10 515 0
267896772 xsmoker C June 28, 2024, 5:11 p.m. OK Java 8 TESTS 10 561 0
267882926 divyanshubissa88 C June 28, 2024, 3:34 p.m. OK Java 8 TESTS 10 561 0
267880994 Yash0204 C June 28, 2024, 3:21 p.m. OK Java 8 TESTS 10 561 0
267835864 y4n9b0 C June 28, 2024, 9:48 a.m. OK Kotlin 1.9 TESTS 10 312 8704000
267854052 timur_jalgasbaev C June 28, 2024, 12:08 p.m. OK PyPy 3 TESTS 10 421 15462400
267863480 Nash_Okano C June 28, 2024, 1:20 p.m. OK PyPy 3 TESTS 10 437 14643200
267883227 MuhammadAhmad_27 C June 28, 2024, 3:36 p.m. OK PyPy 3 TESTS 10 453 15257600
267935015 maverickYK C June 29, 2024, 2:04 a.m. OK PyPy 3 TESTS 10 468 15360000
267865958 joycode C June 28, 2024, 1:38 p.m. OK PyPy 3 TESTS 10 499 15257600
267821874 Rakeshyamjala C June 28, 2024, 8:08 a.m. OK PyPy 3 TESTS 10 562 21606400
267937371 hxu10 C June 29, 2024, 2:44 a.m. OK PyPy 3-64 TESTS 10 187 26521600
267855390 sorashika C June 28, 2024, 12:19 p.m. OK PyPy 3-64 TESTS 10 187 28057600
267853435 bergus C June 28, 2024, 12:04 p.m. OK PyPy 3-64 TESTS 10 202 22220800
267794761 mikeac C June 28, 2024, 1:40 a.m. OK PyPy 3-64 TESTS 10 202 27750400
267885804 lean_shorty C June 28, 2024, 3:54 p.m. OK PyPy 3-64 TESTS 10 202 28262400
267862881 tlsgusrb314 C June 28, 2024, 1:15 p.m. OK PyPy 3-64 TESTS 10 202 29184000
267807908 qishui7 C June 28, 2024, 5:58 a.m. OK PyPy 3-64 TESTS 10 202 32256000
267815793 akashpotturi C June 28, 2024, 7:08 a.m. OK PyPy 3-64 TESTS 10 202 32870400
267894360 oneman38669 C June 28, 2024, 4:52 p.m. OK PyPy 3-64 TESTS 10 217 30003200
267808069 pusheen_1024 C June 28, 2024, 5:59 a.m. OK PyPy 3-64 TESTS 10 218 23244800
267888302 Rohith_32432 C June 28, 2024, 4:10 p.m. OK Python 3 TESTS 10 171 16281600
267850002 Lehan_peddineni C June 28, 2024, 11:37 a.m. OK Python 3 TESTS 10 171 16281600
267831392 lokureddy07 C June 28, 2024, 9:16 a.m. OK Python 3 TESTS 10 171 16281600
267831287 2100030468 C June 28, 2024, 9:15 a.m. OK Python 3 TESTS 10 171 16281600
267909442 sumitgupta45 C June 28, 2024, 6:55 p.m. OK Python 3 TESTS 10 202 14131200
267831479 2100030468 C June 28, 2024, 9:16 a.m. OK Python 3 TESTS 10 203 12288000
267832924 Virtuoso633 C June 28, 2024, 9:26 a.m. OK Python 3 TESTS 10 218 13926400
267937050 zFa3 C June 29, 2024, 2:39 a.m. OK Python 3 TESTS 10 234 32153600
267884744 princeDanger C June 28, 2024, 3:46 p.m. OK Python 3 TESTS 10 249 12185600
267803446 ___a_s_1_2___ C June 28, 2024, 5:13 a.m. OK Python 3 TESTS 10 249 12595200
267852060 AvDjah C June 28, 2024, 11:53 a.m. OK Ruby 3 TESTS 10 452 44236800
267936166 123gjweq2 C June 29, 2024, 2:24 a.m. OK Rust 2021 TESTS 10 77 819200
267852332 vstiff C June 28, 2024, 11:55 a.m. OK Rust 2021 TESTS 10 78 3891200
267842895 kshitij C June 28, 2024, 10:40 a.m. OK Rust 2021 TESTS 10 108 17100800
267846978 var4yn C June 28, 2024, 11:12 a.m. OK Rust 2021 TESTS 10 124 16998400

remove filters

Back to search problems