Codeforces Round 861 (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
1808 Codeforces Round 861 (Div. 2) FINISHED False 7200 57099263 March 29, 2023, 9:05 a.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 18454 ) B Playing in a Casino PROGRAMMING math sortings 1200

B"Galaxy Luck, a well-known casino in the entire solar system, introduces a new card game. In this game, there is a deck that consists of n cards. Each card has m numbers written on it. Each of the n players receives exactly one card from the deck. Then all players play with each other in pairs, and each pair of players plays exactly once. Thus, if there are, for example, four players in total, then six games are played: the first against the second, the first against the third, the first against the fourth, the second against the third, the second against the fourth and the third against the fourth. Each of these games determines the winner in some way, but the rules are quite complicated, so we will not describe them here. All that matters is how many chips are paid out to the winner. Let the first player's card have the numbers a_1, a_2, ... , a_m , and the second player's card -- b_1, b_2, ... , b_m . Then the winner of the game gets |a_1 - b_1| + |a_2 - b_2| + ... + |a_m - b_m| chips from the total pot, where |x| denotes the absolute value of x . To determine the size of the total pot, it is necessary to calculate the winners' total winnings for all games. Since there can be many cards in a deck and many players, you have been assigned to write a program that does all the necessary calculations. Each test consists of several test cases. The first line contains one integer t ( 1 <= t <= 1000 ) -- the number of test cases. The description of the test cases follows. The first line of each test case contains two integers n and m ( 1 <= n cdot m <= 3 cdot 10^5 ) -- the number of cards in the deck and the count of numbers on the one card. Each of the following n lines of the test case set contains m integers c_{i,j} ( 1 <= c_{i,j} <= 10^6 ) -- a description of the i -th card. It is guaranteed that the total n cdot m in all tests does not"...

Tutorials

