Codeforces Round 744 (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
1579 Codeforces Round 744 (Div. 3) FINISHED False 8100 104340263 Sept. 28, 2021, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 16358 ) D Productive Meeting PROGRAMMING graphs greedy

B'An important meeting is to be held and there are exactly n people invited. At any moment, any two people can step back and talk in private. The same two people can talk several (as many as they want) times per meeting. Each person has limited sociability. The sociability of the i -th person is a non-negative integer a_i . This means that after exactly a_i talks this person leaves the meeting (and does not talk to anyone else anymore). If a_i = 0 , the i -th person leaves the meeting immediately after it starts. A meeting is considered most productive if the maximum possible number of talks took place during it. You are given an array of sociability a , determine which people should talk to each other so that the total number of talks is as large as possible. The first line contains an integer t ( 1 <= t <= 1000 ) -- the number of test cases. The next 2t lines contain descriptions of the test cases. The first line of each test case description contains an integer n ( 2 <= n <= 2 cdot 10^5 ) --the number of people in the meeting. The second line consists of n space-separated integers a_1, a_2, ... , a_n ( 0 <= a_i <= 2 cdot 10^5 ) -- the sociability parameters of all people. It is guaranteed that the sum of n over all test cases does not exceed 2 cdot 10^5 . It is also guaranteed that the sum of all a_i (over all test cases and all i ) does not exceed 2 cdot 10^5 . Print t answers to all test cases. On the first line of each answer print the number k -- the maximum number of talks possible in a meeting. On each of the next k lines print two integers i and j ( 1 <= i, j <= n and i neq j ) -- the numbers of people who will have another talk. If there are several possible answers, you may print any of them. '...

Tutorials

