Codeforces Round 880 (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
1835 Codeforces Round 880 (Div. 1) FINISHED False 7200 44724299 June 18, 2023, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 7905 ) A k-th equality PROGRAMMING brute force implementation math

B'Consider all equalities of form a + b = c , where a has A digits, b has B digits, and c has C digits. All the numbers are positive integers and are written without leading zeroes. Find the k -th lexicographically smallest equality when written as a string like above or determine that it does not exist. For example, the first three equalities satisfying A = 1 , B = 1 , C = 2 are An equality s is lexicographically smaller than an equality t with the same lengths of the numbers if and only if the following holds: Each test contains multiple test cases. The first line of input contains a single integer t ( 1 <= q t <= q 10^3 ) -- the number of test cases. The description of test cases follows. The first line of each test case contains integers A , B , C , k ( 1 <= q A, B, C <= q 6 , 1 <= q k <= q 10^{12} ). Each input file has at most 5 test cases which do not satisfy A, B, C <= q 3 . For each test case, if there are strictly less than k valid equalities, output -1 . Otherwise, output the k -th equality as a string of form a + b = c . In the first test case, the first 9 solutions are: langle 1, 1, 2 rangle, langle 1, 2, 3 rangle, langle 1, 3, 4 rangle, langle 1, 4, 5 rangle, langle 1, 5, 6 rangle, langle 1, 6, 7 rangle, langle 1, 7, 8 rangle, langle 1, 8, 9 rangle, langle 2, 1, 3 rangle . Int the third test case, there are no solutions as the smallest possible values for a and b are larger than the maximal possible value of c -- 10 + 10 = 20 > 9 . Please note that whitespaces in the output matter. '...

Tutorials

