Codeforces Round 706 (Div. 1)

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
1495 Codeforces Round 706 (Div. 1) FINISHED False 7200 121888463 March 10, 2021, 12:05 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 17234 ) A Diamond Miner PROGRAMMING geometry greedy math sortings

B"Diamond Miner is a game that is similar to Gold Miner, but there are n miners instead of 1 in this game. The mining area can be described as a plane. The n miners can be regarded as n points on the y-axis. There are n diamond mines in the mining area. We can regard them as n points on the x-axis. For some reason, no miners or diamond mines can be at the origin (point (0, 0) ). Every miner should mine exactly one diamond mine. Every miner has a hook, which can be used to mine a diamond mine. If a miner at the point (a,b) uses his hook to mine a diamond mine at the point (c,d) , he will spend sqrt{(a-c)^2+(b-d)^2} energy to mine it (the distance between these points). The miners can't move or help each other. The object of this game is to minimize the sum of the energy that miners spend. Can you find this minimum? The input consists of multiple test cases. The first line contains a single integer t ( 1 <= t <= 10 ) -- the number of test cases. The description of the test cases follows. The first line of each test case contains a single integer n ( 1 <= n <= 10^5 ) -- the number of miners and mines. Each of the next 2n lines contains two space-separated integers x ( -10^8 <= x <= 10^8 ) and y ( -10^8 <= y <= 10^8 ), which represent the point (x,y) to describe a miner's or a diamond mine's position. Either x = 0 , meaning there is a miner at the point (0, y) , or y = 0 , meaning there is a diamond mine at the point (x, 0) . There can be multiple miners or diamond mines at the same point. It is guaranteed that no point is at the origin. It is guaranteed that the number of points on the x-axis is equal to n and the number of points on the y-axis is equal to n . It's guaranteed that the sum of n for all test cases does not exceed 10^5 . For each test case, print a single real number -- the minimal sum"...

Tutorials

