Codeforces Round 513 by Barcelona Bootcamp (rated, Div. 1 + 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
1060 Codeforces Round 513 by Barcelona Bootcamp (rated, Div. 1 + Div. 2) FINISHED False 9000 198888924 Oct. 4, 2018, 7:05 a.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 9016 ) B Maximum Sum of Digits PROGRAMMING greedy 1100

B'You are given a positive integer n . Let S(x) be sum of digits in base 10 representation of x , for example, S(123) = 1 + 2 + 3 = 6 , S(0) = 0 . Your task is to find two integers a, b , such that 0 <= q a, b <= q n , a + b = n and S(a) + S(b) is the largest possible among all such pairs. The only line of input contains an integer n (1 <= q n <= q 10^{12}) . Print largest S(a) + S(b) among all pairs of integers a, b , such that 0 <= q a, b <= q n and a + b = n . In the first example, you can choose, for example, a = 17 and b = 18 , so that S(17) + S(18) = 1 + 7 + 1 + 8 = 17 . It can be shown that it is impossible to get a larger answer. In the second test example, you can choose, for example, a = 5000000001 and b = 4999999999 , with S(5000000001) + S(4999999999) = 91 . It can be shown that it is impossible to get a larger answer. '...

Tutorials

User editorial for Codeforces Round 513 by Barcelona Bootcamp (rated, Div. 1 + Div. 2)

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
44069324 sakurakatana B Oct. 10, 2018, 11:06 a.m. OK Clang++17 Diagnostics TESTS 68 46 0 1100
45144103 ningyi B Oct. 31, 2018, 3:58 p.m. OK Clang++17 Diagnostics TESTS 68 46 0 1100
45513028 terry_for_venus B Nov. 10, 2018, 2:07 p.m. OK Clang++17 Diagnostics TESTS 68 46 0 1100
49914799 Het262 B Feb. 14, 2019, 3:57 p.m. OK Clang++17 Diagnostics TESTS 68 46 0 1100
45564285 terry_for_venus B Nov. 11, 2018, 1:28 p.m. OK Clang++17 Diagnostics TESTS 68 46 0 1100
49912470 smit.mangukiya B Feb. 14, 2019, 2:53 p.m. OK Clang++17 Diagnostics TESTS 68 46 0 1100
44051805 AshutoshAnshul B Oct. 9, 2018, 7:36 p.m. OK Clang++17 Diagnostics TESTS 68 46 0 1100
44011977 yafngzh B Oct. 8, 2018, 6:42 p.m. OK Clang++17 Diagnostics TESTS 68 46 0 1100
43898285 Prakhar. B Oct. 6, 2018, 11:39 a.m. OK Clang++17 Diagnostics TESTS 68 46 0 1100
43786533 jakirsab B Oct. 4, 2018, 12:23 p.m. OK Clang++17 Diagnostics TESTS 68 46 0 1100
52511841 ruban B April 9, 2019, 12:19 a.m. OK Delphi TESTS 68 31 0 1100
48393759 binarmo B Jan. 14, 2019, 4:38 p.m. OK FPC TESTS 68 31 0 1100
45198975 chaorenhaha B Nov. 2, 2018, 8:52 a.m. OK FPC TESTS 68 31 0 1100
45198952 chaorenhaha B Nov. 2, 2018, 8:52 a.m. OK FPC TESTS 68 31 0 1100
43921905 cbl_nhathuy B Oct. 7, 2018, 1:01 a.m. OK FPC TESTS 68 31 0 1100
43815499 luogu_bot4 B Oct. 5, 2018, 4:59 a.m. OK FPC TESTS 68 31 0 1100
43804008 TShT B Oct. 4, 2018, 6:44 p.m. OK FPC TESTS 68 31 0 1100
43762317 Liah B Oct. 4, 2018, 7:21 a.m. OK FPC TESTS 68 31 0 1100
45090242 luogu_bot3 B Oct. 30, 2018, 9:14 a.m. OK FPC TESTS 68 31 102400 1100
44831526 njsfdxfszx59 B Oct. 25, 2018, 8:41 a.m. OK FPC TESTS 68 31 102400 1100
43874320 zhuchengyang B Oct. 6, 2018, 12:02 a.m. OK FPC TESTS 68 31 102400 1100
53379168 Jahid135 B April 26, 2019, 9:10 p.m. OK GNU C11 TESTS 68 31 0 1100
54267186 MOHIR_MBSTU B May 17, 2019, 6:43 a.m. OK GNU C11 TESTS 68 31 0 1100
54623158 shanto_muk B May 25, 2019, 1:15 p.m. OK GNU C11 TESTS 68 31 0 1100
60362885 khasrulShihab B Sept. 10, 2019, 7:09 p.m. OK GNU C11 TESTS 68 31 0 1100
64065139 vjudge1 B Nov. 2, 2019, 5:28 a.m. OK GNU C11 TESTS 68 31 0 1100
65467341 DevJewel B Nov. 21, 2019, 6:44 a.m. OK GNU C11 TESTS 68 31 0 1100
50909100 vjudge4 B March 6, 2019, 11:11 p.m. OK GNU C11 TESTS 68 31 0 1100
51973747 bojverdict1 B March 29, 2019, 1:32 p.m. OK GNU C11 TESTS 68 31 0 1100
51974696 vjudge1 B March 29, 2019, 1:53 p.m. OK GNU C11 TESTS 68 31 0 1100
54215426 mohiruddin217 B May 15, 2019, 8:28 p.m. OK GNU C11 TESTS 68 31 0 1100
43765127 mijanur_rmn B Oct. 4, 2018, 7:31 a.m. OK GNU C++11 TESTS 68 30 0 1100
43770786 iamworldian B Oct. 4, 2018, 8:05 a.m. OK GNU C++11 TESTS 68 30 0 1100
43772997 Beimo114 B Oct. 4, 2018, 8:22 a.m. OK GNU C++11 TESTS 68 30 0 1100
43939760 radical B Oct. 7, 2018, 10:51 a.m. OK GNU C++11 TESTS 68 30 0 1100
47806377 luogu_bot5 B Jan. 1, 2019, 7:37 a.m. OK GNU C++11 TESTS 68 30 0 1100
48698037 Dustaria B Jan. 22, 2019, 12:44 a.m. OK GNU C++11 TESTS 68 30 0 1100
43764833 linkedroot B Oct. 4, 2018, 7:30 a.m. OK GNU C++11 TESTS 68 30 0 1100
43764264 mihir_yadav B Oct. 4, 2018, 7:28 a.m. OK GNU C++11 TESTS 68 30 0 1100
43759958 memset0c B Oct. 4, 2018, 7:13 a.m. OK GNU C++11 TESTS 68 30 0 1100
69720883 DevC B Jan. 29, 2020, 10:36 a.m. OK GNU C++11 TESTS 68 31 0 1100
44558987 tusharsk B Oct. 19, 2018, 6:42 p.m. OK GNU C++14 TESTS 68 15 0 1100
57147927 Invidia B July 16, 2019, 1:39 p.m. OK GNU C++14 TESTS 68 15 0 1100
54356805 alekhgupta1441 B May 18, 2019, 6:02 p.m. OK GNU C++14 TESTS 68 15 0 1100
44039730 sandy_033 B Oct. 9, 2018, 2:14 p.m. OK GNU C++14 TESTS 68 15 0 1100
43762643 FoolishMe B Oct. 4, 2018, 7:22 a.m. OK GNU C++14 TESTS 68 15 0 1100
43761139 bayharbourbutcher_7 B Oct. 4, 2018, 7:17 a.m. OK GNU C++14 TESTS 68 15 0 1100
47177802 khetarpal_dhruv B Dec. 17, 2018, 6:32 p.m. OK GNU C++14 TESTS 68 15 204800 1100
66152929 Anus1373 B Dec. 1, 2019, 8:03 p.m. OK GNU C++14 TESTS 68 30 0 1100
69431017 AmeyaRele B Jan. 23, 2020, 5:20 p.m. OK GNU C++14 TESTS 68 30 0 1100
69635024 sharifcse B Jan. 27, 2020, 6:17 p.m. OK GNU C++14 TESTS 68 30 0 1100
43943332 pyBlob B Oct. 7, 2018, 12:30 p.m. OK GNU C++17 TESTS 68 15 0 1100
50922486 vjudge4 B March 7, 2019, 10:01 a.m. OK GNU C++17 TESTS 68 15 0 1100
43760049 Evlampiy B Oct. 4, 2018, 7:13 a.m. OK GNU C++17 TESTS 68 15 0 1100
43917877 ahmocs B Oct. 6, 2018, 8:04 p.m. OK GNU C++17 TESTS 68 15 0 1100
43784995 47th-draganov B Oct. 4, 2018, 11:53 a.m. OK GNU C++17 TESTS 68 15 307200 1100
69487687 aaradhya10 B Jan. 24, 2020, 8:23 p.m. OK GNU C++17 TESTS 68 30 0 1100
69398044 fortis_sage B Jan. 23, 2020, 7:14 a.m. OK GNU C++17 TESTS 68 30 0 1100
62206187 mk_02 B Oct. 9, 2019, 1:18 p.m. OK GNU C++17 TESTS 68 30 0 1100
58989254 karansiwach360 B Aug. 18, 2019, 8:31 a.m. OK GNU C++17 TESTS 68 30 0 1100
69830599 vasugondaliya B Jan. 30, 2020, 10:21 a.m. OK GNU C++17 TESTS 68 30 0 1100
44283931 deletelazy B Oct. 14, 2018, 6:27 a.m. OK Go TESTS 68 31 0 1100
43797593 minh_ltt B Oct. 4, 2018, 4:08 p.m. OK Go TESTS 68 31 0 1100
44816840 fc-lib-xyz B Oct. 24, 2018, 9:57 p.m. OK Go TESTS 68 46 0 1100
44237322 digiter B Oct. 13, 2018, 5:25 a.m. OK Go TESTS 68 46 0 1100
45114545 peter_jerry_ye B Oct. 30, 2018, 8:29 p.m. OK Haskell TESTS 68 15 8396800 1100
43806480 danielfleischman B Oct. 4, 2018, 8:01 p.m. OK Haskell TESTS 68 31 0 1100
45343550 penpenpen B Nov. 5, 2018, 11:57 p.m. OK Haskell TESTS 68 31 8396800 1100
43875493 jedikni B Oct. 6, 2018, 1:19 a.m. OK Haskell TESTS 68 31 8499200 1100
43772471 karoyakani B Oct. 4, 2018, 8:18 a.m. OK Haskell TESTS 68 31 8499200 1100
43762574 Haar B Oct. 4, 2018, 7:22 a.m. OK Haskell TESTS 68 31 8499200 1100
67990764 krutarth07 B Dec. 31, 2019, 4:36 a.m. OK Java 11 TESTS 68 202 0 1100
69020004 StEpAn_123 B Jan. 18, 2020, 6:12 a.m. OK Java 8 TESTS 68 109 0 1100
68399001 sushant_verma B Jan. 8, 2020, 12:23 p.m. OK Java 8 TESTS 68 109 0 1100
68372877 akshVerma B Jan. 7, 2020, 6:23 p.m. OK Java 8 TESTS 68 109 0 1100
67547462 adzi B Dec. 24, 2019, 3:55 p.m. OK Java 8 TESTS 68 109 0 1100
63681779 vivek_23 B Oct. 28, 2019, 8:16 p.m. OK Java 8 TESTS 68 109 0 1100
60501507 zekigurbuz B Sept. 13, 2019, 6:57 p.m. OK Java 8 TESTS 68 109 0 1100
56006724 tapopadma B June 24, 2019, 3:56 p.m. OK Java 8 TESTS 68 109 0 1100
53831527 TWO_POINTER B May 6, 2019, 8:26 p.m. OK Java 8 TESTS 68 109 0 1100
51237124 PrakharJain B March 12, 2019, 7:06 p.m. OK Java 8 TESTS 68 109 0 1100
48174794 I.A.K.O.V B Jan. 10, 2019, 8:56 a.m. OK Java 8 TESTS 68 109 0 1100
43793473 NguyenHungCuong B Oct. 4, 2018, 2:37 p.m. OK JavaScript TESTS 68 46 1024000 1100
43867082 erenerisken B Oct. 5, 2018, 6:32 p.m. OK Kotlin TESTS 68 155 0 1100
43804990 raynald B Oct. 4, 2018, 7:14 p.m. OK Kotlin TESTS 68 155 409600 1100
43921706 Jarekczek B Oct. 7, 2018, 12:37 a.m. OK Kotlin TESTS 68 171 307200 1100
47896447 Skndr801 B Jan. 4, 2019, 10:52 a.m. OK Mono C# TESTS 68 46 0 1100
44053943 Prog_Ahmed_Magdy B Oct. 9, 2018, 9:20 p.m. OK Mono C# TESTS 68 46 0 1100
47180817 Bossnick1099 B Dec. 17, 2018, 8:42 p.m. OK Mono C# TESTS 68 46 0 1100
55096612 og.kostya B June 4, 2019, 5:31 p.m. OK Mono C# TESTS 68 61 0 1100
43764126 Zvigintsev B Oct. 4, 2018, 7:27 a.m. OK Mono C# TESTS 68 61 0 1100
43763968 witchu B Oct. 4, 2018, 7:27 a.m. OK Mono C# TESTS 68 61 0 1100
44044911 greenkirill B Oct. 9, 2018, 4:41 p.m. OK Mono C# TESTS 68 62 0 1100
44483402 vansang1706 B Oct. 18, 2018, 11:25 a.m. OK Mono C# TESTS 68 62 0 1100
46383802 tarptaeya B Nov. 29, 2018, 8:26 p.m. OK Mono C# TESTS 68 62 0 1100
47813705 tamunsio B Jan. 1, 2019, 1:02 p.m. OK Mono C# TESTS 68 62 0 1100
63991056 vjudge5 B Nov. 1, 2019, 1:09 p.m. OK MS C++ TESTS 68 31 0 1100
63379965 vjudge5 B Oct. 25, 2019, 12:11 p.m. OK MS C++ TESTS 68 31 0 1100
64056638 vjudge3 B Nov. 2, 2019, 1:44 a.m. OK MS C++ TESTS 68 31 0 1100
63378939 vjudge1 B Oct. 25, 2019, 11:53 a.m. OK MS C++ TESTS 68 31 0 1100
64101361 vjudge2 B Nov. 2, 2019, 3:34 p.m. OK MS C++ TESTS 68 31 0 1100
64187568 vjudge1 B Nov. 4, 2019, 6:08 a.m. OK MS C++ TESTS 68 31 0 1100
64476616 vjudge5 B Nov. 7, 2019, 2:35 p.m. OK MS C++ TESTS 68 31 0 1100
64477292 vjudge1 B Nov. 7, 2019, 2:47 p.m. OK MS C++ TESTS 68 31 0 1100
64059777 vjudge4 B Nov. 2, 2019, 3:17 a.m. OK MS C++ TESTS 68 31 0 1100
64100221 vjudge5 B Nov. 2, 2019, 3:11 p.m. OK MS C++ TESTS 68 31 0 1100
61741980 moh.om.ha B Oct. 2, 2019, 8:46 p.m. OK MS C++ 2017 TESTS 68 31 0 1100
64073365 vjudge4 B Nov. 2, 2019, 8:08 a.m. OK MS C++ 2017 TESTS 68 31 0 1100
64130527 shio B Nov. 3, 2019, 6:41 a.m. OK MS C++ 2017 TESTS 68 31 0 1100
64131005 vjudge4 B Nov. 3, 2019, 6:50 a.m. OK MS C++ 2017 TESTS 68 31 0 1100
51097573 SomarDahdal B March 9, 2019, 5:15 p.m. OK MS C++ 2017 TESTS 68 31 0 1100
51425184 Husne_Matar B March 17, 2019, 6:48 p.m. OK MS C++ 2017 TESTS 68 31 0 1100
61256164 Saravanan_jodavula B Sept. 25, 2019, 10:09 a.m. OK MS C++ 2017 TESTS 68 31 0 1100
61876587 Boryan07 B Oct. 4, 2019, 8:28 p.m. OK MS C++ 2017 TESTS 68 31 0 1100
55204773 Mad112233 B June 6, 2019, 12:06 p.m. OK MS C++ 2017 TESTS 68 46 0 1100
44001048 sahil_1995 B Oct. 8, 2018, 1:44 p.m. OK Node.js TESTS 68 202 614400 1100
43768571 sk0 B Oct. 4, 2018, 7:50 a.m. OK Ocaml TESTS 68 15 0 1100
43772181 Nekit_vp B Oct. 4, 2018, 8:15 a.m. OK PascalABC.NET TESTS 68 46 0 1100
47682151 Tigutor B Dec. 29, 2018, 12:42 p.m. OK PascalABC.NET TESTS 68 46 0 1100
44027664 Zhenyasonic B Oct. 9, 2018, 8:52 a.m. OK PascalABC.NET TESTS 68 61 102400 1100
43929302 fruha B Oct. 7, 2018, 6:36 a.m. OK PascalABC.NET TESTS 68 62 102400 1100
44027046 ZuZKho B Oct. 9, 2018, 8:31 a.m. OK PascalABC.NET TESTS 68 62 102400 1100
53857189 Houy3 B May 7, 2019, 5:01 p.m. OK PascalABC.NET TESTS 68 358 307200 1100
43795881 fruwajacybyk B Oct. 4, 2018, 3:29 p.m. OK Perl TESTS 68 31 0 1100
44079628 s_p B Oct. 10, 2018, 2:29 p.m. OK Perl TESTS 68 31 0 1100
43764772 rsFalse B Oct. 4, 2018, 7:30 a.m. OK Perl TESTS 68 46 0 1100
43788413 mayakin B Oct. 4, 2018, 12:59 p.m. OK PHP TESTS 68 31 819200 1100
43798724 soumyasarkar1998 B Oct. 4, 2018, 4:33 p.m. OK PyPy 2 TESTS 68 124 0 1100
58359107 GTrigger B Aug. 5, 2019, 9:53 p.m. OK PyPy 2 TESTS 68 124 0 1100
43764432 Madad_Ali_Madad B Oct. 4, 2018, 7:29 a.m. OK PyPy 2 TESTS 68 139 0 1100
53807565 masonsbro B May 6, 2019, 3:01 a.m. OK PyPy 2 TESTS 68 139 0 1100
43793606 apoorv1999 B Oct. 4, 2018, 2:40 p.m. OK PyPy 2 TESTS 68 140 0 1100
43982972 nealzane B Oct. 8, 2018, 4:44 a.m. OK PyPy 2 TESTS 68 140 0 1100
43866134 kd710306 mFascinet B Oct. 5, 2018, 6:09 p.m. OK PyPy 2 TESTS 68 140 0 1100
43765047 _kawaii_neko_ B Oct. 4, 2018, 7:31 a.m. OK PyPy 2 TESTS 68 140 0 1100
43764121 c1729 B Oct. 4, 2018, 7:27 a.m. OK PyPy 2 TESTS 68 140 0 1100
43763209 astrom.lars B Oct. 4, 2018, 7:24 a.m. OK PyPy 2 TESTS 68 155 0 1100
50610247 vjudge2 B Feb. 28, 2019, 4:32 p.m. OK PyPy 3 TESTS 68 124 0 1100
49837128 humayunraj789 B Feb. 12, 2019, 4:41 p.m. OK PyPy 3 TESTS 68 124 0 1100
52994036 bupt.wc B April 19, 2019, 2:04 a.m. OK PyPy 3 TESTS 68 124 0 1100
50911858 pedroteosousa B March 7, 2019, 3:10 a.m. OK PyPy 3 TESTS 68 139 0 1100
56607259 KILLER_CODER B July 6, 2019, 5:30 a.m. OK PyPy 3 TESTS 68 140 0 1100
50903783 hg17june B March 6, 2019, 6:47 p.m. OK PyPy 3 TESTS 68 140 0 1100
68477129 crap_the_coder B Jan. 10, 2020, 6:08 a.m. OK PyPy 3 TESTS 68 140 0 1100
67318764 Drago_ B Dec. 21, 2019, 7:10 a.m. OK PyPy 3 TESTS 68 140 0 1100
64844786 shashadwivedi321 B Nov. 13, 2019, 5:15 p.m. OK PyPy 3 TESTS 68 140 0 1100
60666560 kopok2 B Sept. 16, 2019, 8:24 a.m. OK PyPy 3 TESTS 68 140 0 1100
43822978 anshuman16423 B Oct. 5, 2018, 10:15 a.m. OK Python 2 TESTS 68 171 0 1100
51251054 danilgurov B March 13, 2019, 8:41 a.m. OK Python 2 TESTS 68 171 0 1100
47387012 biltharesatyendra B Dec. 23, 2018, 5:48 a.m. OK Python 2 TESTS 68 171 0 1100
45556237 Jonasz B Nov. 11, 2018, 8:42 a.m. OK Python 2 TESTS 68 171 0 1100
44708277 cis_pie inishchith. nurdtechie98 B Oct. 22, 2018, 5:43 p.m. OK Python 2 TESTS 68 171 0 1100
44684888 test616.cpp B Oct. 22, 2018, 8:53 a.m. OK Python 2 TESTS 68 171 0 1100
44063825 wjfwjfwjf B Oct. 10, 2018, 7:50 a.m. OK Python 2 TESTS 68 171 0 1100
44002770 SerChirag B Oct. 8, 2018, 2:27 p.m. OK Python 2 TESTS 68 171 0 1100
43987851 franckmy B Oct. 8, 2018, 8:25 a.m. OK Python 2 TESTS 68 171 0 1100
50768362 vjudge2 B March 4, 2019, 1:21 a.m. OK Python 2 TESTS 68 186 0 1100
48092367 Z4YED B Jan. 8, 2019, 2:32 p.m. OK Python 3 TESTS 68 108 0 1100
59680066 Jonte_98 B Aug. 29, 2019, 8:05 p.m. OK Python 3 TESTS 68 109 0 1100
58902914 XAMRMAX B Aug. 16, 2019, 9:56 a.m. OK Python 3 TESTS 68 109 0 1100
55569246 sarthak889 B June 14, 2019, 5:33 p.m. OK Python 3 TESTS 68 109 0 1100
55278224 Yatheesha B June 7, 2019, 8:53 p.m. OK Python 3 TESTS 68 109 0 1100
55084935 darkshadow07 B June 4, 2019, 12:13 p.m. OK Python 3 TESTS 68 109 0 1100
54320040 chaudhary_19 B May 17, 2019, 8:27 p.m. OK Python 3 TESTS 68 109 0 1100
53938426 taher_r B May 10, 2019, 12:21 a.m. OK Python 3 TESTS 68 109 0 1100
54088636 Arhimason B May 14, 2019, 9:06 a.m. OK Python 3 TESTS 68 109 0 1100
67058914 meme_lord B Dec. 17, 2019, 8:13 a.m. OK Python 3 TESTS 68 109 0 1100
44079506 cielavenir B Oct. 10, 2018, 2:26 p.m. OK Ruby TESTS 68 62 0 1100
43796943 Felerius B Oct. 4, 2018, 3:53 p.m. OK Rust TESTS 68 31 0 1100
43768326 clrcldy B Oct. 4, 2018, 7:48 a.m. OK Rust TESTS 68 31 0 1100
51248937 .counter B March 13, 2019, 7:19 a.m. OK Scala TESTS 68 421 0 1100
44551505 yakamoto B Oct. 19, 2018, 3:28 p.m. OK Scala TESTS 68 421 0 1100
44219259 gergocsegzi B Oct. 12, 2018, 4:48 p.m. OK Scala TESTS 68 436 0 1100
43775016 kakuzu B Oct. 4, 2018, 8:41 a.m. OK Scala TESTS 68 529 0 1100

remove filters

Back to search problems