Codeforces Round 860 (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
1798 Codeforces Round 860 (Div. 2) FINISHED False 7200 57425062 March 26, 2023, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 8414 ) C Candy Store PROGRAMMING greedy math number theory 1700

B"The store sells n types of candies with numbers from 1 to n . One candy of type i costs b_i coins. In total, there are a_i candies of type i in the store. You need to pack all available candies in packs, each pack should contain only one type of candies. Formally, for each type of candy i you need to choose the integer d_i , denoting the number of type i candies in one pack, so that a_i is divided without remainder by d_i . Then the cost of one pack of candies of type i will be equal to b_i cdot d_i . Let's denote this cost by c_i , that is, c_i = b_i cdot d_i . After packaging, packs will be placed on the shelf. Consider the cost of the packs placed on the shelf, in order c_1, c_2, ldots, c_n . Price tags will be used to describe costs of the packs. One price tag can describe the cost of all packs from l to r inclusive if c_l = c_{l+1} = ldots = c_r . Each of the packs from 1 to n must be described by at least one price tag. For example, if c_1, ldots, c_n = [4, 4, 2, 4, 4] , to describe all the packs, a 3 price tags will be enough, the first price tag describes the packs 1, 2 , the second: 3 , the third: 4, 5 . You are given the integers a_1, b_1, a_2, b_2, ldots, a_n, b_n . Your task is to choose integers d_i so that a_i is divisible by d_i for all i , and the required number of price tags to describe the values of c_1, c_2, ldots, c_n is the minimum possible. For a better understanding of the statement, look at the illustration of the first test case of the first test: Let's repeat the meaning of the notation used in the problem: a_i -- the number of candies of type i available in the store. b_i -- the cost of one candy of type i . d_i -- the number of candies of type i in one pack. c_i -- the cost of one pack of can"...

Tutorials