Codeforces Round #706 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
109560989 _Viole_ A March 10, 2021, 12:14 p.m. OK GNU C++11 TESTS 25 31 5222400
109559183 liuhengxi A March 10, 2021, 12:12 p.m. OK GNU C++11 TESTS 25 46 614400
109561474 szhlg A March 10, 2021, 12:15 p.m. OK GNU C++11 TESTS 25 46 819200
109560806 fishcathu. A March 10, 2021, 12:14 p.m. OK GNU C++11 TESTS 25 46 819200
109572985 Orange_JuiCE A March 10, 2021, 12:31 p.m. OK GNU C++11 TESTS 25 46 819200
109563962 jxm2001 A March 10, 2021, 12:18 p.m. OK GNU C++11 TESTS 25 46 819200
109563617 clfzs A March 10, 2021, 12:17 p.m. OK GNU C++11 TESTS 25 46 819200
109562889 oisdoaiu A March 10, 2021, 12:16 p.m. OK GNU C++11 TESTS 25 46 819200
109562527 Durant_Lee A March 10, 2021, 12:16 p.m. OK GNU C++11 TESTS 25 46 819200
109561572 jhknmj A March 10, 2021, 12:15 p.m. OK GNU C++11 TESTS 25 46 819200
109557434 awoo A March 10, 2021, 12:08 p.m. OK GNU C++14 TESTS 25 93 819200
109562783 topcoder815 A March 10, 2021, 12:16 p.m. OK GNU C++14 TESTS 25 93 1843200
109560365 huaji035 A March 10, 2021, 12:13 p.m. OK GNU C++14 TESTS 25 93 1843200
109557667 ccf_n0i A March 10, 2021, 12:09 p.m. OK GNU C++14 TESTS 25 108 819200
109558485 dlalswp25 A March 10, 2021, 12:11 p.m. OK GNU C++14 TESTS 25 108 1638400
109560040 nhho A March 10, 2021, 12:13 p.m. OK GNU C++14 TESTS 25 108 1638400
109559210 hehezhou A March 10, 2021, 12:12 p.m. OK GNU C++14 TESTS 25 108 1638400
109672116 nitvjudge4 A March 11, 2021, 5:04 a.m. OK GNU C++14 TESTS 25 108 1638400
109565399 Slivery A March 10, 2021, 12:20 p.m. OK GNU C++14 TESTS 25 108 1843200
109630719 hamlet A March 10, 2021, 2:58 p.m. OK GNU C++14 TESTS 25 108 1843200
109562331 Jlytxdy A March 10, 2021, 12:16 p.m. OK GNU C++17 TESTS 25 46 1740800
109559247 liouzhou_101 A March 10, 2021, 12:12 p.m. OK GNU C++17 TESTS 25 46 3891200
109563082 _Andromeda A March 10, 2021, 12:17 p.m. OK GNU C++17 TESTS 25 46 13004800
109559504 disangan233 A March 10, 2021, 12:12 p.m. OK GNU C++17 TESTS 25 46 16486400
109563415 yukihana0416 A March 10, 2021, 12:17 p.m. OK GNU C++17 TESTS 25 46 18432000
109557557 J_B_Y A March 10, 2021, 12:09 p.m. OK GNU C++17 TESTS 25 61 819200
109557835 iaNTU A March 10, 2021, 12:10 p.m. OK GNU C++17 TESTS 25 62 3481600
109571547 windy7926778 A March 10, 2021, 12:29 p.m. OK GNU C++17 TESTS 25 77 819200
109561229 natsugiri A March 10, 2021, 12:14 p.m. OK GNU C++17 TESTS 25 78 1843200
109564777 RNS_SJH A March 10, 2021, 12:19 p.m. OK GNU C++17 TESTS 25 93 819200
109564672 Alphagocc A March 10, 2021, 12:19 p.m. OK GNU C++17 (64) TESTS 25 46 2150400
109565695 yzh2021 A March 10, 2021, 12:20 p.m. OK GNU C++17 (64) TESTS 25 46 4608000
109558018 NotaMotuaQAQ A March 10, 2021, 12:10 p.m. OK GNU C++17 (64) TESTS 25 46 5836800
109557812 LayCurse A March 10, 2021, 12:09 p.m. OK GNU C++17 (64) TESTS 25 46 99942400
109558084 Egor A March 10, 2021, 12:10 p.m. OK GNU C++17 (64) TESTS 25 62 1843200
109560880 yosupo A March 10, 2021, 12:14 p.m. OK GNU C++17 (64) TESTS 25 62 6758400
109562062 solaimanope A March 10, 2021, 12:15 p.m. OK GNU C++17 (64) TESTS 25 77 1638400
109561506 wisest A March 10, 2021, 12:15 p.m. OK GNU C++17 (64) TESTS 25 77 1843200
109563068 Narut A March 10, 2021, 12:17 p.m. OK GNU C++17 (64) TESTS 25 77 1843200
109562855 Nero A March 10, 2021, 12:16 p.m. OK GNU C++17 (64) TESTS 25 77 1843200
109632868 sersht A March 10, 2021, 3:13 p.m. OK Go TESTS 25 265 4608000
109635858 0x3F A March 10, 2021, 3:38 p.m. OK Go TESTS 25 280 5017600
109632402 alikhan.murzayev A March 10, 2021, 3:10 p.m. OK Go TESTS 25 311 5324800
109632219 alikhan.murzayev A March 10, 2021, 3:08 p.m. OK Go TESTS 25 311 5324800
109559102 uwi A March 10, 2021, 12:12 p.m. OK Java 11 TESTS 25 233 0
109634743 sayaknandy A March 10, 2021, 3:28 p.m. OK Java 11 TESTS 25 296 0
109558775 Discombobulated A March 10, 2021, 12:11 p.m. OK Java 11 TESTS 25 436 716800
109652582 karunapal_chava A March 10, 2021, 7 p.m. OK Java 11 TESTS 25 608 0
109657917 sandfog A March 10, 2021, 8:53 p.m. OK Java 11 TESTS 25 920 3174400
109560218 dalt A March 10, 2021, 12:13 p.m. OK Java 8 TESTS 25 155 0
109558135 fetetriste A March 10, 2021, 12:10 p.m. OK Java 8 TESTS 25 202 0
109565181 YahiaSherif A March 10, 2021, 12:19 p.m. OK Java 8 TESTS 25 218 0
109563451 AdhmMohamed A March 10, 2021, 12:17 p.m. OK Java 8 TESTS 25 249 0
109560692 TheSawan A March 10, 2021, 12:14 p.m. OK Java 8 TESTS 25 249 0
109571388 martins A March 10, 2021, 12:28 p.m. OK Java 8 TESTS 25 249 0
109570766 2020akadaver A March 10, 2021, 12:27 p.m. OK Java 8 TESTS 25 280 0
109563067 hu_tao A March 10, 2021, 12:17 p.m. OK Java 8 TESTS 25 296 0
109666581 Spheniscine A March 11, 2021, 2:47 a.m. OK Kotlin TESTS 25 187 0
109558547 arvindf232 A March 10, 2021, 12:11 p.m. OK Kotlin TESTS 25 249 2867200
109563527 Hakiobo A March 10, 2021, 12:17 p.m. OK Kotlin TESTS 25 296 4300800
109562198 Tlatoani A March 10, 2021, 12:15 p.m. OK Kotlin TESTS 25 343 4505600
109566829 elizarov A March 10, 2021, 12:22 p.m. OK Kotlin TESTS 25 358 102400
109594463 Yamatan A March 10, 2021, 1:07 p.m. OK MS C++ 2017 TESTS 25 124 819200
109572545 stostap A March 10, 2021, 12:30 p.m. OK MS C++ 2017 TESTS 25 124 819200
109563594 Timonnable A March 10, 2021, 12:17 p.m. OK MS C++ 2017 TESTS 25 311 1740800
109665097 kawayisang A March 11, 2021, 1:58 a.m. OK MS C++ 2017 TESTS 25 311 1843200
109558424 serg3000 A March 10, 2021, 12:11 p.m. OK MS C++ 2017 TESTS 25 312 4300800
109662060 k_sokol_v A March 10, 2021, 11:43 p.m. OK MS C++ 2017 TESTS 25 327 819200
109638164 TawfekHesham A March 10, 2021, 3:59 p.m. OK MS C++ 2017 TESTS 25 327 5324800
109646198 andrewjohnson1053 A March 10, 2021, 5:29 p.m. OK MS C++ 2017 TESTS 25 358 4300800
109560469 mban259 A March 10, 2021, 12:13 p.m. OK .NET Core C# TESTS 25 140 5836800
109558427 Yupiteru A March 10, 2021, 12:11 p.m. OK .NET Core C# TESTS 25 248 20377600
109626923 watarimaycry2 A March 10, 2021, 2:38 p.m. OK Node.js TESTS 25 452 34611200
109561445 bcollet A March 10, 2021, 12:15 p.m. OK PyPy 2 TESTS 25 389 18227200
109562905 dolphinigle A March 10, 2021, 12:16 p.m. OK PyPy 2 TESTS 25 576 7884800
109559388 tamato A March 10, 2021, 12:12 p.m. OK PyPy 3 TESTS 25 265 9318400
109562601 yuusanlondon A March 10, 2021, 12:16 p.m. OK PyPy 3 TESTS 25 265 9932800
109561962 kclee2172 A March 10, 2021, 12:15 p.m. OK PyPy 3 TESTS 25 280 14438400
109560962 FlakeLCR A March 10, 2021, 12:14 p.m. OK PyPy 3 TESTS 25 296 9625600
109558188 googol_S0 A March 10, 2021, 12:10 p.m. OK PyPy 3 TESTS 25 311 9113600
109573406 jimm89 A March 10, 2021, 12:31 p.m. OK PyPy 3 TESTS 25 358 15462400
109569386 mkawa2 A March 10, 2021, 12:25 p.m. OK PyPy 3 TESTS 25 373 73932800
109659485 sasha6991123 A March 10, 2021, 9:46 p.m. OK PyPy 3 TESTS 25 404 9932800
109562552 hir35 A March 10, 2021, 12:16 p.m. OK PyPy 3 TESTS 25 452 9932800
109628639 FlakeLCR A March 10, 2021, 2:46 p.m. OK PyPy 3 TESTS 25 498 9932800
109561616 old_boo A March 10, 2021, 12:15 p.m. OK Python 3 TESTS 25 452 5222400
109662964 rpfl A March 11, 2021, 12:28 a.m. OK Python 3 TESTS 25 592 19251200
109637462 ghoshsanchita656 A March 10, 2021, 3:53 p.m. OK Python 3 TESTS 25 623 5222400
109654242 NeverQuitYourDayDream A March 10, 2021, 7:28 p.m. OK Python 3 TESTS 25 670 5836800
109665211 NS3081992 A March 11, 2021, 2:02 a.m. OK Python 3 TESTS 25 717 17817600
109558542 shino16 A March 10, 2021, 12:11 p.m. OK Rust TESTS 25 61 40448000
109557719 sansen A March 10, 2021, 12:09 p.m. OK Rust TESTS 25 77 6860800
109560207 hiratai A March 10, 2021, 12:13 p.m. OK Rust TESTS 25 109 6246400
109560122 ocamler A March 10, 2021, 12:13 p.m. OK Rust TESTS 25 124 1024000
109561965 ngtkana A March 10, 2021, 12:15 p.m. OK Rust TESTS 25 171 2662400

remove filters

Back to search problems