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 |
---|---|---|---|---|---|---|
1266 | Codeforces Global Round 6 | FINISHED | False | 9000 | 160844087 | Dec. 17, 2019, 3:05 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 3673 ) | D | Decreasing Debts | PROGRAMMING | constructive algorithms data structures graphs greedy implementation math two pointers | 2000 |
B"There are n people in this world, conveniently numbered 1 through n . They are using burles to buy goods and services. Occasionally, a person might not have enough currency to buy what he wants or needs, so he borrows money from someone else, with the idea that he will repay the loan later with interest. Let d(a,b) denote the debt of a towards b , or 0 if there is no such debt. Sometimes, this becomes very complex, as the person lending money can run into financial troubles before his debtor is able to repay his debt, and finds himself in the need of borrowing money. When this process runs for a long enough time, it might happen that there are so many debts that they can be consolidated. There are two ways this can be done: The total debt is defined as the sum of all debts: Sigma_d = sum_{a,b} d(a,b) Your goal is to use the above rules in any order any number of times, to make the total debt as small as possible. Note that you don't have to minimise the number of non-zero debts, only the total debt. The first line contains two space separated integers n ( 1 <= q n <= q 10^5 ) and m ( 0 <= q m <= q 3 cdot 10^5 ), representing the number of people and the number of debts, respectively. m lines follow, each of which contains three space separated integers u_i , v_i ( 1 <= q u_i, v_i <= q n, u_i neq v_i ), d_i ( 1 <= q d_i <= q 10^9 ), meaning that the person u_i borrowed d_i burles from person v_i . On the first line print an integer m' ( 0 <= q m' <= q 3 cdot 10^5 ), representing the number of debts after the consolidation. It can be shown that an answer always exists with this additional constraint. After that print m' lines, i -th of which contains three space separated integers u_i, v_i, d_i , meaning that the person u_i owes the person v_i exactly d_i burles. The output must satisfy $"... |
Codeforces Global Round 6 Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
67091740 | hos.lyric | D | Dec. 17, 2019, 3:36 p.m. | OK | D | TESTS | 83 | 343 | 22630400 | 2000 | |
67099059 | Gassa | D | Dec. 17, 2019, 3:57 p.m. | OK | D | TESTS | 83 | 358 | 11673600 | 2000 | |
67133477 | fluffyowl | D | Dec. 18, 2019, 2:14 a.m. | OK | D | TESTS | 86 | 576 | 11878400 | 2000 | |
67115328 | ruban | D | Dec. 17, 2019, 5:11 p.m. | OK | Delphi | TESTS | 83 | 326 | 99020800 | 2000 | |
67121415 | rainboy | D | Dec. 17, 2019, 6:28 p.m. | OK | GNU C11 | TESTS | 83 | 576 | 4812800 | 2000 | |
67109688 | pengin_2000 | D | Dec. 17, 2019, 4:39 p.m. | OK | GNU C11 | TESTS | 83 | 592 | 7168000 | 2000 | |
67110109 | Chipe1 | D | Dec. 17, 2019, 4:41 p.m. | OK | GNU C11 | TESTS | 83 | 592 | 8806400 | 2000 | |
67125536 | Adata1000 | D | Dec. 17, 2019, 7:55 p.m. | OK | GNU C11 | TESTS | 86 | 592 | 17612800 | 2000 | |
67084306 | 1919810 | D | Dec. 17, 2019, 3:21 p.m. | OK | GNU C++11 | TESTS | 83 | 93 | 5529600 | 2000 | |
68324045 | ryuIo | D | Jan. 6, 2020, 4:07 p.m. | OK | GNU C++11 | TESTS | 88 | 93 | 5529600 | 2000 | |
67139921 | Owen_codeisking | D | Dec. 18, 2019, 6:17 a.m. | OK | GNU C++11 | TESTS | 86 | 93 | 5632000 | 2000 | |
67094119 | LJC00118 | D | Dec. 17, 2019, 3:42 p.m. | OK | GNU C++11 | TESTS | 83 | 93 | 5632000 | 2000 | |
68847783 | chenyewei_1234 | D | Jan. 15, 2020, 7:58 a.m. | OK | GNU C++11 | TESTS | 88 | 93 | 6758400 | 2000 | |
67762748 | huanggs | D | Dec. 28, 2019, 12:28 a.m. | OK | GNU C++11 | TESTS | 88 | 93 | 8192000 | 2000 | |
67762704 | huanggs | D | Dec. 28, 2019, 12:23 a.m. | OK | GNU C++11 | TESTS | 88 | 93 | 8192000 | 2000 | |
68570252 | cuizhuyefei | D | Jan. 11, 2020, 1:39 a.m. | OK | GNU C++11 | TESTS | 88 | 108 | 21401600 | 2000 | |
67132442 | sagumew | D | Dec. 18, 2019, 1:11 a.m. | OK | GNU C++11 | TESTS | 86 | 109 | 5324800 | 2000 | |
67146098 | 24680esz | D | Dec. 18, 2019, 8:55 a.m. | OK | GNU C++11 | TESTS | 86 | 109 | 6246400 | 2000 | |
68600251 | tokitsukaze | D | Jan. 11, 2020, 1:54 p.m. | OK | GNU C++14 | TESTS | 88 | 109 | 5427200 | 2000 | |
67114647 | KaguraNana | D | Dec. 17, 2019, 5:07 p.m. | OK | GNU C++14 | TESTS | 83 | 109 | 5427200 | 2000 | |
67875776 | Lezedary_sandwich | D | Dec. 29, 2019, 1:14 p.m. | OK | GNU C++14 | TESTS | 88 | 140 | 12288000 | 2000 | |
67088464 | Egor | D | Dec. 17, 2019, 3:29 p.m. | OK | GNU C++14 | TESTS | 83 | 218 | 4608000 | 2000 | |
67137536 | angrysqrt3 | D | Dec. 18, 2019, 5:08 a.m. | OK | GNU C++14 | TESTS | 86 | 218 | 8704000 | 2000 | |
67097002 | Hyperbolic | D | Dec. 17, 2019, 3:50 p.m. | OK | GNU C++14 | TESTS | 83 | 218 | 12185600 | 2000 | |
69255098 | TearinFree | D | Jan. 21, 2020, 3:25 p.m. | OK | GNU C++14 | TESTS | 88 | 233 | 5324800 | 2000 | |
68750179 | SushiNinja | D | Jan. 14, 2020, 6:23 a.m. | OK | GNU C++14 | TESTS | 88 | 233 | 5529600 | 2000 | |
67142569 | zeus_iitg | D | Dec. 18, 2019, 7:25 a.m. | OK | GNU C++14 | TESTS | 86 | 233 | 6451200 | 2000 | |
67209989 | ekeitaro | D | Dec. 19, 2019, 1:42 p.m. | OK | GNU C++14 | TESTS | 86 | 234 | 3993600 | 2000 | |
67089755 | whzzt | D | Dec. 17, 2019, 3:32 p.m. | OK | GNU C++17 | TESTS | 83 | 93 | 8192000 | 2000 | |
67091256 | yosupo | D | Dec. 17, 2019, 3:35 p.m. | OK | GNU C++17 | TESTS | 83 | 124 | 10752000 | 2000 | |
67117260 | Funny_digit | D | Dec. 17, 2019, 5:23 p.m. | OK | GNU C++17 | TESTS | 83 | 218 | 3993600 | 2000 | |
67088812 | iaNTU | D | Dec. 17, 2019, 3:30 p.m. | OK | GNU C++17 | TESTS | 83 | 218 | 4812800 | 2000 | |
67207683 | 1813004846 | D | Dec. 19, 2019, 1 p.m. | OK | GNU C++17 | TESTS | 86 | 218 | 15974400 | 2000 | |
67208598 | vjudge3 | D | Dec. 19, 2019, 1:17 p.m. | OK | GNU C++17 | TESTS | 86 | 218 | 15974400 | 2000 | |
67096809 | jschr | D | Dec. 17, 2019, 3:50 p.m. | OK | GNU C++17 | TESTS | 83 | 233 | 4505600 | 2000 | |
67262472 | yuusha | D | Dec. 20, 2019, 4:21 a.m. | OK | GNU C++17 | TESTS | 88 | 233 | 5324800 | 2000 | |
67161507 | Kerim.K | D | Dec. 18, 2019, 2:07 p.m. | OK | GNU C++17 | TESTS | 86 | 233 | 6144000 | 2000 | |
68305689 | lqs2015 | D | Jan. 6, 2020, 8:52 a.m. | OK | GNU C++17 | TESTS | 88 | 233 | 6246400 | 2000 | |
67104593 | caidodo0_0 | D | Dec. 17, 2019, 4:16 p.m. | OK | Go | TESTS | 83 | 717 | 9830400 | 2000 | |
67149192 | Musin | D | Dec. 18, 2019, 10:05 a.m. | OK | Java 11 | TESTS | 86 | 311 | 0 | 2000 | |
67112821 | vaibhavpulastya | D | Dec. 17, 2019, 4:57 p.m. | OK | Java 11 | TESTS | 83 | 358 | 2457600 | 2000 | |
67442996 | MisterBabu | D | Dec. 22, 2019, 8:18 p.m. | OK | Java 11 | TESTS | 88 | 436 | 0 | 2000 | |
68450444 | TheSawan | D | Jan. 9, 2020, 2:09 p.m. | OK | Java 11 | TESTS | 88 | 452 | 0 | 2000 | |
67093443 | eatmore | D | Dec. 17, 2019, 3:41 p.m. | OK | Java 11 | TESTS | 83 | 467 | 0 | 2000 | |
67107127 | machhra | D | Dec. 17, 2019, 4:28 p.m. | OK | Java 11 | TESTS | 83 | 530 | 7168000 | 2000 | |
67121668 | Dukkha | D | Dec. 17, 2019, 6:31 p.m. | OK | Java 11 | TESTS | 83 | 1294 | 409600 | 2000 | |
67195665 | KakarotSSJ4 | D | Dec. 19, 2019, 8:56 a.m. | OK | Java 11 | TESTS | 86 | 1964 | 7065600 | 2000 | |
67096270 | cwise | D | Dec. 17, 2019, 3:48 p.m. | OK | Java 8 | TESTS | 83 | 233 | 32768000 | 2000 | |
67126019 | p_unit | D | Dec. 17, 2019, 8:09 p.m. | OK | Java 8 | TESTS | 86 | 249 | 0 | 2000 | |
67102360 | spar5h | D | Dec. 17, 2019, 4:08 p.m. | OK | Java 8 | TESTS | 83 | 249 | 3072000 | 2000 | |
67143025 | Apurva021 | D | Dec. 18, 2019, 7:38 a.m. | OK | Java 8 | TESTS | 86 | 264 | 3379200 | 2000 | |
67137760 | Faizan | D | Dec. 18, 2019, 5:15 a.m. | OK | Java 8 | TESTS | 86 | 264 | 4915200 | 2000 | |
67289474 | MubtasimShahriar | D | Dec. 20, 2019, 3:11 p.m. | OK | Java 8 | TESTS | 88 | 265 | 0 | 2000 | |
67316772 | KharYusuf | D | Dec. 21, 2019, 6:23 a.m. | OK | Java 8 | TESTS | 88 | 265 | 1945600 | 2000 | |
67143669 | jenish9599 | D | Dec. 18, 2019, 7:54 a.m. | OK | Java 8 | TESTS | 86 | 280 | 1740800 | 2000 | |
67106566 | bhautik_77 | D | Dec. 17, 2019, 4:25 p.m. | OK | Java 8 | TESTS | 83 | 280 | 7577600 | 2000 | |
67106376 | StayAwayFromBitches | D | Dec. 17, 2019, 4:24 p.m. | OK | Java 8 | TESTS | 83 | 311 | 5324800 | 2000 | |
67127585 | Tlatoani | D | Dec. 17, 2019, 8:56 p.m. | OK | Kotlin | TESTS | 86 | 857 | 10342400 | 2000 | |
67209459 | AsuraPro | D | Dec. 19, 2019, 1:32 p.m. | OK | Kotlin | TESTS | 86 | 951 | 19046400 | 2000 | |
67098891 | keymoon | D | Dec. 17, 2019, 3:56 p.m. | OK | Mono C# | TESTS | 83 | 592 | 27238400 | 2000 | |
67631180 | camypaper | D | Dec. 26, 2019, 4:04 a.m. | OK | Mono C# | TESTS | 88 | 686 | 68608000 | 2000 | |
67102882 | tarattata1 | D | Dec. 17, 2019, 4:10 p.m. | OK | MS C++ | TESTS | 83 | 202 | 7884800 | 2000 | |
67196312 | platter | D | Dec. 19, 2019, 9:11 a.m. | OK | MS C++ | TESTS | 86 | 234 | 3891200 | 2000 | |
67101053 | math957963 | D | Dec. 17, 2019, 4:03 p.m. | OK | MS C++ | TESTS | 83 | 234 | 8192000 | 2000 | |
67116099 | nukeykt | D | Dec. 17, 2019, 5:16 p.m. | OK | MS C++ 2017 | TESTS | 83 | 312 | 8806400 | 2000 | |
67120832 | dkyun | D | Dec. 17, 2019, 6:22 p.m. | OK | MS C++ 2017 | TESTS | 83 | 358 | 6348800 | 2000 | |
67098913 | youx | D | Dec. 17, 2019, 3:56 p.m. | OK | MS C++ 2017 | TESTS | 83 | 358 | 9011200 | 2000 | |
67133416 | pichulia | D | Dec. 18, 2019, 2:10 a.m. | OK | MS C++ 2017 | TESTS | 86 | 686 | 54784000 | 2000 | |
67299693 | wp32pw | D | Dec. 20, 2019, 6:13 p.m. | OK | MS C++ 2017 | TESTS | 88 | 889 | 8089600 | 2000 | |
67151122 | sheshen | D | Dec. 18, 2019, 10:50 a.m. | OK | MS C++ 2017 | TESTS | 86 | 966 | 3481600 | 2000 | |
67150797 | kurs | D | Dec. 18, 2019, 10:42 a.m. | OK | MS C++ 2017 | TESTS | 86 | 997 | 5324800 | 2000 | |
67096764 | Prostoegor239 | D | Dec. 17, 2019, 3:50 p.m. | OK | MS C++ 2017 | TESTS | 83 | 1013 | 7577600 | 2000 | |
67114253 | MrLolthe1st | D | Dec. 17, 2019, 5:05 p.m. | OK | MS C++ 2017 | TESTS | 83 | 1013 | 7987200 | 2000 | |
67121242 | goodhope | D | Dec. 17, 2019, 6:26 p.m. | OK | MS C++ 2017 | TESTS | 83 | 1107 | 6451200 | 2000 | |
67141573 | shivam1420 | D | Dec. 18, 2019, 7 a.m. | OK | Node.js | TESTS | 86 | 1856 | 78233600 | 2000 | |
67100453 | pajenegod | D | Dec. 17, 2019, 4:01 p.m. | OK | PyPy 2 | TESTS | 83 | 530 | 65024000 | 2000 | |
67100337 | bcollet | D | Dec. 17, 2019, 4:01 p.m. | OK | PyPy 2 | TESTS | 83 | 608 | 44441600 | 2000 | |
67139022 | kabeer27 | D | Dec. 18, 2019, 5:52 a.m. | OK | PyPy 2 | TESTS | 86 | 623 | 35942400 | 2000 | |
67102658 | MVP | D | Dec. 17, 2019, 4:09 p.m. | OK | PyPy 2 | TESTS | 83 | 639 | 32460800 | 2000 | |
67095466 | Pyar.Mahobat.Dhoka.Hai | D | Dec. 17, 2019, 3:46 p.m. | OK | PyPy 2 | TESTS | 83 | 950 | 36556800 | 2000 | |
67243010 | IrOty1oX5uSp4 | D | Dec. 19, 2019, 4:41 p.m. | OK | PyPy 3 | TESTS | 86 | 623 | 75264000 | 2000 | |
67232092 | IrOty1oX5uSp4 | D | Dec. 19, 2019, 3:50 p.m. | OK | PyPy 3 | TESTS | 86 | 779 | 67379200 | 2000 | |
67234083 | IrOty1oX5uSp4 | D | Dec. 19, 2019, 3:58 p.m. | OK | PyPy 3 | TESTS | 86 | 780 | 67788800 | 2000 | |
67235879 | IrOty1oX5uSp4 | D | Dec. 19, 2019, 4:06 p.m. | OK | PyPy 3 | TESTS | 86 | 780 | 72908800 | 2000 | |
67119475 | FLOP | D | Dec. 17, 2019, 5:34 p.m. | OK | PyPy 3 | TESTS | 83 | 889 | 27033600 | 2000 | |
67241168 | IrOty1oX5uSp4 | D | Dec. 19, 2019, 4:30 p.m. | OK | PyPy 3 | TESTS | 86 | 966 | 120934400 | 2000 | |
67106139 | su565fx | D | Dec. 17, 2019, 4:23 p.m. | OK | PyPy 3 | TESTS | 83 | 998 | 24678400 | 2000 | |
67176524 | titia | D | Dec. 18, 2019, 7:33 p.m. | OK | PyPy 3 | TESTS | 86 | 1326 | 27955200 | 2000 | |
67201427 | nikeshthapa255 | D | Dec. 19, 2019, 11:02 a.m. | OK | PyPy 3 | TESTS | 86 | 1356 | 30515200 | 2000 | |
67135071 | rmyak | D | Dec. 18, 2019, 3:35 a.m. | OK | PyPy 3 | TESTS | 86 | 1372 | 28262400 | 2000 | |
67127390 | Kamsamewar | D | Dec. 17, 2019, 8:50 p.m. | OK | Python 3 | TESTS | 86 | 1138 | 31539200 | 2000 | |
67107997 | Shee11 | D | Dec. 17, 2019, 4:31 p.m. | OK | Python 3 | TESTS | 83 | 1404 | 17408000 | 2000 | |
67141062 | auouo | D | Dec. 18, 2019, 6:47 a.m. | OK | Python 3 | TESTS | 86 | 1482 | 18739200 | 2000 | |
67106665 | manhar | D | Dec. 17, 2019, 4:25 p.m. | OK | Python 3 | TESTS | 83 | 1590 | 12185600 | 2000 | |
68136650 | SinKing | D | Jan. 3, 2020, 7:16 p.m. | OK | Python 3 | TESTS | 88 | 1591 | 11161600 | 2000 | |
67157385 | shiv_99 | D | Dec. 18, 2019, 12:55 p.m. | OK | Python 3 | TESTS | 86 | 1668 | 14950400 | 2000 | |
67157129 | shiv_99 | D | Dec. 18, 2019, 12:50 p.m. | OK | Python 3 | TESTS | 86 | 1684 | 15155200 | 2000 | |
68935405 | ziddi | D | Jan. 16, 2020, 12:40 p.m. | OK | Python 3 | TESTS | 88 | 1716 | 14131200 | 2000 | |
68240470 | 17wh1a0550 | D | Jan. 5, 2020, 12:36 p.m. | OK | Python 3 | TESTS | 88 | 1747 | 19353600 | 2000 | |
67180064 | juniorcompressor | D | Dec. 18, 2019, 10 p.m. | OK | Python 3 | TESTS | 86 | 1825 | 18124800 | 2000 | |
67115040 | sansen | D | Dec. 17, 2019, 5:09 p.m. | OK | Rust | TESTS | 83 | 109 | 20377600 | 2000 | |
67098350 | tuna_salad | D | Dec. 17, 2019, 3:54 p.m. | OK | Rust | TESTS | 83 | 171 | 20275200 | 2000 | |
67133735 | kobae964 | D | Dec. 18, 2019, 2:27 a.m. | OK | Rust | TESTS | 86 | 468 | 7065600 | 2000 |
Back to search problems