Editorial of Codeforces Round 860 (Div. 2)

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
199426601 q2045891621. C March 27, 2023, 3:03 p.m. OK Clang++17 Diagnostics TESTS 40 2822 3788800 1700
199492233 callnoob C March 28, 2023, 5:28 a.m. OK Clang++20 Diagnostics TESTS 40 2636 6348800 1700
199599817 NenadDapic C March 28, 2023, 10:40 p.m. OK FPC TESTS 40 420 0 1700
199409372 astronom1cal C March 27, 2023, 12:55 p.m. OK GNU C11 TESTS 40 499 3174400 1700
200046629 _Xenox_ C March 31, 2023, 8:45 p.m. OK GNU C11 TESTS 40 499 3174400 1700
199408343 astronom1cal C March 27, 2023, 12:47 p.m. OK GNU C11 TESTS 40 514 3174400 1700
199613540 JiangRH C March 29, 2023, 3:29 a.m. OK GNU C++14 TESTS 40 124 1638400 1700
199711756 sprads C March 29, 2023, 1:53 p.m. OK GNU C++14 TESTS 40 124 2457600 1700
199633745 dengziyue C March 29, 2023, 8:09 a.m. OK GNU C++14 TESTS 40 140 3174400 1700
199621834 Electron C March 29, 2023, 5:42 a.m. OK GNU C++14 TESTS 40 140 3891200 1700
199784027 lxh2022401549 C March 30, 2023, 5:34 a.m. OK GNU C++14 TESTS 40 140 6348800 1700
199702573 Dullbean C March 29, 2023, 12:48 p.m. OK GNU C++14 TESTS 40 155 0 1700
199570913 7star86 C March 28, 2023, 5:16 p.m. OK GNU C++14 TESTS 40 155 3174400 1700
199435616 _Xujin C March 27, 2023, 4:16 p.m. OK GNU C++14 TESTS 40 156 0 1700
199477861 birchtree C March 28, 2023, 1:02 a.m. OK GNU C++14 TESTS 40 156 1638400 1700
199530402 wsyhb C March 28, 2023, 12:07 p.m. OK GNU C++14 TESTS 40 156 1638400 1700
199426373 snacache C March 27, 2023, 3:01 p.m. OK GNU C++17 TESTS 40 109 3174400 1700
199437514 Samratrpal01 C March 27, 2023, 4:32 p.m. OK GNU C++17 TESTS 40 140 3174400 1700
199421973 xzwys C March 27, 2023, 2:27 p.m. OK GNU C++17 TESTS 40 140 3174400 1700
199419980 codemachine_47 C March 27, 2023, 2:13 p.m. OK GNU C++17 TESTS 40 155 0 1700
199516775 52xwj C March 28, 2023, 10:07 a.m. OK GNU C++17 TESTS 40 155 3174400 1700
199589539 bonopo C March 28, 2023, 8:27 p.m. OK GNU C++17 TESTS 40 155 3174400 1700
199793744 stellarhuman09 C March 30, 2023, 7:37 a.m. OK GNU C++17 TESTS 40 155 3174400 1700
199462382 iliya_mon C March 27, 2023, 8:40 p.m. OK GNU C++17 TESTS 40 155 152883200 1700
199605839 TroySigx C March 29, 2023, 12:51 a.m. OK GNU C++17 TESTS 40 156 1638400 1700
199415102 Victor_Luis123 C March 27, 2023, 1:38 p.m. OK GNU C++17 TESTS 40 156 3174400 1700
199409225 CleverXun C March 27, 2023, 12:54 p.m. OK GNU C++17 (64) TESTS 40 93 28262400 1700
199404628 kk_d C March 27, 2023, 12:16 p.m. OK GNU C++17 (64) TESTS 40 108 0 1700
199629450 WYJ_zzzzzzZ C March 29, 2023, 7:15 a.m. OK GNU C++17 (64) TESTS 40 108 7987200 1700
199437534 michao C March 27, 2023, 4:32 p.m. OK GNU C++17 (64) TESTS 40 109 3174400 1700
199557245 ahey C March 28, 2023, 3:27 p.m. OK GNU C++17 (64) TESTS 40 109 3174400 1700
199443679 codemastercpp C March 27, 2023, 5:25 p.m. OK GNU C++17 (64) TESTS 40 109 3174400 1700
199513997 Feintl C March 28, 2023, 9:37 a.m. OK GNU C++17 (64) TESTS 40 140 0 1700
199795623 qingmuhe C March 30, 2023, 8 a.m. OK GNU C++17 (64) TESTS 40 140 0 1700
199538169 AnriEsoev C March 28, 2023, 1:08 p.m. OK GNU C++17 (64) TESTS 40 140 0 1700
199915992 wygzgyw C March 31, 2023, 7:12 a.m. OK GNU C++17 (64) TESTS 40 140 3174400 1700
199822825 neonmoon C March 30, 2023, 12:35 p.m. OK GNU C++20 (64) TESTS 40 31 3481600 1700
199427378 eternal_happiness C March 27, 2023, 3:09 p.m. OK GNU C++20 (64) TESTS 40 78 1638400 1700
199609440 hanifchdn C March 29, 2023, 2:14 a.m. OK GNU C++20 (64) TESTS 40 78 1638400 1700
199608810 Netr C March 29, 2023, 1:59 a.m. OK GNU C++20 (64) TESTS 40 78 3174400 1700
199500990 Nxxlt C March 28, 2023, 7:16 a.m. OK GNU C++20 (64) TESTS 40 78 3481600 1700
199407654 -Victory C March 27, 2023, 12:41 p.m. OK GNU C++20 (64) TESTS 40 78 6451200 1700
199407851 -Victory C March 27, 2023, 12:43 p.m. OK GNU C++20 (64) TESTS 40 78 6451200 1700
200012455 pssxx C March 31, 2023, 4:19 p.m. OK GNU C++20 (64) TESTS 40 93 0 1700
199614012 XHYMathematics C March 29, 2023, 3:38 a.m. OK GNU C++20 (64) TESTS 40 93 0 1700
199535487 motong3188 C March 28, 2023, 12:48 p.m. OK GNU C++20 (64) TESTS 40 93 0 1700
199479478 harsh.awasthi C March 28, 2023, 1:41 a.m. OK Go TESTS 40 280 8192000 1700
199543516 amon_get C March 28, 2023, 1:46 p.m. OK Go TESTS 40 530 4403200 1700
199426123 bleach__ C March 27, 2023, 2:59 p.m. OK Java 11 TESTS 40 374 0 1700
199451899 amanpatel23 C March 27, 2023, 6:43 p.m. OK Java 11 TESTS 40 389 0 1700
199428332 Panther369 C March 27, 2023, 3:17 p.m. OK Java 11 TESTS 40 389 0 1700
199399648 ETHANHUNTMI5 C March 27, 2023, 11:32 a.m. OK Java 11 TESTS 40 420 5427200 1700
199489664 Yash9890 C March 28, 2023, 4:51 a.m. OK Java 11 TESTS 40 560 0 1700
199588782 the_half_blood_prince C March 28, 2023, 8:18 p.m. OK Java 11 TESTS 40 873 0 1700
199588943 the_half_blood_prince C March 28, 2023, 8:20 p.m. OK Java 11 TESTS 40 889 0 1700
199404273 abhayrajnegi0416 C March 27, 2023, 12:13 p.m. OK Java 11 TESTS 40 966 1843200 1700
199491925 bitup62 C March 28, 2023, 5:24 a.m. OK Java 11 TESTS 40 967 0 1700
199742772 NavneetKumar99 C March 29, 2023, 6:19 p.m. OK Java 11 TESTS 40 1388 0 1700
199742196 mlangc C March 29, 2023, 6:13 p.m. OK Java 17 TESTS 40 327 409600 1700
199589358 mlangc C March 28, 2023, 8:25 p.m. OK Java 17 TESTS 40 389 716800 1700
199399214 frey4 C March 27, 2023, 11:28 a.m. OK Java 17 TESTS 40 390 819200 1700
199581048 Doni04 C March 28, 2023, 6:46 p.m. OK Java 17 TESTS 40 405 819200 1700
199889240 xyz_000 C March 30, 2023, 10:24 p.m. OK Java 17 TESTS 40 436 8499200 1700
199629978 PizzaLovers007 C March 29, 2023, 7:22 a.m. OK Java 17 TESTS 40 451 5632000 1700
199889294 xyz_000 C March 30, 2023, 10:25 p.m. OK Java 17 TESTS 40 452 8908800 1700
199563523 nigamabhai03 C March 28, 2023, 4:17 p.m. OK Java 17 TESTS 40 670 819200 1700
199839774 vankamamidi_dheeraj C March 30, 2023, 2:35 p.m. OK Java 17 TESTS 40 685 819200 1700
199449628 not_just_rr C March 27, 2023, 6:21 p.m. OK Java 17 TESTS 40 686 1126400 1700
199909562 yvbf C March 31, 2023, 5:50 a.m. OK Java 8 TESTS 40 171 0 1700
199442138 rahulkhairwar C March 27, 2023, 5:13 p.m. OK Java 8 TESTS 40 249 0 1700
200067586 KKKZOZ C April 1, 2023, 3:22 a.m. OK Java 8 TESTS 40 296 0 1700
199662200 oneafter C March 29, 2023, 9:55 a.m. OK Java 8 TESTS 40 311 0 1700
199440016 priyaroy3370 C March 27, 2023, 4:55 p.m. OK Java 8 TESTS 40 311 0 1700
199399346 tiwariabhishek C March 27, 2023, 11:30 a.m. OK Java 8 TESTS 40 311 0 1700
199754817 __SSB__ C March 29, 2023, 8:38 p.m. OK Java 8 TESTS 40 311 4403200 1700
199523596 1091857051 C March 28, 2023, 11:13 a.m. OK Java 8 TESTS 40 327 0 1700
199429786 amit_roy C March 27, 2023, 3:29 p.m. OK Java 8 TESTS 40 327 0 1700
199806483 UniversalAdmin C March 30, 2023, 10:03 a.m. OK Java 8 TESTS 40 327 3584000 1700
199403305 aadrito C March 27, 2023, 12:05 p.m. OK MS C++ 2017 TESTS 40 483 3174400 1700
199427006 ishybee C March 27, 2023, 3:06 p.m. OK MS C++ 2017 TESTS 40 764 0 1700
199428265 adesh123 C March 27, 2023, 3:17 p.m. OK MS C++ 2017 TESTS 40 826 5529600 1700
199399606 1434314294 C March 27, 2023, 11:32 a.m. OK MS C++ 2017 TESTS 40 826 10035200 1700
199691418 Marcus_Rashford C March 29, 2023, 11:32 a.m. OK MS C++ 2017 TESTS 40 842 2457600 1700
199484815 chinesedfan C March 28, 2023, 3:33 a.m. OK Node.js TESTS 40 467 34918400 1700
199585441 kuzAnatoliy C March 28, 2023, 7:37 p.m. OK Node.js TESTS 40 967 42086400 1700
199469292 jinzew C March 27, 2023, 10:01 p.m. OK PyPy 3 TESTS 40 389 16588800 1700
199441248 KeiTsukishima C March 27, 2023, 5:05 p.m. OK PyPy 3 TESTS 40 576 20582400 1700
199468367 jinzew C March 27, 2023, 9:47 p.m. OK PyPy 3 TESTS 40 2823 13004800 1700
199402536 5af C March 27, 2023, 11:58 a.m. OK PyPy 3 TESTS 40 2885 13619200 1700
199553797 akshaywairagade2 C March 28, 2023, 3:01 p.m. OK PyPy 3 TESTS 40 2886 13619200 1700
199539276 unfettered_one C March 28, 2023, 1:16 p.m. OK PyPy 3 TESTS 40 2916 13721600 1700
199563657 ipip C March 28, 2023, 4:18 p.m. OK PyPy 3 TESTS 40 2932 13516800 1700
199501476 vedantmishra69 C March 28, 2023, 7:22 a.m. OK PyPy 3-64 TESTS 40 218 13721600 1700
199461866 star_leinad C March 27, 2023, 8:36 p.m. OK PyPy 3-64 TESTS 40 233 10956800 1700
199441232 KA_Rma C March 27, 2023, 5:05 p.m. OK PyPy 3-64 TESTS 40 233 18022400 1700
199429741 ossau_guildo C March 27, 2023, 3:29 p.m. OK PyPy 3-64 TESTS 40 233 30617600 1700
199461741 samchen123 C March 27, 2023, 8:34 p.m. OK PyPy 3-64 TESTS 40 249 9216000 1700
199432688 Yuvraj_Patel_30903 C March 27, 2023, 3:52 p.m. OK PyPy 3-64 TESTS 40 249 10649600 1700
199638023 Mayank_Bad C March 29, 2023, 8:56 a.m. OK PyPy 3-64 TESTS 40 264 10240000 1700
199829394 meat124 C March 30, 2023, 1:29 p.m. OK PyPy 3-64 TESTS 40 265 11264000 1700
199483598 Youarenotgood C March 28, 2023, 3:12 a.m. OK PyPy 3-64 TESTS 40 265 11776000 1700
199629079 iN_siDious C March 29, 2023, 7:10 a.m. OK PyPy 3-64 TESTS 40 265 14233600 1700
199589792 Parag_AP C March 28, 2023, 8:30 p.m. OK Python 3 TESTS 40 623 4096000 1700
199450201 saini.laxman2002 C March 27, 2023, 6:26 p.m. OK Python 3 TESTS 40 951 19763200 1700
199422783 wojciech_domin C March 27, 2023, 2:33 p.m. OK Python 3 TESTS 40 1434 7782400 1700
199498668 CHARMIPADMAJA C March 28, 2023, 6:51 a.m. OK Python 3 TESTS 40 1435 0 1700
199942163 NS3081992 C March 31, 2023, 12:06 p.m. OK Python 3 TESTS 40 1450 4096000 1700
199611897 krishna_sai_03 C March 29, 2023, 3:03 a.m. OK Python 3 TESTS 40 1481 7782400 1700
199597652 kirill.shirokov C March 28, 2023, 10:03 p.m. OK Python 3 TESTS 40 1512 9011200 1700
199565032 theOptimizer C March 28, 2023, 4:29 p.m. OK Python 3 TESTS 40 1528 15462400 1700
199433743 pooja_siri C March 27, 2023, 4:01 p.m. OK Python 3 TESTS 40 1544 8294400 1700
199444697 snehasish01 C March 27, 2023, 5:34 p.m. OK Python 3 TESTS 40 1559 9625600 1700
199405894 robostac C March 27, 2023, 12:27 p.m. OK Rust 2021 TESTS 40 61 6348800 1700

remove filters

Back to search problems