Codeforces Round 860 (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
1798 Codeforces Round 860 (Div. 2) FINISHED False 7200 57425062 March 26, 2023, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 17114 ) B Three Sevens PROGRAMMING brute force data structures greedy implementation 1000

B'Lottery "Three Sevens" was held for m days. On day i , n_i people with the numbers a_{i, 1}, ldots, a_{i, n_i} participated in the lottery. It is known that in each of the m days, only one winner was selected from the lottery participants. The lottery winner on day i was not allowed to participate in the lottery in the days from i+1 to m . Unfortunately, the information about the lottery winners has been lost. You need to find any possible list of lottery winners on days from 1 to m or determine that no solution exists. Each test contains multiple test cases. The first line contains the number of test cases t ( 1 <= t <= 50 ,000 ). The description of the test cases follows. The first line of each test case contains a single integer m ( 1 <= m <= 50 ,000 ) -- the number of days in which the lottery was held. Next, for each i from 1 to m , follows a two-line block of data. The first line of each block contains a single integer n_i ( 1 <= n_i <= 50 ,000 ) -- the number of lottery participants on day i . The second line of the block contains integers a_{i, 1}, ldots, a_{i, n_i} ( 1 <= a_{i, j} <= 50 ,000 ) -- lottery participants on day i . It is guaranteed that all the numbers a_{i, 1}, ldots, a_{i, n_i} are pairwise distinct. It is guaranteed that the sum of n_i over all blocks of all test cases does not exceed 50 ,000 . For each test case, if there is no solution, print a single integer -1 . Otherwise, print m integers p_1, p_2, ldots, p_m ( 1 <= p_i <= 50 ,000 ) -- lottery winners on days from 1 to m . If there are multiple solutions, print any of them. In the first test case, one of the answers is [8, 2, 1] since the participant with the number 8 participated on day 1 , but did not participate on days 2 and 3 ; the participant with the'...

Tutorials