Codeforces Round #861 (Div. 2) editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
199789300 bluemegane B March 30, 2023, 6:45 a.m. OK C# 8 TESTS 35 171 37376000 1200
199983446 cuican123 B March 31, 2023, 3:10 p.m. OK Clang++17 Diagnostics TESTS 35 1793 20889600 1200
199752757 astronom1cal B March 29, 2023, 8:15 p.m. OK GNU C11 TESTS 35 93 1228800 1200
199947055 astronom1cal B March 31, 2023, 12:53 p.m. OK GNU C11 TESTS 35 124 4812800 1200
199951733 astronom1cal B March 31, 2023, 1:40 p.m. OK GNU C11 TESTS 35 124 4812800 1200
199878998 astronom1cal B March 30, 2023, 8:13 p.m. OK GNU C11 TESTS 35 124 4812800 1200
199786093 ZLaaa B March 30, 2023, 6:05 a.m. OK GNU C++14 TESTS 35 93 1228800 1200
199797437 kato. B March 30, 2023, 8:22 a.m. OK GNU C++14 TESTS 35 93 8601600 1200
199785602 jr_inf B March 30, 2023, 5:57 a.m. OK GNU C++14 TESTS 35 93 8601600 1200
199773723 57xn B March 30, 2023, 2:19 a.m. OK GNU C++14 TESTS 35 93 8601600 1200
199837535 Fedbxy B March 30, 2023, 2:22 p.m. OK GNU C++14 TESTS 35 93 8601600 1200
199990761 xuanru B March 31, 2023, 3:25 p.m. OK GNU C++14 TESTS 35 93 8601600 1200
200078644 lxh2022401549 B April 1, 2023, 5:48 a.m. OK GNU C++14 TESTS 35 93 8601600 1200
199956075 michel2020 B March 31, 2023, 2:21 p.m. OK GNU C++14 TESTS 35 93 8601600 1200
200061548 Gdfzlcx B April 1, 2023, 1:31 a.m. OK GNU C++14 TESTS 35 108 8601600 1200
199744171 sonugupta07 B March 29, 2023, 6:34 p.m. OK GNU C++14 TESTS 35 108 8601600 1200
200074424 Hush B April 1, 2023, 4:59 a.m. OK GNU C++17 TESTS 35 78 10035200 1200
199879295 krijesnica B March 30, 2023, 8:16 p.m. OK GNU C++17 TESTS 35 93 1228800 1200
199799402 Fisher_Boy382 B March 30, 2023, 8:44 a.m. OK GNU C++17 TESTS 35 93 2355200 1200
199769921 onkar_somani B March 30, 2023, 12:53 a.m. OK GNU C++17 TESTS 35 93 3584000 1200
199878276 KAUSTUBH152003 B March 30, 2023, 8:06 p.m. OK GNU C++17 TESTS 35 93 7372800 1200
199878258 poms647 B March 30, 2023, 8:05 p.m. OK GNU C++17 TESTS 35 93 7372800 1200
199817540 hl666 B March 30, 2023, 11:47 a.m. OK GNU C++17 TESTS 35 93 8601600 1200
199791137 ChiefCoderL B March 30, 2023, 7:06 a.m. OK GNU C++17 TESTS 35 93 8601600 1200
199769480 sai_mun B March 30, 2023, 12:43 a.m. OK GNU C++17 TESTS 35 93 8601600 1200
199768467 PCC B March 30, 2023, 12:18 a.m. OK GNU C++17 TESTS 35 93 8601600 1200
199763097 Edu175 B March 29, 2023, 10:26 p.m. OK GNU C++17 (64) TESTS 35 77 2355200 1200
199746292 Ecstasy_4y B March 29, 2023, 6:58 p.m. OK GNU C++17 (64) TESTS 35 77 6656000 1200
199889167 uhfeoire B March 30, 2023, 10:23 p.m. OK GNU C++17 (64) TESTS 35 77 12083200 1200
199919519 alwyn B March 31, 2023, 8:01 a.m. OK GNU C++17 (64) TESTS 35 77 12083200 1200
199834708 bearyuc B March 30, 2023, 2:07 p.m. OK GNU C++17 (64) TESTS 35 77 12083200 1200
199947020 TreeTraveler.h B March 31, 2023, 12:53 p.m. OK GNU C++17 (64) TESTS 35 77 16896000 1200
199743421 egorsa B March 29, 2023, 6:25 p.m. OK GNU C++17 (64) TESTS 35 77 16998400 1200
199770038 qaqwdnmd B March 30, 2023, 12:56 a.m. OK GNU C++17 (64) TESTS 35 77 20070400 1200
200079075 shree_simha B April 1, 2023, 5:53 a.m. OK GNU C++17 (64) TESTS 35 77 122777600 1200
199746414 Ecstasy_4y B March 29, 2023, 7 p.m. OK GNU C++17 (64) TESTS 35 78 6656000 1200
199957489 ntKhai384 B March 31, 2023, 2:35 p.m. OK GNU C++20 (64) TESTS 35 62 1228800 1200
199862679 utshab1618 B March 30, 2023, 5:16 p.m. OK GNU C++20 (64) TESTS 35 62 1228800 1200
199843449 tmdh B March 30, 2023, 2:58 p.m. OK GNU C++20 (64) TESTS 35 62 2355200 1200
199933916 ritviksingh791 B March 31, 2023, 10:45 a.m. OK GNU C++20 (64) TESTS 35 62 2355200 1200
199766396 A.Hazem_2003 B March 29, 2023, 11:32 p.m. OK GNU C++20 (64) TESTS 35 62 2355200 1200
199915040 dharmesh_kumar B March 31, 2023, 7 a.m. OK GNU C++20 (64) TESTS 35 62 2355200 1200
199867615 naksh2904 B March 30, 2023, 5:58 p.m. OK GNU C++20 (64) TESTS 35 62 2355200 1200
199867579 nakshatra.bansal.mec20 B March 30, 2023, 5:58 p.m. OK GNU C++20 (64) TESTS 35 62 2355200 1200
199884946 mercury6 B March 30, 2023, 9:17 p.m. OK GNU C++20 (64) TESTS 35 62 2457600 1200
199883921 fmoeran B March 30, 2023, 9:04 p.m. OK GNU C++20 (64) TESTS 35 62 2457600 1200
199835119 m0rka1 B March 30, 2023, 2:09 p.m. OK Java 11 TESTS 35 265 9523200 1200
199786236 rchauhan.ug20 B March 30, 2023, 6:07 a.m. OK Java 11 TESTS 35 342 35737600 1200
199880786 etian6795 B March 30, 2023, 8:32 p.m. OK Java 11 TESTS 35 343 26316800 1200
199786461 vijender_8601 B March 30, 2023, 6:10 a.m. OK Java 11 TESTS 35 390 15564800 1200
199749347 g_square B March 29, 2023, 7:34 p.m. OK Java 11 TESTS 35 421 17203200 1200
199898425 tapanr97 B March 31, 2023, 2:01 a.m. OK Java 11 TESTS 35 421 17408000 1200
200029889 _inFamousxD B March 31, 2023, 5:54 p.m. OK Java 11 TESTS 35 561 6656000 1200
199946669 manas8260 B March 31, 2023, 12:49 p.m. OK Java 11 TESTS 35 577 6553600 1200
199838446 Extradict B March 30, 2023, 2:27 p.m. OK Java 11 TESTS 35 577 24780800 1200
199888625 j2v B March 30, 2023, 10:13 p.m. OK Java 11 TESTS 35 592 5324800 1200
199864208 not_just_rr B March 30, 2023, 5:28 p.m. OK Java 17 TESTS 35 264 6963200 1200
199868150 selbowgreaser B March 30, 2023, 6:03 p.m. OK Java 17 TESTS 35 296 10649600 1200
199819600 fightingxjz B March 30, 2023, 12:05 p.m. OK Java 17 TESTS 35 296 13414400 1200
200027866 merlin_ B March 31, 2023, 5:37 p.m. OK Java 17 TESTS 35 405 36249600 1200
199839033 vankamamidi_dheeraj B March 30, 2023, 2:31 p.m. OK Java 17 TESTS 35 405 36249600 1200
199744110 Danger_Don B March 29, 2023, 6:33 p.m. OK Java 17 TESTS 35 421 7475200 1200
199782919 Srikanth1777 B March 30, 2023, 5:17 a.m. OK Java 17 TESTS 35 451 14438400 1200
199951468 kaihong B March 31, 2023, 1:36 p.m. OK Java 17 TESTS 35 577 37171200 1200
199813473 dco B March 30, 2023, 11:11 a.m. OK Java 17 TESTS 35 670 7577600 1200
199746543 vijay_panwar12 B March 29, 2023, 7:01 p.m. OK Java 17 TESTS 35 733 18841600 1200
199827272 Virendra115 B March 30, 2023, 1:12 p.m. OK Java 8 TESTS 35 217 10752000 1200
199804171 __SSB__ B March 30, 2023, 9:37 a.m. OK Java 8 TESTS 35 248 5939200 1200
199858465 lpychemistry B March 30, 2023, 4:42 p.m. OK Java 8 TESTS 35 265 4812800 1200
199774852 aggarwalanshul01 B March 30, 2023, 2:44 a.m. OK Java 8 TESTS 35 265 28774400 1200
199818438 vkukretiwork B March 30, 2023, 11:55 a.m. OK Java 8 TESTS 35 296 40755200 1200
200078752 Java_Programmer B April 1, 2023, 5:49 a.m. OK Java 8 TESTS 35 343 45875200 1200
199883504 lakshay.sharma.ug21 B March 30, 2023, 8:59 p.m. OK Java 8 TESTS 35 390 35020800 1200
199802610 formidablechief_27 B March 30, 2023, 9:20 a.m. OK Java 8 TESTS 35 451 22016000 1200
199775428 priyaroy3370 B March 30, 2023, 2:57 a.m. OK Java 8 TESTS 35 499 4915200 1200
199854109 amit_roy B March 30, 2023, 4:06 p.m. OK Java 8 TESTS 35 530 4915200 1200
199761724 mukhaledd B March 29, 2023, 10:03 p.m. OK MS C++ 2017 TESTS 35 265 8499200 1200
199819865 bandiaoz B March 30, 2023, 12:08 p.m. OK PyPy 3 TESTS 35 389 34713600 1200
199815864 mega_bot B March 30, 2023, 11:32 a.m. OK PyPy 3 TESTS 35 592 40448000 1200
199758281 isekun B March 29, 2023, 9:13 p.m. OK PyPy 3-64 TESTS 35 217 56422400 1200
199873747 sai_23_02_04 B March 30, 2023, 7:06 p.m. OK PyPy 3-64 TESTS 35 249 57958400 1200
199875824 sai_23_02_04 B March 30, 2023, 7:34 p.m. OK PyPy 3-64 TESTS 35 264 58060800 1200
199854057 plevande B March 30, 2023, 4:05 p.m. OK PyPy 3-64 TESTS 35 265 39628800 1200
199887719 YuraK B March 30, 2023, 9:57 p.m. OK PyPy 3-64 TESTS 35 265 50176000 1200
199792000 kidus72 B March 30, 2023, 7:16 a.m. OK PyPy 3-64 TESTS 35 265 58982400 1200
199805086 Vashesh B March 30, 2023, 9:46 a.m. OK PyPy 3-64 TESTS 35 296 56012800 1200
199906732 try1111111 B March 31, 2023, 5:05 a.m. OK PyPy 3-64 TESTS 35 296 60313600 1200
199788748 pennymagic156 B March 30, 2023, 6:39 a.m. OK PyPy 3-64 TESTS 35 296 62771200 1200
199894741 AbdulRahmanLuai B March 31, 2023, 12:30 a.m. OK PyPy 3-64 TESTS 35 296 76185600 1200
199819823 YoungChigga B March 30, 2023, 12:07 p.m. OK Python 3 TESTS 35 702 23756800 1200
199752883 billeh77 B March 29, 2023, 8:17 p.m. OK Python 3 TESTS 35 873 33075200 1200
199922574 SiliconDioxide B March 31, 2023, 8:39 a.m. OK Python 3 TESTS 35 889 32972800 1200
199772656 Ferrriccc B March 30, 2023, 1:56 a.m. OK Python 3 TESTS 35 904 24268800 1200
199867869 pk_s135 B March 30, 2023, 6 p.m. OK Python 3 TESTS 35 920 24268800 1200
199942084 Ali_Haider_Ahmad B March 31, 2023, 12:05 p.m. OK Python 3 TESTS 35 967 24268800 1200
199837298 running_ghq B March 30, 2023, 2:21 p.m. OK Python 3 TESTS 35 997 24268800 1200
199863909 PranavBadBoy B March 30, 2023, 5:26 p.m. OK Python 3 TESTS 35 998 31744000 1200
199872066 tariq05 B March 30, 2023, 6:44 p.m. OK Python 3 TESTS 35 1013 34611200 1200
199912875 sahil45 B March 31, 2023, 6:31 a.m. OK Python 3 TESTS 35 1044 23961600 1200
199862733 titia B March 30, 2023, 5:16 p.m. OK Rust 2021 TESTS 35 93 25292800 1200

remove filters

Back to search problems