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 |
---|---|---|---|---|---|---|
1185 | Codeforces Round 568 (Div. 2) | FINISHED | False | 8100 | 176483687 | June 19, 2019, 2:45 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 2067 ) | F | Two Pizzas | PROGRAMMING | bitmasks brute force | 2200 |
B'A company of n friends wants to order exactly two pizzas. It is known that in total there are 9 pizza ingredients in nature, which are denoted by integers from 1 to 9 . Each of the n friends has one or more favorite ingredients: the i -th of friends has the number of favorite ingredients equal to f_i ( 1 <= f_i <= 9 ) and your favorite ingredients form the sequence b_{i1}, b_{i2}, ... , b_{if_i} ( 1 <= b_{it} <= 9 ). The website of CodePizza restaurant has exactly m ( m ge 2 ) pizzas. Each pizza is characterized by a set of r_j ingredients a_{j1}, a_{j2}, ... , a_{jr_j} ( 1 <= r_j <= 9 , 1 <= a_{jt} <= 9 ) , which are included in it, and its price is c_j . Help your friends choose exactly two pizzas in such a way as to please the maximum number of people in the company. It is known that a person is pleased with the choice if each of his/her favorite ingredients is in at least one ordered pizza. If there are several ways to choose two pizzas so as to please the maximum number of friends, then choose the one that minimizes the total price of two pizzas. The first line of the input contains two integers n and m ( 1 <= n <= 10^5, 2 <= m <= 10^5 ) -- the number of friends in the company and the number of pizzas, respectively. Next, the n lines contain descriptions of favorite ingredients of the friends: the i -th of them contains the number of favorite ingredients f_i ( 1 <= f_i <= 9 ) and a sequence of distinct integers b_{i1}, b_{i2}, ... , b_{if_i} ( 1 <= b_{it} <= 9 ). Next, the m lines contain pizza descriptions: the j -th of them contains the integer price of the pizza c_j ( 1 <= c_j <= 10^9 ), the number of ingredients r_j ( 1 <= r_j <= 9 ) and the ingredients themselves as a sequence of distinct integers a_{j1}, a_{j2}, ... , a_{jr_j} ( 1 <= a_{jt} <= 9'... |
Editorial for Codeforces Round #568 (Div. 2) |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
55971344 | llbra9z | F | June 23, 2019, 2:59 p.m. | OK | GNU C11 | TESTS | 105 | 156 | 409600 | 2200 | |
55820236 | jschr | F | June 20, 2019, 8:13 a.m. | OK | GNU C11 | TESTS | 103 | 171 | 0 | 2200 | |
55820318 | lzoilxy | F | June 20, 2019, 8:15 a.m. | OK | GNU C++11 | TESTS | 103 | 46 | 0 | 2200 | |
55966311 | sjc_fan | F | June 23, 2019, 12:19 p.m. | OK | GNU C++11 | TESTS | 105 | 46 | 204800 | 2200 | |
61214201 | luogu_bot2 | F | Sept. 24, 2019, 12:18 p.m. | OK | GNU C++11 | TESTS | 105 | 46 | 2150400 | 2200 | |
56034516 | luogu_bot4 | F | June 25, 2019, 11:25 a.m. | OK | GNU C++11 | TESTS | 105 | 46 | 2150400 | 2200 | |
55954668 | LJC00118 | F | June 23, 2019, 6:09 a.m. | OK | GNU C++11 | TESTS | 105 | 46 | 2150400 | 2200 | |
55860641 | disangan233 | F | June 21, 2019, 9:23 a.m. | OK | GNU C++11 | TESTS | 105 | 46 | 2150400 | 2200 | |
55857589 | xht37 | F | June 21, 2019, 7:48 a.m. | OK | GNU C++11 | TESTS | 105 | 46 | 6553600 | 2200 | |
55811519 | PaulShi | F | June 20, 2019, 4:05 a.m. | OK | GNU C++11 | TESTS | 103 | 62 | 1228800 | 2200 | |
55822869 | uet_wannabered | F | June 20, 2019, 9:23 a.m. | OK | GNU C++11 | TESTS | 103 | 62 | 3993600 | 2200 | |
55958674 | Dedicatus545 | F | June 23, 2019, 8:34 a.m. | OK | GNU C++11 | TESTS | 105 | 62 | 44339200 | 2200 | |
55831557 | QAQAutoMaton | F | June 20, 2019, 1:24 p.m. | OK | GNU C++14 | TESTS | 103 | 31 | 4198400 | 2200 | |
55809659 | sunshiness | F | June 20, 2019, 2:42 a.m. | OK | GNU C++14 | TESTS | 103 | 77 | 2457600 | 2200 | |
56191445 | tokitsukaze | F | June 28, 2019, 7:50 a.m. | OK | GNU C++14 | TESTS | 105 | 93 | 2764800 | 2200 | |
55825752 | cuibst2 | F | June 20, 2019, 10:46 a.m. | OK | GNU C++14 | TESTS | 103 | 171 | 0 | 2200 | |
55869279 | samuelfgs | F | June 21, 2019, 1:50 p.m. | OK | GNU C++14 | TESTS | 105 | 171 | 2457600 | 2200 | |
55810364 | sanketrai | F | June 20, 2019, 3:16 a.m. | OK | GNU C++14 | TESTS | 103 | 187 | 3379200 | 2200 | |
55874908 | hitonanode | F | June 21, 2019, 4:57 p.m. | OK | GNU C++14 | TESTS | 105 | 187 | 3891200 | 2200 | |
56018895 | NurCorezzi | F | June 25, 2019, 12:53 a.m. | OK | GNU C++14 | TESTS | 105 | 202 | 2355200 | 2200 | |
57724614 | mayiyang | F | July 25, 2019, 6:45 a.m. | OK | GNU C++14 | TESTS | 105 | 202 | 2355200 | 2200 | |
56167786 | klimoza | F | June 27, 2019, 3:02 p.m. | OK | GNU C++14 | TESTS | 105 | 202 | 2355200 | 2200 | |
66492265 | Edgaru089 | F | Dec. 8, 2019, 8:59 a.m. | OK | GNU C++17 | TESTS | 105 | 156 | 819200 | 2200 | |
55862772 | achvanov | F | June 21, 2019, 10:28 a.m. | OK | GNU C++17 | TESTS | 105 | 171 | 204800 | 2200 | |
55846067 | mohamedeltair | F | June 20, 2019, 9:30 p.m. | OK | GNU C++17 | TESTS | 105 | 171 | 819200 | 2200 | |
55838398 | coder_h | F | June 20, 2019, 4:36 p.m. | OK | GNU C++17 | TESTS | 105 | 171 | 2355200 | 2200 | |
56871166 | hansc3380 | F | July 12, 2019, 6:28 a.m. | OK | GNU C++17 | TESTS | 105 | 186 | 2969600 | 2200 | |
56079607 | zhaoy1ping | F | June 26, 2019, 2:34 p.m. | OK | GNU C++17 | TESTS | 105 | 202 | 204800 | 2200 | |
60169032 | valerikk | F | Sept. 6, 2019, 12:09 p.m. | OK | GNU C++17 | TESTS | 105 | 202 | 2252800 | 2200 | |
56158955 | ivan100sic | F | June 27, 2019, 11:32 a.m. | OK | GNU C++17 | TESTS | 105 | 202 | 2355200 | 2200 | |
64165026 | Mai-sanBestWaifu | F | Nov. 3, 2019, 3:57 p.m. | OK | GNU C++17 | TESTS | 105 | 202 | 2355200 | 2200 | |
56054185 | okwedook | F | June 25, 2019, 9:32 p.m. | OK | GNU C++17 | TESTS | 105 | 202 | 2355200 | 2200 | |
55867940 | rahsutamrev | F | June 21, 2019, 1:09 p.m. | OK | Java 8 | TESTS | 105 | 124 | 0 | 2200 | |
55975311 | saptarshim | F | June 23, 2019, 5:07 p.m. | OK | Java 8 | TESTS | 105 | 155 | 0 | 2200 | |
59236996 | beginner1010 | F | Aug. 21, 2019, 5:51 p.m. | OK | Java 8 | TESTS | 105 | 171 | 0 | 2200 | |
56489486 | spar5h | F | July 3, 2019, 8:32 p.m. | OK | Java 8 | TESTS | 105 | 202 | 0 | 2200 | |
56034190 | revanthreddy85 | F | June 25, 2019, 11:15 a.m. | OK | Java 8 | TESTS | 105 | 280 | 0 | 2200 | |
56020462 | Oopsimbad | F | June 25, 2019, 2:47 a.m. | OK | Java 8 | TESTS | 105 | 280 | 0 | 2200 | |
56295153 | mennafadali | F | June 30, 2019, 5:17 a.m. | OK | Java 8 | TESTS | 105 | 327 | 0 | 2200 | |
55858217 | jenil1999 | F | June 21, 2019, 8:08 a.m. | OK | Java 8 | TESTS | 105 | 327 | 0 | 2200 | |
59341201 | its_aks_ulure | F | Aug. 23, 2019, 7:37 a.m. | OK | Java 8 | TESTS | 105 | 343 | 0 | 2200 | |
58993804 | Jarik | F | Aug. 18, 2019, 10:25 a.m. | OK | Java 8 | TESTS | 105 | 358 | 0 | 2200 | |
56428508 | S.K | F | July 2, 2019, 10:55 a.m. | OK | MS C++ | TESTS | 105 | 156 | 409600 | 2200 | |
55914304 | tang0404 | F | June 22, 2019, 4:29 a.m. | OK | MS C++ | TESTS | 105 | 233 | 409600 | 2200 | |
56753810 | xsc | F | July 9, 2019, 1:01 p.m. | OK | MS C++ 2017 | TESTS | 105 | 280 | 1228800 | 2200 | |
60664565 | pichulia | F | Sept. 16, 2019, 7:15 a.m. | OK | MS C++ 2017 | TESTS | 105 | 296 | 409600 | 2200 | |
56770503 | pseuda | F | July 9, 2019, 9:20 p.m. | OK | MS C++ 2017 | TESTS | 105 | 717 | 921600 | 2200 | |
55859574 | aytal.d | F | June 21, 2019, 8:50 a.m. | OK | MS C++ 2017 | TESTS | 105 | 780 | 0 | 2200 | |
55859628 | aytal.d | F | June 21, 2019, 8:52 a.m. | OK | MS C++ 2017 | TESTS | 105 | 795 | 0 | 2200 | |
61191067 | pajenegod | F | Sept. 24, 2019, 2:45 a.m. | OK | PyPy 2 | TESTS | 105 | 327 | 55603200 | 2200 | |
58246816 | yumtam | F | Aug. 4, 2019, 5:51 a.m. | OK | PyPy 2 | TESTS | 105 | 920 | 16793600 | 2200 | |
56642593 | Pokeylope | F | July 7, 2019, 3:21 a.m. | OK | PyPy 3 | TESTS | 105 | 638 | 10137600 | 2200 | |
56067274 | pineriver | F | June 26, 2019, 8:36 a.m. | OK | PyPy 3 | TESTS | 105 | 826 | 11468800 | 2200 | |
55991395 | ThePonyCoder | F | June 24, 2019, 7:52 a.m. | OK | PyPy 3 | TESTS | 105 | 3900 | 12492800 | 2200 | |
57553746 | Helli.code | F | July 22, 2019, 6:37 p.m. | OK | Python 2 | TESTS | 105 | 1418 | 1843200 | 2200 | |
55837949 | yakamoto | F | June 20, 2019, 4:23 p.m. | OK | Scala | TESTS | 105 | 779 | 0 | 2200 |
Back to search problems