Editorial of Codeforces Round 860 (Div. 2)

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
199406593 StarLord_07 B March 27, 2023, 12:33 p.m. OK C# 10 TESTS 15 358 11673600 1000
199483222 seekdeep B March 28, 2023, 3:05 a.m. OK Clang++17 Diagnostics TESTS 15 935 819200 1000
199808277 HLY-JXT B March 30, 2023, 10:21 a.m. OK Clang++17 Diagnostics TESTS 15 1777 18636800 1000
199482946 seekdeep B March 28, 2023, 2:59 a.m. OK Clang++17 Diagnostics TESTS 15 1996 4608000 1000
199527438 XLzh B March 28, 2023, 11:44 a.m. OK Clang++20 Diagnostics TESTS 15 920 14950400 1000
199575509 xrenvtomate566 B March 28, 2023, 5:52 p.m. OK Clang++20 Diagnostics TESTS 15 1278 11571200 1000
200066987 Tomato_bandit B April 1, 2023, 3:13 a.m. OK Clang++20 Diagnostics TESTS 15 1622 22220800 1000
199419138 AkashGaneriwal B March 27, 2023, 2:07 p.m. OK Clang++20 Diagnostics TESTS 15 1637 26828800 1000
199423484 Awesome3.14 B March 27, 2023, 2:39 p.m. OK D TESTS 15 124 13824000 1000
199581357 LR_Wahid B March 28, 2023, 6:50 p.m. OK GNU C11 TESTS 15 1887 819200 1000
199613524 DreamSpaceDream B March 29, 2023, 3:29 a.m. OK GNU C++14 TESTS 15 31 819200 1000
199549459 Mark_YZT B March 28, 2023, 2:29 p.m. OK GNU C++14 TESTS 15 31 1843200 1000
199482449 Edoky_docy B March 28, 2023, 2:49 a.m. OK GNU C++14 TESTS 15 31 1945600 1000
199950316 daduoli B March 31, 2023, 1:23 p.m. OK GNU C++14 TESTS 15 46 819200 1000
199417528 Alaskan B March 27, 2023, 1:55 p.m. OK GNU C++14 TESTS 15 46 1024000 1000
199703685 Mr_White_ B March 29, 2023, 12:56 p.m. OK GNU C++14 TESTS 15 46 1843200 1000
199425773 AkaiLemon B March 27, 2023, 2:56 p.m. OK GNU C++14 TESTS 15 46 1843200 1000
199838456 _zay B March 30, 2023, 2:27 p.m. OK GNU C++14 TESTS 15 46 1945600 1000
199623697 Lambent_Light B March 29, 2023, 6:06 a.m. OK GNU C++14 TESTS 15 46 1945600 1000
199400798 Xu_Hongxi B March 27, 2023, 11:43 a.m. OK GNU C++14 TESTS 15 46 1945600 1000
200077471 Nabuko B April 1, 2023, 5:35 a.m. OK GNU C++17 TESTS 15 31 1843200 1000
199627316 hl666 B March 29, 2023, 6:49 a.m. OK GNU C++17 TESTS 15 31 2048000 1000
199423366 agarwal_vaibhav B March 27, 2023, 2:38 p.m. OK GNU C++17 TESTS 15 31 2048000 1000
199539439 CUMT-MJZ B March 28, 2023, 1:17 p.m. OK GNU C++17 TESTS 15 31 2150400 1000
199827607 fallow.man B March 30, 2023, 1:15 p.m. OK GNU C++17 TESTS 15 31 2355200 1000
199431234 Perfect.Blue B March 27, 2023, 3:40 p.m. OK GNU C++17 TESTS 15 31 4608000 1000
199522071 bkifhr10 B March 28, 2023, 11 a.m. OK GNU C++17 TESTS 15 46 1024000 1000
199820923 lllei B March 30, 2023, 12:17 p.m. OK GNU C++17 TESTS 15 46 1843200 1000
199816593 _zay B March 30, 2023, 11:39 a.m. OK GNU C++17 TESTS 15 46 1945600 1000
199638848 abcpony B March 29, 2023, 9:05 a.m. OK GNU C++17 TESTS 15 46 1945600 1000
199616351 vioalbert B March 29, 2023, 4:20 a.m. OK GNU C++17 (64) TESTS 15 30 716800 1000
199731234 andreas B March 29, 2023, 4:30 p.m. OK GNU C++17 (64) TESTS 15 31 2662400 1000
199923401 IrisQAQ B March 31, 2023, 8:48 a.m. OK GNU C++17 (64) TESTS 15 31 3481600 1000
199923466 Shukuang B March 31, 2023, 8:49 a.m. OK GNU C++17 (64) TESTS 15 31 3686400 1000
199561974 toniskrijelj B March 28, 2023, 4:04 p.m. OK GNU C++17 (64) TESTS 15 31 15052800 1000
199915456 wygzgyw B March 31, 2023, 7:05 a.m. OK GNU C++17 (64) TESTS 15 46 2457600 1000
199480790 qwind B March 28, 2023, 2:12 a.m. OK GNU C++17 (64) TESTS 15 46 2560000 1000
199435612 briel_abreu B March 27, 2023, 4:16 p.m. OK GNU C++17 (64) TESTS 15 46 2662400 1000
199875022 mnndq B March 30, 2023, 7:23 p.m. OK GNU C++17 (64) TESTS 15 46 3584000 1000
199717898 Hi-TechMissile B March 29, 2023, 2:38 p.m. OK GNU C++17 (64) TESTS 15 46 4608000 1000
199532965 I_wanna_be_a_cat B March 28, 2023, 12:27 p.m. OK GNU C++20 (64) TESTS 15 30 4915200 1000
199521296 shiraki-yu B March 28, 2023, 10:53 a.m. OK GNU C++20 (64) TESTS 15 30 4915200 1000
199517636 Fish_L B March 28, 2023, 10:17 a.m. OK GNU C++20 (64) TESTS 15 31 1126400 1000
199557412 nguyenducthien808 B March 28, 2023, 3:29 p.m. OK GNU C++20 (64) TESTS 15 31 2252800 1000
199400365 dimashirik B March 27, 2023, 11:39 a.m. OK GNU C++20 (64) TESTS 15 31 2252800 1000
199874480 5835194088_KienNT B March 30, 2023, 7:16 p.m. OK GNU C++20 (64) TESTS 15 31 2355200 1000
199516162 Navin_Kumar B March 28, 2023, 10 a.m. OK GNU C++20 (64) TESTS 15 31 2457600 1000
200059410 Mohamed_AbdElmawla B April 1, 2023, 12:35 a.m. OK GNU C++20 (64) TESTS 15 31 2662400 1000
200053772 vjudge1 B March 31, 2023, 10:19 p.m. OK GNU C++20 (64) TESTS 15 31 2662400 1000
199945348 akash_iitr25 B March 31, 2023, 12:37 p.m. OK GNU C++20 (64) TESTS 15 31 2662400 1000
199699666 amon_get B March 29, 2023, 12:26 p.m. OK Go TESTS 15 265 5324800 1000
199572948 ImtiazCho B March 28, 2023, 5:31 p.m. OK Go TESTS 15 311 6246400 1000
199420024 ImtiazCho B March 27, 2023, 2:13 p.m. OK Go TESTS 15 358 6246400 1000
199903825 XIN B March 31, 2023, 4:06 a.m. OK Java 11 TESTS 15 218 0 1000
199407228 Panther369 B March 27, 2023, 12:38 p.m. OK Java 11 TESTS 15 218 0 1000
199423792 jyoti360 B March 27, 2023, 2:41 p.m. OK Java 11 TESTS 15 218 5836800 1000
199500757 nonesl B March 28, 2023, 7:14 a.m. OK Java 11 TESTS 15 248 0 1000
199442375 madarin_utk B March 27, 2023, 5:14 p.m. OK Java 11 TESTS 15 249 0 1000
199430694 Yash9890 B March 27, 2023, 3:36 p.m. OK Java 11 TESTS 15 249 6553600 1000
199503981 iamdimonis B March 28, 2023, 7:50 a.m. OK Java 11 TESTS 15 405 0 1000
199469660 creativegiant B March 27, 2023, 10:06 p.m. OK Java 11 TESTS 15 514 0 1000
199410606 bleach__ B March 27, 2023, 1:05 p.m. OK Java 11 TESTS 15 529 15872000 1000
199576311 J99 B March 28, 2023, 5:59 p.m. OK Java 11 TESTS 15 545 0 1000
200026430 merlin_ B March 31, 2023, 5:27 p.m. OK Java 17 TESTS 15 248 3072000 1000
199518639 rated21 B March 28, 2023, 10:27 a.m. OK Java 17 TESTS 15 249 6656000 1000
199447312 not_just_rr B March 27, 2023, 5:59 p.m. OK Java 17 TESTS 15 280 5734400 1000
199628535 PizzaLovers007 B March 29, 2023, 7:04 a.m. OK Java 17 TESTS 15 358 6451200 1000
199413909 wintersoldier2004 B March 27, 2023, 1:29 p.m. OK Java 17 TESTS 15 405 0 1000
200068191 mukhopadhyaypushan42 B April 1, 2023, 3:32 a.m. OK Java 17 TESTS 15 420 5427200 1000
199496059 Nanthakumar06 B March 28, 2023, 6:21 a.m. OK Java 17 TESTS 15 483 5222400 1000
199402061 prathamtyagii B March 27, 2023, 11:55 a.m. OK Java 17 TESTS 15 498 12390400 1000
199552268 dhorne B March 28, 2023, 2:49 p.m. OK Java 17 TESTS 15 561 4300800 1000
199561571 dhorne B March 28, 2023, 4:01 p.m. OK Java 17 TESTS 15 592 5017600 1000
199519172 ankit_0207 B March 28, 2023, 10:33 a.m. OK Java 8 TESTS 15 140 4300800 1000
200067671 KKKZOZ B April 1, 2023, 3:24 a.m. OK Java 8 TESTS 15 155 4710400 1000
199459706 ahmedTarek28 B March 27, 2023, 8:12 p.m. OK Java 8 TESTS 15 156 0 1000
199409217 amit_roy B March 27, 2023, 12:54 p.m. OK Java 8 TESTS 15 171 6041600 1000
199635494 oneafter B March 29, 2023, 8:29 a.m. OK Java 8 TESTS 15 218 4403200 1000
199582168 rhymes17 B March 28, 2023, 6:58 p.m. OK Java 8 TESTS 15 420 3276800 1000
199821096 Parth_Pandey B March 30, 2023, 12:19 p.m. OK Java 8 TESTS 15 451 0 1000
199568723 pavandandu B March 28, 2023, 4:59 p.m. OK Java 8 TESTS 15 452 0 1000
199548629 p_310598 B March 28, 2023, 2:23 p.m. OK Java 8 TESTS 15 467 4198400 1000
199410643 sanskar2904 B March 27, 2023, 1:05 p.m. OK Java 8 TESTS 15 592 5529600 1000
199404508 SlavaG B March 27, 2023, 12:15 p.m. OK Kotlin 1.7 TESTS 15 998 87859200 1000
199755884 rastkos189 B March 29, 2023, 8:48 p.m. OK Mono C# TESTS 15 452 11059200 1000
200076469 cz1137 B April 1, 2023, 5:24 a.m. OK MS C++ 2017 TESTS 15 124 3481600 1000
199562727 helenmie B March 28, 2023, 4:10 p.m. OK MS C++ 2017 TESTS 15 140 3481600 1000
199419526 EbuYandex B March 27, 2023, 2:10 p.m. OK MS C++ 2017 TESTS 15 280 2457600 1000
199533627 Aayush5sep B March 28, 2023, 12:32 p.m. OK MS C++ 2017 TESTS 15 311 3584000 1000
199430496 Vlasov211 B March 27, 2023, 3:35 p.m. OK MS C++ 2017 TESTS 15 498 1843200 1000
199432124 Marcus_Rashford B March 27, 2023, 3:47 p.m. OK MS C++ 2017 TESTS 15 966 716800 1000
199556802 jingw B March 28, 2023, 3:24 p.m. OK MS C++ 2017 TESTS 15 1887 614400 1000
199617103 sam123456666 B March 29, 2023, 4:32 a.m. OK PyPy 3 TESTS 15 218 14336000 1000
199450916 Yash_Nandwana B March 27, 2023, 6:33 p.m. OK PyPy 3 TESTS 15 248 16384000 1000
199609357 NonprincipalUltrafilter B March 29, 2023, 2:12 a.m. OK PyPy 3 TESTS 15 249 13312000 1000
199398247 5af B March 27, 2023, 11:19 a.m. OK PyPy 3 TESTS 15 1278 10137600 1000
199932807 takshaheryar B March 31, 2023, 10:33 a.m. OK PyPy 3 TESTS 15 1310 11366400 1000
199751411 hedley.gisbourne B March 29, 2023, 8 p.m. OK PyPy 3 TESTS 15 1310 14336000 1000
199406355 shivam.bansal1098 B March 27, 2023, 12:31 p.m. OK PyPy 3 TESTS 15 1372 10240000 1000
199445781 psg_07 B March 27, 2023, 5:45 p.m. OK PyPy 3 TESTS 15 1372 11878400 1000
199595013 elementary.god B March 28, 2023, 9:27 p.m. OK PyPy 3 TESTS 15 1372 11980800 1000
199467360 jinzew B March 27, 2023, 9:33 p.m. OK PyPy 3 TESTS 15 1403 12902400 1000
199399813 onemoreq B March 27, 2023, 11:34 a.m. OK PyPy 3-64 TESTS 15 155 9216000 1000
199487612 OmarMoBadr B March 28, 2023, 4:19 a.m. OK PyPy 3-64 TESTS 15 155 10547200 1000
199421060 DP_FORMULA B March 27, 2023, 2:21 p.m. OK PyPy 3-64 TESTS 15 171 10752000 1000
200072232 pennymagic156 B April 1, 2023, 4:33 a.m. OK PyPy 3-64 TESTS 15 171 19251200 1000
199812246 meat124 B March 30, 2023, 11 a.m. OK PyPy 3-64 TESTS 15 187 12902400 1000
199778484 nealzane B March 30, 2023, 4 a.m. OK PyPy 3-64 TESTS 15 187 37580800 1000
199917681 rishabh.jaiswal B March 31, 2023, 7:36 a.m. OK PyPy 3-64 TESTS 15 202 18432000 1000
199480999 Youarenotgood B March 28, 2023, 2:17 a.m. OK PyPy 3-64 TESTS 15 202 18841600 1000
199715940 mani_sarthak B March 29, 2023, 2:23 p.m. OK PyPy 3-64 TESTS 15 217 14540800 1000
199413715 cruim B March 27, 2023, 1:28 p.m. OK PyPy 3-64 TESTS 15 217 26521600 1000
199611778 p0ff B March 29, 2023, 3:01 a.m. OK Python 3 TESTS 15 217 7782400 1000
199518776 Parag_AP B March 28, 2023, 10:29 a.m. OK Python 3 TESTS 15 264 5222400 1000
199780726 AbdulRahmanLuai B March 30, 2023, 4:42 a.m. OK Python 3 TESTS 15 296 6451200 1000
199555160 artur_1st_ B March 28, 2023, 3:11 p.m. OK Python 3 TESTS 15 327 5632000 1000
199939538 KovalevRuslanNN B March 31, 2023, 11:41 a.m. OK Python 3 TESTS 15 342 5632000 1000
199752190 jamerrq B March 29, 2023, 8:09 p.m. OK Python 3 TESTS 15 405 11366400 1000
199430683 Vlasov211 B March 27, 2023, 3:36 p.m. OK Python 3 TESTS 15 607 4812800 1000
199406096 wzxnigulas B March 27, 2023, 12:28 p.m. OK Python 3 TESTS 15 623 4812800 1000
199463284 kibr B March 27, 2023, 8:47 p.m. OK Python 3 TESTS 15 623 5939200 1000
199894852 AlphaZero56 B March 31, 2023, 12:32 a.m. OK Python 3 TESTS 15 639 4812800 1000
200037866 DeadFox B March 31, 2023, 7:11 p.m. OK Rust 2021 TESTS 15 31 4198400 1000
199811315 nirlep5252 B March 30, 2023, 10:51 a.m. OK Rust 2021 TESTS 15 61 5836800 1000
199475510 nairb B March 28, 2023, 12:05 a.m. OK Rust 2021 TESTS 15 592 5529600 1000
199587966 Milrosen B March 28, 2023, 8:08 p.m. OK Rust 2021 TESTS 15 1294 4403200 1000

remove filters

Back to search problems