Codeforces Round #744 (Div. 3) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
130279214 aalhadk D Sept. 29, 2021, 3:08 p.m. OK GNU C11 TESTS 12 452 5324800
130256070 LduShallowdream D Sept. 29, 2021, 11:09 a.m. OK GNU C++14 TESTS 12 46 6963200
130244120 Geeklog D Sept. 29, 2021, 8:42 a.m. OK GNU C++14 TESTS 12 62 6963200
130249198 tokitsukaze D Sept. 29, 2021, 9:44 a.m. OK GNU C++14 TESTS 12 62 7577600
130259910 Githm D Sept. 29, 2021, 11:51 a.m. OK GNU C++14 TESTS 12 77 6451200
130250526 camnguyenmeow D Sept. 29, 2021, 10 a.m. OK GNU C++14 TESTS 12 77 9011200
130228301 CFM_1 D Sept. 29, 2021, 5:01 a.m. OK GNU C++14 TESTS 12 77 22937600
130266934 confidencemen D Sept. 29, 2021, 1:05 p.m. OK GNU C++14 TESTS 12 78 5836800
130282966 yycyyc D Sept. 29, 2021, 3:50 p.m. OK GNU C++14 TESTS 12 78 6860800
130247710 refresh888 D Sept. 29, 2021, 9:25 a.m. OK GNU C++14 TESTS 12 78 7475200
130252060 yateng817 D Sept. 29, 2021, 10:20 a.m. OK GNU C++14 TESTS 12 78 7782400
130262900 DerekYeh D Sept. 29, 2021, 12:22 p.m. OK GNU C++17 TESTS 12 77 5734400
130252745 fishcathu. D Sept. 29, 2021, 10:28 a.m. OK GNU C++17 TESTS 12 77 6348800
130264988 Luicosas D Sept. 29, 2021, 12:45 p.m. OK GNU C++17 TESTS 12 77 6656000
130255288 cutewj D Sept. 29, 2021, 10:59 a.m. OK GNU C++17 TESTS 12 77 7475200
130255234 OldTomatofun D Sept. 29, 2021, 10:59 a.m. OK GNU C++17 TESTS 12 77 7475200
130282875 2017487 D Sept. 29, 2021, 3:49 p.m. OK GNU C++17 TESTS 12 77 7475200
130222322 YugiHacker2 D Sept. 29, 2021, 3:06 a.m. OK GNU C++17 TESTS 12 77 7987200
130248572 jr_zlw D Sept. 29, 2021, 9:36 a.m. OK GNU C++17 TESTS 12 77 8499200
130247592 adorable__26 D Sept. 29, 2021, 9:24 a.m. OK GNU C++17 TESTS 12 77 8499200
130279433 Kagutsuchi D Sept. 29, 2021, 3:10 p.m. OK GNU C++17 TESTS 12 77 18944000
130264092 crokel D Sept. 29, 2021, 12:36 p.m. OK GNU C++17 (64) TESTS 12 61 8499200
130251428 Robin D Sept. 29, 2021, 10:11 a.m. OK GNU C++17 (64) TESTS 12 62 7270400
130304609 mArGoThEqUeEn D Sept. 29, 2021, 9:52 p.m. OK GNU C++17 (64) TESTS 12 62 7270400
130246501 Crime_and_Punishment D Sept. 29, 2021, 9:10 a.m. OK GNU C++17 (64) TESTS 12 62 7475200
130257831 ylq_s_hanpi D Sept. 29, 2021, 11:28 a.m. OK GNU C++17 (64) TESTS 12 62 7577600
130289337 bolajabena D Sept. 29, 2021, 5:11 p.m. OK GNU C++17 (64) TESTS 12 62 8499200
130265983 AshrafYousry D Sept. 29, 2021, 12:54 p.m. OK GNU C++17 (64) TESTS 12 62 8499200
130222892 augg1e D Sept. 29, 2021, 3:18 a.m. OK GNU C++17 (64) TESTS 12 62 8499200
130275097 riddle17 D Sept. 29, 2021, 2:24 p.m. OK GNU C++17 (64) TESTS 12 62 8806400
130264934 tupside D Sept. 29, 2021, 12:44 p.m. OK GNU C++17 (64) TESTS 12 62 9113600
130265749 bittubittu D Sept. 29, 2021, 12:52 p.m. OK Java 11 TESTS 12 280 26521600
130224844 harshgour D Sept. 29, 2021, 3:58 a.m. OK Java 11 TESTS 12 280 26931200
130235040 solo07 D Sept. 29, 2021, 6:52 a.m. OK Java 11 TESTS 12 280 27545600
130318665 Avatar D Sept. 30, 2021, 5:15 a.m. OK Java 11 TESTS 12 295 26931200
130245356 Multi-Thread D Sept. 29, 2021, 8:56 a.m. OK Java 11 TESTS 12 296 24371200
130259139 YaduAhuja D Sept. 29, 2021, 11:42 a.m. OK Java 11 TESTS 12 296 32870400
130266287 bittubittu D Sept. 29, 2021, 12:58 p.m. OK Java 11 TESTS 12 311 26521600
130238246 dhruvil_01 D Sept. 29, 2021, 7:29 a.m. OK Java 11 TESTS 12 327 28467200
130318518 SaberXpro D Sept. 30, 2021, 5:12 a.m. OK Java 11 TESTS 12 327 38502400
130226360 3Musketeers D Sept. 29, 2021, 4:27 a.m. OK Java 11 TESTS 12 342 26931200
130242463 dheerajchhatanidc D Sept. 29, 2021, 8:22 a.m. OK Java 8 TESTS 12 170 26214400
130242461 swapnilganguly1234 D Sept. 29, 2021, 8:22 a.m. OK Java 8 TESTS 12 187 28876800
130236352 Ibrahimovic_The_Lion D Sept. 29, 2021, 7:06 a.m. OK Java 8 TESTS 12 202 26112000
130284681 adityasin9h D Sept. 29, 2021, 4:10 p.m. OK Java 8 TESTS 12 217 25907200
130247443 _robindhankhar D Sept. 29, 2021, 9:22 a.m. OK Java 8 TESTS 12 233 28672000
130235075 DeepthansuGvs D Sept. 29, 2021, 6:52 a.m. OK Java 8 TESTS 12 233 30822400
130244584 mike1729 D Sept. 29, 2021, 8:47 a.m. OK Java 8 TESTS 12 264 28672000
130235949 Petersburg D Sept. 29, 2021, 7:01 a.m. OK Java 8 TESTS 12 327 26624000
130311947 imsaurabhkhare D Sept. 30, 2021, 2:44 a.m. OK Java 8 TESTS 12 420 26112000
130245045 HastaLaVistaLa D Sept. 29, 2021, 8:52 a.m. OK Java 8 TESTS 12 421 30617600
130252762 Triss_Merigold D Sept. 29, 2021, 10:29 a.m. OK Kotlin TESTS 12 483 35840000
130260664 Dmitry-Kuznetsov D Sept. 29, 2021, 11:59 a.m. OK MS C++ 2017 TESTS 12 218 6963200
130260473 Dmitry-Kuznetsov D Sept. 29, 2021, 11:57 a.m. OK MS C++ 2017 TESTS 12 234 6963200
130310223 the-fly0618 D Sept. 30, 2021, 1:52 a.m. OK MS C++ 2017 TESTS 12 234 30924800
130259591 Dmitry-Kuznetsov D Sept. 29, 2021, 11:47 a.m. OK MS C++ 2017 TESTS 12 249 7475200
130278647 Dead_InsideZXC D Sept. 29, 2021, 3:02 p.m. OK MS C++ 2017 TESTS 12 249 7680000
130238120 nor_or D Sept. 29, 2021, 7:27 a.m. OK MS C++ 2017 TESTS 12 264 7680000
130260027 Dmitry-Kuznetsov D Sept. 29, 2021, 11:52 a.m. OK MS C++ 2017 TESTS 12 265 6963200
130258586 Dmitry-Kuznetsov D Sept. 29, 2021, 11:36 a.m. OK MS C++ 2017 TESTS 12 265 8089600
130244829 NoiseLess D Sept. 29, 2021, 8:50 a.m. OK MS C++ 2017 TESTS 12 343 13004800
130281953 robertcurpan D Sept. 29, 2021, 3:38 p.m. OK MS C++ 2017 TESTS 12 545 7680000
130221763 hiukim D Sept. 29, 2021, 2:53 a.m. OK Node.js TESTS 12 826 43520000
130235408 acorn11 D Sept. 29, 2021, 6:55 a.m. OK PyPy 2 TESTS 12 716 38809600
130292174 acorn11 D Sept. 29, 2021, 5:49 p.m. OK PyPy 2 TESTS 12 1060 36659200
130274929 vilhelmthorsson D Sept. 29, 2021, 2:22 p.m. OK PyPy 3 TESTS 12 342 34304000
130239915 s_prateek26 D Sept. 29, 2021, 7:50 a.m. OK PyPy 3 TESTS 12 530 48537600
130223273 giant-mammoth D Sept. 29, 2021, 3:26 a.m. OK PyPy 3 TESTS 12 561 39628800
130233940 sPARTY D Sept. 29, 2021, 6:37 a.m. OK PyPy 3 TESTS 12 686 35840000
130295694 mayank35 D Sept. 29, 2021, 6:37 p.m. OK PyPy 3 TESTS 12 701 34406400
130287560 Lain D Sept. 29, 2021, 4:47 p.m. OK PyPy 3 TESTS 12 716 36864000
130251787 otsuneko D Sept. 29, 2021, 10:16 a.m. OK PyPy 3 TESTS 12 717 33792000
130243748 han369 D Sept. 29, 2021, 8:38 a.m. OK PyPy 3 TESTS 12 717 37068800
130316900 i8nd5t D Sept. 30, 2021, 4:40 a.m. OK PyPy 3 TESTS 12 717 38297600
130252675 shivambhagat02 D Sept. 29, 2021, 10:27 a.m. OK PyPy 3 TESTS 12 732 36761600
130295963 r57shell D Sept. 29, 2021, 6:41 p.m. OK Python 3 TESTS 12 343 21606400
130233975 r57shell D Sept. 29, 2021, 6:38 a.m. OK Python 3 TESTS 12 358 28774400
130270835 piSquared D Sept. 29, 2021, 1:43 p.m. OK Python 3 TESTS 12 373 22732800
130253219 shivambhagat02 D Sept. 29, 2021, 10:34 a.m. OK Python 3 TESTS 12 623 14745600
130253109 shivambhagat02 D Sept. 29, 2021, 10:33 a.m. OK Python 3 TESTS 12 639 17612800
130262412 _k_ D Sept. 29, 2021, 12:17 p.m. OK Python 3 TESTS 12 670 21401600
130251684 Jyothi_Prakash D Sept. 29, 2021, 10:15 a.m. OK Python 3 TESTS 12 685 16588800
130311049 190031512_suhana D Sept. 30, 2021, 2:19 a.m. OK Python 3 TESTS 12 685 21299200
130240305 GoldenDelphi D Sept. 29, 2021, 7:55 a.m. OK Python 3 TESTS 12 686 21504000
130287369 sh1194 D Sept. 29, 2021, 4:45 p.m. OK Python 3 TESTS 12 701 14131200
130319541 Spheniscine D Sept. 30, 2021, 5:32 a.m. OK Rust TESTS 12 61 7065600
130237153 Slayer_ D Sept. 29, 2021, 7:16 a.m. OK Scala TESTS 12 1060 44236800
130237440 Slayer_ D Sept. 29, 2021, 7:20 a.m. OK Scala TESTS 12 1138 44441600
130283258 IvanDyachenko D Sept. 29, 2021, 3:53 p.m. OK Scala TESTS 12 1278 56115200

remove filters

Back to search problems