Codeforces Round 950 (Div. 3)

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
1980 Codeforces Round 950 (Div. 3) FINISHED False 8100 19754663 June 3, 2024, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 1046 ) F2 Field Division (hard version) PROGRAMMING math sortings

B"This is a hard version of the problem; it differs from the easy version only by the question. The easy version only needs you to print whether some values are non-zero or not. The hard version needs you to print the exact values. Alice and Bob are dividing the field. The field is a rectangle of size n x m ( 2 <= n, m <= 10^9 ); the rows are numbered from 1 to n from top to bottom, and the columns are numbered from 1 to m from left to right. The cell at the intersection of row r and column c is denoted as ( r, c ). Bob has k ( 2 <= k <= 2 cdot 10^5 ) fountains, all of them are located in different cells of the field. Alice is responsible for dividing the field, but she must meet several conditions: Alice wants to divide the field in such a way as to get as many cells as possible. Bob wants to keep ownership of all the fountains, but he can give one of them to Alice. First, output the integer alpha -- the maximum possible size of Alice's plot, if Bob does not give her any fountain (i.e., all fountains will remain on Bob's plot). Then output k non-negative integers a_1, a_2, ... , a_k , where a_i is a value such that after Bob gives Alice the i -th fountain, the maximum size of her plot will be alpha + a_i . 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 three integers n , m , and k ( 2 <= n, m <= 10^9 , 2 <= k <= 2 cdot 10^5 ) -- the field sizes and the number of fountains, respectively. Then follow k lines, each containing two numbers r_i and c_i ( 1 <= r_i <= n , 1 <= c_i <= m ) -- the coordinates of the cell with the i -th fountain. It is guaranteed that all cells are distinct and none of them is ( n, 1 ). It is guaranteed that the sum of k over all test cases does not exce"...

Tutorials

130135

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
264081123 ImmortaLimit F2 June 4, 2024, 4:55 a.m. OK C++14 (GCC 6-32) TESTS 13 140 29900800
264086007 Yue_chen F2 June 4, 2024, 5:49 a.m. OK C++17 (GCC 7-32) TESTS 13 171 1126400
264046043 PhenomSG F2 June 3, 2024, 6:35 p.m. OK C++17 (GCC 7-32) TESTS 13 171 1126400
264069273 ShiroRinne F2 June 4, 2024, 1:51 a.m. OK C++17 (GCC 7-32) TESTS 13 171 1945600
264053805 UIT.Doft F2 June 3, 2024, 8 p.m. OK C++17 (GCC 7-32) TESTS 13 171 3993600
264062414 Sparkle_Twilight F2 June 3, 2024, 10:35 p.m. OK C++17 (GCC 7-32) TESTS 13 171 5222400
264079879 elijjah F2 June 4, 2024, 4:40 a.m. OK C++17 (GCC 7-32) TESTS 13 186 307200
264071173 Sempr F2 June 4, 2024, 2:17 a.m. OK C++17 (GCC 7-32) TESTS 13 187 5324800
264070986 Sempr F2 June 4, 2024, 2:14 a.m. OK C++17 (GCC 7-32) TESTS 13 187 5427200
264049615 engr.robiul F2 June 3, 2024, 7:12 p.m. OK C++17 (GCC 7-32) TESTS 13 187 6451200
264060066 jsiso_practice F2 June 3, 2024, 9:39 p.m. OK C++17 (GCC 7-32) TESTS 13 187 8601600
264075209 2333_ F2 June 4, 2024, 3:28 a.m. OK C++20 (GCC 13-64) TESTS 13 93 14643200
264074281 Huangyf F2 June 4, 2024, 3:13 a.m. OK C++20 (GCC 13-64) TESTS 13 125 307200
264044228 kjhhjki F2 June 3, 2024, 6:19 p.m. OK C++20 (GCC 13-64) TESTS 13 125 409600
264072577 LNian F2 June 4, 2024, 2:43 a.m. OK C++20 (GCC 13-64) TESTS 13 125 1126400
264069668 Junz_LJL F2 June 4, 2024, 2 a.m. OK C++20 (GCC 13-64) TESTS 13 139 1126400
264059560 kaiboy F2 June 3, 2024, 9:28 p.m. OK C++20 (GCC 13-64) TESTS 13 139 7270400
264046349 ch.ingelsson F2 June 3, 2024, 6:38 p.m. OK C++20 (GCC 13-64) TESTS 13 140 2662400
264078653 XLY_RGHI F2 June 4, 2024, 4:22 a.m. OK C++20 (GCC 13-64) TESTS 13 140 2764800
264046716 weirdflexbutok F2 June 3, 2024, 6:42 p.m. OK C++20 (GCC 13-64) TESTS 13 140 2764800
264041681 dqjm F2 June 3, 2024, 5:56 p.m. OK C++20 (GCC 13-64) TESTS 13 140 2764800
264035049 Gassa F2 June 3, 2024, 5:07 p.m. OK D TESTS 13 421 10752000
264033591 Gassa F2 June 3, 2024, 5 p.m. OK D TESTS 13 499 10752000
264070174 minibin F2 June 4, 2024, 2:05 a.m. OK Java 21 TESTS 13 671 22732800
264043356 dzhi F2 June 3, 2024, 6:11 p.m. OK Java 21 TESTS 13 1655 104038400
264072013 Yousef_Badr F2 June 4, 2024, 2:33 a.m. OK Java 8 TESTS 13 1031 38400000
264071989 faresbadr316 F2 June 4, 2024, 2:32 a.m. OK Java 8 TESTS 13 1031 38400000
264060810 SoleProprietor F2 June 3, 2024, 9:56 p.m. OK PyPy 3-64 TESTS 13 827 89907200
264060677 kidus72 F2 June 3, 2024, 9:53 p.m. OK PyPy 3-64 TESTS 13 827 92569600
264060214 citrinitas F2 June 3, 2024, 9:41 p.m. OK PyPy 3-64 TESTS 13 1108 46694400
264083553 OLOGY F2 June 4, 2024, 5:22 a.m. OK Python 3 TESTS 13 859 71884800
264083120 OLOGY F2 June 4, 2024, 5:18 a.m. OK Python 3 TESTS 13 967 71884800

remove filters

Back to search problems