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 |
---|---|---|---|---|---|---|
1620 | Educational Codeforces Round 119 (Rated for Div. 2) | FINISHED | False | 7200 | 97424663 | Dec. 18, 2021, 3:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 4292 ) | D | Exact Change | PROGRAMMING | binary search brute force constructive algorithms greedy |
B"One day, early in the morning, you decided to buy yourself a bag of chips in the nearby store. The store has chips of n different flavors. A bag of the i -th flavor costs a_i burles. The store may run out of some flavors, so you'll decide which one to buy after arriving there. But there are two major flaws in this plan: Coins are heavy, so you'd like to take the least possible number of coins in total. That's why you are wondering: what is the minimum total number of coins you should take with you, so you can buy a bag of chips of any flavor in exact change? The first line contains a single integer t ( 1 <= t <= 1000 ) -- the number of test cases. The first line of each test case contains the single integer n ( 1 <= n <= 100 ) -- the number of flavors in the store. The second line of each test case contains n integers a_1, a_2, ... , a_n ( 1 <= a_i <= 10^9 ) -- the cost of one bag of each flavor. For each test case, print one integer -- the minimum number of coins you need to buy one bag of any flavor you'll choose in exact change. In the first test case, you should, for example, take with you 445 coins of value 3 and 1 coin of value 2 . So, 1337 = 445 cdot 3 + 1 cdot 2 . In the second test case, you should, for example, take 2 coins of value 3 and 2 coins of value 2 . So you can pay either exactly 8 = 2 cdot 3 + 1 cdot 2 or 10 = 2 cdot 3 + 2 cdot 2 . In the third test case, it's enough to take 1 coin of value 3 and 2 coins of value 1 . "... |
98061 |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
139854578 | ssvb | D | Dec. 19, 2021, 4:44 a.m. | OK | D | TESTS | 7 | 77 | 1945600 | ||
139829023 | Mrgglock | D | Dec. 18, 2021, 6:30 p.m. | OK | GNU C11 | TESTS | 7 | 31 | 0 | ||
139828964 | Mrgglock | D | Dec. 18, 2021, 6:30 p.m. | OK | GNU C11 | TESTS | 7 | 46 | 0 | ||
139864145 | isaach | D | Dec. 19, 2021, 7:13 a.m. | OK | GNU C++14 | TESTS | 7 | 30 | 0 | ||
139857478 | zyf1002 | D | Dec. 19, 2021, 5:37 a.m. | OK | GNU C++14 | TESTS | 7 | 31 | 0 | ||
139842785 | BillieEilish | D | Dec. 18, 2021, 10:11 p.m. | OK | GNU C++14 | TESTS | 7 | 31 | 0 | ||
139935739 | vjudge2 | D | Dec. 20, 2021, 12:59 a.m. | OK | GNU C++14 | TESTS | 7 | 31 | 0 | ||
139858324 | Yaimsea | D | Dec. 19, 2021, 5:50 a.m. | OK | GNU C++14 | TESTS | 7 | 31 | 0 | ||
139858172 | prakashM27 | D | Dec. 19, 2021, 5:48 a.m. | OK | GNU C++14 | TESTS | 7 | 31 | 0 | ||
139858014 | spongebobsquareroot | D | Dec. 19, 2021, 5:46 a.m. | OK | GNU C++14 | TESTS | 7 | 31 | 0 | ||
139948200 | XZC__Bobby | D | Dec. 20, 2021, 3:13 a.m. | OK | GNU C++14 | TESTS | 7 | 31 | 0 | ||
139948202 | epicAC | D | Dec. 20, 2021, 3:13 a.m. | OK | GNU C++14 | TESTS | 7 | 31 | 102400 | ||
139922259 | jakovcelin2 | D | Dec. 19, 2021, 6:43 p.m. | OK | GNU C++14 | TESTS | 7 | 31 | 102400 | ||
139835425 | fahimcp495 | D | Dec. 18, 2021, 7:45 p.m. | OK | GNU C++17 | TESTS | 7 | 15 | 102400 | ||
139863514 | aditya.verma | D | Dec. 19, 2021, 7:05 a.m. | OK | GNU C++17 | TESTS | 7 | 30 | 102400 | ||
139874435 | peter9503 | D | Dec. 19, 2021, 9:25 a.m. | OK | GNU C++17 | TESTS | 7 | 30 | 102400 | ||
139927762 | Bogdan_feysa | D | Dec. 19, 2021, 8:23 p.m. | OK | GNU C++17 | TESTS | 7 | 30 | 1638400 | ||
139933137 | int_jim | D | Dec. 19, 2021, 10:53 p.m. | OK | GNU C++17 | TESTS | 7 | 31 | 0 | ||
139932858 | keyboard_virtuoso | D | Dec. 19, 2021, 10:42 p.m. | OK | GNU C++17 | TESTS | 7 | 31 | 0 | ||
139890309 | aditya_google | D | Dec. 19, 2021, 12:26 p.m. | OK | GNU C++17 | TESTS | 7 | 31 | 0 | ||
139887229 | XORring-Samurai | D | Dec. 19, 2021, 11:53 a.m. | OK | GNU C++17 | TESTS | 7 | 31 | 0 | ||
139949033 | jkxjkx1031 | D | Dec. 20, 2021, 3:42 a.m. | OK | GNU C++17 | TESTS | 7 | 31 | 0 | ||
139965955 | Kirito | D | Dec. 20, 2021, 5:51 a.m. | OK | GNU C++17 | TESTS | 7 | 31 | 0 | ||
139886292 | NintsiChkhaidze | D | Dec. 19, 2021, 11:44 a.m. | OK | GNU C++17 (64) | TESTS | 7 | 15 | 0 | ||
139867274 | iamnifer | D | Dec. 19, 2021, 7:54 a.m. | OK | GNU C++17 (64) | TESTS | 7 | 15 | 4198400 | ||
139836863 | luniam3195 | D | Dec. 18, 2021, 8:07 p.m. | OK | GNU C++17 (64) | TESTS | 7 | 30 | 0 | ||
139934595 | ArtemL | D | Dec. 20, 2021, midnight | OK | GNU C++17 (64) | TESTS | 7 | 30 | 0 | ||
139921419 | iLLusio | D | Dec. 19, 2021, 6:30 p.m. | OK | GNU C++17 (64) | TESTS | 7 | 30 | 0 | ||
139912134 | hzcool2021 | D | Dec. 19, 2021, 4:24 p.m. | OK | GNU C++17 (64) | TESTS | 7 | 30 | 0 | ||
139908323 | dimss | D | Dec. 19, 2021, 3:32 p.m. | OK | GNU C++17 (64) | TESTS | 7 | 30 | 0 | ||
139860485 | always_rstrive | D | Dec. 19, 2021, 6:23 a.m. | OK | GNU C++17 (64) | TESTS | 7 | 30 | 0 | ||
139835151 | jesse_pinkman_619 | D | Dec. 18, 2021, 7:42 p.m. | OK | GNU C++17 (64) | TESTS | 7 | 30 | 0 | ||
139832456 | wogzenmyxy | D | Dec. 18, 2021, 7:08 p.m. | OK | GNU C++17 (64) | TESTS | 7 | 30 | 0 | ||
139888810 | Deepak_Changoiwala | D | Dec. 19, 2021, 12:10 p.m. | OK | GNU C++20 (64) | TESTS | 7 | 15 | 0 | ||
139877021 | callmepandey | D | Dec. 19, 2021, 9:55 a.m. | OK | GNU C++20 (64) | TESTS | 7 | 15 | 0 | ||
139874631 | palayutm | D | Dec. 19, 2021, 9:27 a.m. | OK | GNU C++20 (64) | TESTS | 7 | 15 | 0 | ||
139862281 | Newtech66 | D | Dec. 19, 2021, 6:48 a.m. | OK | GNU C++20 (64) | TESTS | 7 | 15 | 0 | ||
139860301 | sharmaharisam | D | Dec. 19, 2021, 6:21 a.m. | OK | GNU C++20 (64) | TESTS | 7 | 15 | 0 | ||
139857680 | dayuanx | D | Dec. 19, 2021, 5:40 a.m. | OK | GNU C++20 (64) | TESTS | 7 | 15 | 0 | ||
139854173 | kwm_t | D | Dec. 19, 2021, 4:35 a.m. | OK | GNU C++20 (64) | TESTS | 7 | 15 | 0 | ||
139851265 | Marslai24 | D | Dec. 19, 2021, 3:22 a.m. | OK | GNU C++20 (64) | TESTS | 7 | 15 | 0 | ||
139900507 | Eusebiu_distrugatorul | D | Dec. 19, 2021, 1:57 p.m. | OK | GNU C++20 (64) | TESTS | 7 | 15 | 0 | ||
139936194 | RandomKami | D | Dec. 20, 2021, 1:24 a.m. | OK | GNU C++20 (64) | TESTS | 7 | 15 | 0 | ||
139849005 | Magikarp1 | D | Dec. 19, 2021, 2:09 a.m. | OK | Java 11 | TESTS | 7 | 171 | 0 | ||
139847436 | Ste | D | Dec. 19, 2021, 1:14 a.m. | OK | Java 11 | TESTS | 7 | 187 | 0 | ||
139842072 | LucunJi | D | Dec. 18, 2021, 9:53 p.m. | OK | Java 11 | TESTS | 7 | 187 | 0 | ||
139951186 | sumitchavan | D | Dec. 20, 2021, 4:43 a.m. | OK | Java 11 | TESTS | 7 | 202 | 0 | ||
139923402 | Smorgon | D | Dec. 19, 2021, 7:02 p.m. | OK | Java 11 | TESTS | 7 | 202 | 0 | ||
139838707 | RoadToGlory | D | Dec. 18, 2021, 8:39 p.m. | OK | Java 11 | TESTS | 7 | 233 | 4403200 | ||
139890754 | ddwuya | D | Dec. 19, 2021, 12:32 p.m. | OK | Java 11 | TESTS | 7 | 234 | 0 | ||
139832038 | naman5811 | D | Dec. 18, 2021, 7:03 p.m. | OK | Java 11 | TESTS | 7 | 249 | 0 | ||
139842833 | fareedahmaheeb | D | Dec. 18, 2021, 10:12 p.m. | OK | Java 11 | TESTS | 7 | 264 | 0 | ||
139839055 | PetrNguyen | D | Dec. 18, 2021, 8:44 p.m. | OK | Java 11 | TESTS | 7 | 343 | 0 | ||
139855993 | SecondThread | D | Dec. 19, 2021, 5:12 a.m. | OK | Java 8 | TESTS | 7 | 139 | 0 | ||
139833778 | nitinrishab2000 | D | Dec. 18, 2021, 7:24 p.m. | OK | Java 8 | TESTS | 7 | 155 | 0 | ||
139834666 | koper | D | Dec. 18, 2021, 7:36 p.m. | OK | Kotlin 1.4 | TESTS | 7 | 389 | 1945600 | ||
139838440 | mishagam | D | Dec. 18, 2021, 8:34 p.m. | OK | Kotlin 1.5 | TESTS | 7 | 311 | 0 | ||
139841053 | 13coder | D | Dec. 18, 2021, 9:29 p.m. | OK | MS C++ 2017 | TESTS | 7 | 124 | 0 | ||
139917902 | Xeniya | D | Dec. 19, 2021, 5:42 p.m. | OK | MS C++ 2017 | TESTS | 7 | 140 | 0 | ||
139920998 | fatant | D | Dec. 19, 2021, 6:24 p.m. | OK | MS C++ 2017 | TESTS | 7 | 156 | 0 | ||
139851796 | FLself | D | Dec. 19, 2021, 3:36 a.m. | OK | MS C++ 2017 | TESTS | 7 | 795 | 0 | ||
139851746 | FLself | D | Dec. 19, 2021, 3:35 a.m. | OK | MS C++ 2017 | TESTS | 7 | 1263 | 0 | ||
139888017 | iimmortal | D | Dec. 19, 2021, 12:01 p.m. | OK | PyPy 3 | TESTS | 7 | 124 | 4505600 | ||
139846530 | hxu10 | D | Dec. 19, 2021, 12:35 a.m. | OK | PyPy 3 | TESTS | 7 | 124 | 5222400 | ||
139855081 | sakshatmali | D | Dec. 19, 2021, 4:55 a.m. | OK | PyPy 3 | TESTS | 7 | 124 | 5836800 | ||
139893480 | jaglike_makkar | D | Dec. 19, 2021, 1:03 p.m. | OK | PyPy 3 | TESTS | 7 | 140 | 4608000 | ||
139832423 | stunner45 | D | Dec. 18, 2021, 7:08 p.m. | OK | PyPy 3 | TESTS | 7 | 155 | 6144000 | ||
139855808 | charizard07 | D | Dec. 19, 2021, 5:09 a.m. | OK | PyPy 3 | TESTS | 7 | 156 | 4403200 | ||
139829120 | megurine | D | Dec. 18, 2021, 6:31 p.m. | OK | PyPy 3 | TESTS | 7 | 202 | 5222400 | ||
139833152 | Bad_day_toCode | D | Dec. 18, 2021, 7:17 p.m. | OK | PyPy 3 | TESTS | 7 | 202 | 5632000 | ||
139887944 | iimmortal | D | Dec. 19, 2021, noon | OK | PyPy 3 | TESTS | 7 | 202 | 6553600 | ||
139844686 | kArteraa | D | Dec. 18, 2021, 11:13 p.m. | OK | PyPy 3 | TESTS | 7 | 233 | 8704000 | ||
139834515 | you1234 | D | Dec. 18, 2021, 7:34 p.m. | OK | PyPy 3-64 | TESTS | 7 | 171 | 3174400 | ||
139963828 | sanbada79 | D | Dec. 20, 2021, 5:43 a.m. | OK | PyPy 3-64 | TESTS | 7 | 187 | 5222400 | ||
139889382 | uttharapally.chandra | D | Dec. 19, 2021, 12:16 p.m. | OK | PyPy 3-64 | TESTS | 7 | 187 | 7168000 | ||
139852797 | Multibala | D | Dec. 19, 2021, 4:03 a.m. | OK | PyPy 3-64 | TESTS | 7 | 202 | 6041600 | ||
139880410 | lemiao12 | D | Dec. 19, 2021, 10:39 a.m. | OK | PyPy 3-64 | TESTS | 7 | 218 | 8396800 | ||
139836337 | ulyss | D | Dec. 18, 2021, 7:58 p.m. | OK | PyPy 3-64 | TESTS | 7 | 233 | 9420800 | ||
139879045 | mnkp | D | Dec. 19, 2021, 10:23 a.m. | OK | PyPy 3-64 | TESTS | 7 | 249 | 8089600 | ||
139873920 | Aksnov | D | Dec. 19, 2021, 9:18 a.m. | OK | PyPy 3-64 | TESTS | 7 | 249 | 8704000 | ||
139829736 | _icy_ | D | Dec. 18, 2021, 6:38 p.m. | OK | PyPy 3-64 | TESTS | 7 | 311 | 8704000 | ||
139854549 | prd_xxx | D | Dec. 19, 2021, 4:44 a.m. | OK | PyPy 3-64 | TESTS | 7 | 327 | 9420800 | ||
139956529 | jagadish_007 | D | Dec. 20, 2021, 5:24 a.m. | OK | Python 3 | TESTS | 7 | 93 | 512000 | ||
139905903 | danhnganc3 | D | Dec. 19, 2021, 3 p.m. | OK | Python 3 | TESTS | 7 | 93 | 512000 | ||
139871346 | 207R1A6617 | D | Dec. 19, 2021, 8:46 a.m. | OK | Python 3 | TESTS | 7 | 93 | 512000 | ||
139865712 | ashish_chiks_75 | D | Dec. 19, 2021, 7:34 a.m. | OK | Python 3 | TESTS | 7 | 93 | 512000 | ||
139922352 | amarbudhiraja | D | Dec. 19, 2021, 6:45 p.m. | OK | Python 3 | TESTS | 7 | 108 | 512000 | ||
139921630 | xyxoro | D | Dec. 19, 2021, 6:33 p.m. | OK | Python 3 | TESTS | 7 | 109 | 512000 | ||
139922265 | Karelito00 | D | Dec. 19, 2021, 6:43 p.m. | OK | Python 3 | TESTS | 7 | 249 | 512000 | ||
139832766 | shinchankosen | D | Dec. 18, 2021, 7:12 p.m. | OK | Python 3 | TESTS | 7 | 701 | 512000 | ||
139927358 | apilat | D | Dec. 19, 2021, 8:14 p.m. | OK | Rust 2021 | TESTS | 7 | 31 | 0 | ||
139874245 | Smoge | D | Dec. 19, 2021, 9:22 a.m. | OK | Rust 2021 | TESTS | 7 | 124 | 0 |
Back to search problems