Codeforces Round 880 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
210131468 Tdyx A June 18, 2023, 3:09 p.m. OK C# 10 TESTS 17 62 819200
210128417 KumaTachiRen A June 18, 2023, 3:03 p.m. OK C# 8 TESTS 17 109 307200
210131539 Gassa A June 18, 2023, 3:09 p.m. OK D TESTS 17 31 0
210144226 realFZzzz A June 18, 2023, 3:38 p.m. OK GNU C++14 TESTS 17 15 0
210123308 zoutong A June 18, 2023, 2:54 p.m. OK GNU C++14 TESTS 17 15 0
210121546 zzuqy A June 18, 2023, 2:51 p.m. OK GNU C++14 TESTS 17 15 0
210121359 The-Winner A June 18, 2023, 2:50 p.m. OK GNU C++14 TESTS 17 15 0
210120942 Jimanbanashi A June 18, 2023, 2:50 p.m. OK GNU C++14 TESTS 17 15 0
210119255 wutongchun A June 18, 2023, 2:47 p.m. OK GNU C++14 TESTS 17 15 0
210116669 crazy_sea A June 18, 2023, 2:44 p.m. OK GNU C++14 TESTS 17 15 0
210116181 Drice A June 18, 2023, 2:43 p.m. OK GNU C++14 TESTS 17 15 0
210114916 awoo A June 18, 2023, 2:42 p.m. OK GNU C++14 TESTS 17 15 0
210192323 KurashinaAsuka A June 19, 2023, 1:09 a.m. OK GNU C++14 TESTS 19 30 0
210182937 the_computer_jock A June 18, 2023, 8:22 p.m. OK GNU C++17 TESTS 17 15 0
210153319 kzyKT A June 18, 2023, 4:02 p.m. OK GNU C++17 TESTS 17 15 0
210129568 amirhoseinfar1385 A June 18, 2023, 3:05 p.m. OK GNU C++17 TESTS 17 15 0
210122242 marsxiang5902 A June 18, 2023, 2:52 p.m. OK GNU C++17 TESTS 17 15 0
210119164 flytime A June 18, 2023, 2:47 p.m. OK GNU C++17 TESTS 17 15 0
210118523 tinca_matei A June 18, 2023, 2:46 p.m. OK GNU C++17 TESTS 17 15 0
210118389 liympanda A June 18, 2023, 2:46 p.m. OK GNU C++17 TESTS 17 15 0
210118211 installb A June 18, 2023, 2:46 p.m. OK GNU C++17 TESTS 17 15 0
210117786 Alon-Tanay A June 18, 2023, 2:45 p.m. OK GNU C++17 TESTS 17 15 0
210117543 KroosTheKeenGlint A June 18, 2023, 2:45 p.m. OK GNU C++17 TESTS 17 15 0
210172354 Cursed_Ninja A June 18, 2023, 5:46 p.m. OK GNU C++17 (64) TESTS 17 15 0
210170426 MAOooOAM A June 18, 2023, 5:28 p.m. OK GNU C++17 (64) TESTS 17 15 0
210140463 QAQ_QWQ A June 18, 2023, 3:29 p.m. OK GNU C++17 (64) TESTS 17 15 0
210133259 ahshafi A June 18, 2023, 3:13 p.m. OK GNU C++17 (64) TESTS 17 15 0
210127262 PEKKA_l A June 18, 2023, 3:01 p.m. OK GNU C++17 (64) TESTS 17 15 0
210126050 EnEm A June 18, 2023, 2:58 p.m. OK GNU C++17 (64) TESTS 17 15 0
210125828 Anchoryl A June 18, 2023, 2:58 p.m. OK GNU C++17 (64) TESTS 17 15 0
210125336 Fyind A June 18, 2023, 2:57 p.m. OK GNU C++17 (64) TESTS 17 15 0
210124847 peiwenjun A June 18, 2023, 2:56 p.m. OK GNU C++17 (64) TESTS 17 15 0
210124763 nicksms A June 18, 2023, 2:56 p.m. OK GNU C++17 (64) TESTS 17 15 0
210185502 Tutis A June 18, 2023, 9:16 p.m. OK GNU C++20 (64) TESTS 17 0 0
210206066 Derek0 A June 19, 2023, 5:58 a.m. OK GNU C++20 (64) TESTS 19 15 0
210204214 skinnyasiandude A June 19, 2023, 5:27 a.m. OK GNU C++20 (64) TESTS 19 15 0
210200725 yyf_0404 A June 19, 2023, 4:17 a.m. OK GNU C++20 (64) TESTS 19 15 0
210198612 Hritik12 A June 19, 2023, 3:42 a.m. OK GNU C++20 (64) TESTS 19 15 0
210197281 IceRay A June 19, 2023, 3:13 a.m. OK GNU C++20 (64) TESTS 19 15 0
210193022 zhouhuanyi A June 19, 2023, 1:31 a.m. OK GNU C++20 (64) TESTS 19 15 0
210192660 lndjy A June 19, 2023, 1:19 a.m. OK GNU C++20 (64) TESTS 19 15 0
210192218 __stick A June 19, 2023, 1:05 a.m. OK GNU C++20 (64) TESTS 19 15 0
210191546 zhiyangfan A June 19, 2023, 12:46 a.m. OK GNU C++20 (64) TESTS 19 15 0
210180920 pehle_1200_kar_le A June 18, 2023, 7:43 p.m. OK Java 11 TESTS 17 249 0
210117215 profchi A June 18, 2023, 2:44 p.m. OK Java 11 TESTS 17 265 0
210121073 jack.t.y.wu A June 18, 2023, 2:50 p.m. OK Java 17 TESTS 17 280 409600
210201139 nikh94 A June 19, 2023, 4:27 a.m. OK Java 17 TESTS 19 576 819200
210122708 yvbf A June 18, 2023, 2:52 p.m. OK Java 8 TESTS 17 140 0
210121240 golions A June 18, 2023, 2:50 p.m. OK Java 8 TESTS 17 140 0
210159076 Tlatoani A June 18, 2023, 4:18 p.m. OK Kotlin 1.6 TESTS 17 295 0
210115083 top73only A June 18, 2023, 2:42 p.m. OK Kotlin 1.6 TESTS 17 296 0
210133916 Hakiobo A June 18, 2023, 3:15 p.m. OK Kotlin 1.7 TESTS 17 342 0
210186466 I_Need_Alex_R_Coleman alexrcoleman jport A June 18, 2023, 9:46 p.m. OK Kotlin 1.7 TESTS 17 608 112128000
210121879 plevande A June 18, 2023, 2:51 p.m. OK PyPy 3-64 TESTS 17 109 3686400
210117698 thewaxmango A June 18, 2023, 2:45 p.m. OK PyPy 3-64 TESTS 17 124 4710400
210120702 xuhao95 A June 18, 2023, 2:49 p.m. OK PyPy 3-64 TESTS 17 139 4812800
210120981 codicon A June 18, 2023, 2:50 p.m. OK PyPy 3-64 TESTS 17 140 4403200
210119799 SPD_9X2 A June 18, 2023, 2:48 p.m. OK PyPy 3-64 TESTS 17 140 5017600
210116508 toam A June 18, 2023, 2:44 p.m. OK PyPy 3-64 TESTS 17 140 6860800
210116963 alxwen711 A June 18, 2023, 2:44 p.m. OK PyPy 3-64 TESTS 17 140 7475200
210124987 Shirotsume A June 18, 2023, 2:56 p.m. OK PyPy 3-64 TESTS 17 170 8806400
210122296 huangxw A June 18, 2023, 2:52 p.m. OK PyPy 3-64 TESTS 17 171 5632000
210120778 titia A June 18, 2023, 2:49 p.m. OK PyPy 3-64 TESTS 17 171 8601600
210122192 WaterColor2037 A June 18, 2023, 2:52 p.m. OK Rust 2021 TESTS 17 31 0
210119309 cpchenpi A June 18, 2023, 2:47 p.m. OK Rust 2021 TESTS 17 62 102400

remove filters

Back to search problems