Codeforces Round 931 (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
1934 Codeforces Round 931 (Div. 2) FINISHED False 7200 27876263 March 1, 2024, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 19568 ) B Yet Another Coin Problem PROGRAMMING brute force dp greedy math

B'You have 5 different types of coins, each with a value equal to one of the first 5 triangular numbers: 1 , 3 , 6 , 10 , and 15 . These coin types are available in abundance. Your goal is to find the minimum number of these coins required such that their total value sums up to exactly n . We can show that the answer always exists. The first line contains one integer t ( 1 <= t <= 10^4 ) -- the number of test cases. The description of the test cases follows. The first line of each test case contains an integer n ( 1 <= q n <= q 10^9 ) -- the target value. For each test case, output a single number -- the minimum number of coins required. In the first test case, for n = 1 , the answer is 1 since only one 1 value coin is sufficient. 1 = 1 cdot 1 . In the fourth test case, for n = 5 , the answer is 3 , which can be achieved using two 1 value coins and one 3 value coin. 5 = 2 cdot 1 + 1 cdot 3 . In the seventh test case, for n = 12 , the answer is 2 , which can be achieved using two 6 value coins. In the ninth test case, for n = 16 , the answer is 2 , which can be achieved using one 1 value coin and one 15 value coin or using one 10 value coin and one 6 value coin. 16 = 1 cdot 1 + 1 cdot 15 = 1 cdot 6 + 1 cdot 10 . '...

Tutorials

Tutorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
249181201 kokora B March 1, 2024, 5:29 p.m. OK C# 10 TESTS 11 124 614400
249196796 Suman_Mandol B March 1, 2024, 7:01 p.m. OK C# 10 TESTS 11 140 716800
249224454 bluemegane B March 2, 2024, 12:45 a.m. OK C# 8 TESTS 11 217 1024000
249186314 adityaverma685 B March 1, 2024, 5:57 p.m. OK Clang++17 Diagnostics TESTS 11 140 0
249233167 orx0 B March 2, 2024, 3:08 a.m. OK Clang++20 Diagnostics TESTS 12 61 0
249215607 Max_Uchiha B March 1, 2024, 9:52 p.m. OK GNU C11 TESTS 11 46 307200
249171674 Vinuthna.G B March 1, 2024, 4:34 p.m. OK GNU C11 TESTS 10 61 307200
249184091 Calvin65 B March 1, 2024, 5:45 p.m. OK GNU C11 TESTS 11 62 307200
249215357 Max_Uchiha B March 1, 2024, 9:48 p.m. OK GNU C11 TESTS 11 62 307200
249232105 Weatherrepoter B March 2, 2024, 2:57 a.m. OK GNU C11 TESTS 12 62 307200
249178329 MooNaz B March 1, 2024, 5:18 p.m. OK GNU C11 TESTS 11 77 307200
249248160 spacedate_xacs B March 2, 2024, 5:26 a.m. OK GNU C++17 TESTS 12 15 0
249248133 XiangMu B March 2, 2024, 5:26 a.m. OK GNU C++17 TESTS 12 15 0
249247923 Hackintosh_ B March 2, 2024, 5:24 a.m. OK GNU C++17 TESTS 12 15 0
249246712 thunder_fart B March 2, 2024, 5:15 a.m. OK GNU C++17 TESTS 12 15 0
249244885 jatin77 B March 2, 2024, 5:01 a.m. OK GNU C++17 TESTS 12 15 0
249244068 rick09 B March 2, 2024, 4:54 a.m. OK GNU C++17 TESTS 12 15 0
249244050 go_mu B March 2, 2024, 4:54 a.m. OK GNU C++17 TESTS 12 15 0
249243782 Kevin8502 B March 2, 2024, 4:51 a.m. OK GNU C++17 TESTS 12 15 0
249242787 shubhamjha2405 B March 2, 2024, 4:43 a.m. OK GNU C++17 TESTS 12 15 0
249250866 Dloooo B March 2, 2024, 5:46 a.m. OK GNU C++17 TESTS 12 15 0
249187439 helloforces B March 1, 2024, 6:04 p.m. OK GNU C++17 (64) TESTS 11 0 0
249245389 zhuanxihui B March 2, 2024, 5:05 a.m. OK GNU C++17 (64) TESTS 12 15 0
249245027 scotchtape B March 2, 2024, 5:02 a.m. OK GNU C++17 (64) TESTS 12 15 0
249243383 pratham2712 B March 2, 2024, 4:48 a.m. OK GNU C++17 (64) TESTS 12 15 0
249248381 Zzw_gcu B March 2, 2024, 5:28 a.m. OK GNU C++17 (64) TESTS 12 15 0
249250452 New_beginner B March 2, 2024, 5:43 a.m. OK GNU C++17 (64) TESTS 12 15 0
249250790 fzyz2020 B March 2, 2024, 5:46 a.m. OK GNU C++17 (64) TESTS 12 15 0
249251831 MrRobot404NZN B March 2, 2024, 5:53 a.m. OK GNU C++17 (64) TESTS 12 15 0
249246634 pratham2712 B March 2, 2024, 5:15 a.m. OK GNU C++17 (64) TESTS 12 15 0
249247738 None_xh B March 2, 2024, 5:23 a.m. OK GNU C++17 (64) TESTS 12 15 0
249223959 prasoon054 B March 2, 2024, 12:36 a.m. OK GNU C++20 (64) TESTS 11 0 0
249240111 Moonfr4ction B March 2, 2024, 4:17 a.m. OK GNU C++20 (64) TESTS 12 0 0
249232351 JIUJIU9 B March 2, 2024, 2:59 a.m. OK GNU C++20 (64) TESTS 12 0 0
249230727 hackhieu5555 B March 2, 2024, 2:38 a.m. OK GNU C++20 (64) TESTS 11 0 0
249229547 Jalapa B March 2, 2024, 2:19 a.m. OK GNU C++20 (64) TESTS 11 0 0
249228861 mangao B March 2, 2024, 2:07 a.m. OK GNU C++20 (64) TESTS 11 0 0
249228479 keshawrk94 B March 2, 2024, 2 a.m. OK GNU C++20 (64) TESTS 11 0 0
249220099 Snowflame05 B March 1, 2024, 11:09 p.m. OK GNU C++20 (64) TESTS 11 0 0
249218973 PenPineappleApplePen B March 1, 2024, 10:46 p.m. OK GNU C++20 (64) TESTS 11 0 0
249216986 Mikasa0 B March 1, 2024, 10:10 p.m. OK GNU C++20 (64) TESTS 11 0 0
249181894 ajayg3059 B March 1, 2024, 5:33 p.m. OK Go TESTS 11 15 307200
249176575 ajayg3059 B March 1, 2024, 5:11 p.m. OK Go TESTS 11 31 1126400
249215548 mertyilmaz B March 1, 2024, 9:51 p.m. OK Haskell TESTS 11 46 0
249227553 Abood19 B March 2, 2024, 1:45 a.m. OK Java 21 TESTS 11 233 102400
249224515 KYNick B March 2, 2024, 12:46 a.m. OK Java 21 TESTS 11 248 0
249230541 mapleKing B March 2, 2024, 2:35 a.m. OK Java 21 TESTS 11 249 307200
249224451 KYNick B March 2, 2024, 12:45 a.m. OK Java 21 TESTS 11 249 307200
249176530 dan00ile B March 1, 2024, 5:11 p.m. OK Java 21 TESTS 11 264 102400
249181972 crosshunter B March 1, 2024, 5:33 p.m. OK Java 21 TESTS 11 264 204800
249192759 rishit164 B March 1, 2024, 6:35 p.m. OK Java 21 TESTS 11 265 0
249243303 yang_wei B March 2, 2024, 4:47 a.m. OK Java 21 TESTS 12 265 0
249193341 JAY.SHREE.RAM B March 1, 2024, 6:39 p.m. OK Java 21 TESTS 11 265 0
249176923 InfinityX B March 1, 2024, 5:12 p.m. OK Java 21 TESTS 11 265 0
249239872 prakhar_30 B March 2, 2024, 4:15 a.m. OK Java 8 TESTS 12 93 0
249217080 NerfThis B March 1, 2024, 10:12 p.m. OK Java 8 TESTS 11 93 0
249190372 Prankishor B March 1, 2024, 6:21 p.m. OK Java 8 TESTS 11 108 0
249180615 alifahmy1 B March 1, 2024, 5:27 p.m. OK Java 8 TESTS 11 108 0
249180909 alifahmy1 B March 1, 2024, 5:28 p.m. OK Java 8 TESTS 11 109 0
249176622 alifahmy1 B March 1, 2024, 5:11 p.m. OK Java 8 TESTS 11 109 0
249227899 wat2 B March 2, 2024, 1:51 a.m. OK Java 8 TESTS 11 140 0
249183730 Jay08 B March 1, 2024, 5:43 p.m. OK Java 8 TESTS 11 155 38297600
249177302 yash49 B March 1, 2024, 5:14 p.m. OK Java 8 TESTS 11 171 0
249241590 AgniWarrior B March 2, 2024, 4:31 a.m. OK Java 8 TESTS 12 186 0
249181672 ce20026 B March 1, 2024, 5:32 p.m. OK Kotlin 1.9 TESTS 11 187 0
249178212 afanafan B March 1, 2024, 5:17 p.m. OK MS C++ 2017 TESTS 11 15 0
249207519 ayush_123sahu B March 1, 2024, 8:26 p.m. OK MS C++ 2017 TESTS 11 46 0
249230175 FFFBL B March 2, 2024, 2:29 a.m. OK MS C++ 2017 TESTS 11 61 0
249222204 ralphbarton B March 2, 2024, midnight OK Node.js TESTS 11 234 6656000
249202559 maximzasorin B March 1, 2024, 7:43 p.m. OK PHP TESTS 11 139 0
249236255 Asfak_Shahrier B March 2, 2024, 3:38 a.m. OK PyPy 2 TESTS 12 576 8089600
249231120 DrCoder9146 B March 2, 2024, 2:44 a.m. OK PyPy 3 TESTS 11 264 5324800
249176226 _vijay_rubesh213 B March 1, 2024, 5:10 p.m. OK PyPy 3 TESTS 11 280 5836800
249180770 yuktaxxx B March 1, 2024, 5:27 p.m. OK PyPy 3 TESTS 11 295 6656000
249183882 jajabuu B March 1, 2024, 5:44 p.m. OK PyPy 3 TESTS 11 296 5324800
249183362 ajayvarmak5 B March 1, 2024, 5:41 p.m. OK PyPy 3 TESTS 11 389 6246400
249207882 Samyak_15 B March 1, 2024, 8:29 p.m. OK PyPy 3 TESTS 11 904 9625600
249241954 kingutus B March 2, 2024, 4:35 a.m. OK PyPy 3-64 TESTS 12 77 5222400
249197898 nife B March 1, 2024, 7:09 p.m. OK PyPy 3-64 TESTS 11 77 5427200
249184578 el_tunel B March 1, 2024, 5:48 p.m. OK PyPy 3-64 TESTS 11 92 5120000
249241368 kingutus B March 2, 2024, 4:29 a.m. OK PyPy 3-64 TESTS 12 93 5222400
249252211 yuki_keshiki B March 2, 2024, 5:56 a.m. OK PyPy 3-64 TESTS 12 93 5427200
249237315 DarkTemplarDrop B March 2, 2024, 3:49 a.m. OK PyPy 3-64 TESTS 12 93 5939200
249213676 _aadiupadhyay_ B March 1, 2024, 9:28 p.m. OK PyPy 3-64 TESTS 11 93 6144000
249220548 voicon B March 1, 2024, 11:18 p.m. OK PyPy 3-64 TESTS 11 93 6758400
249232187 Drought B March 2, 2024, 2:58 a.m. OK PyPy 3-64 TESTS 12 108 6144000
249252082 yuki_keshiki B March 2, 2024, 5:55 a.m. OK PyPy 3-64 TESTS 12 109 5324800
249186950 OLOGY B March 1, 2024, 6:01 p.m. OK Python 2 TESTS 11 46 512000
249189137 OLOGY B March 1, 2024, 6:14 p.m. OK Python 2 TESTS 11 61 512000
249192688 OLOGY B March 1, 2024, 6:35 p.m. OK Python 2 TESTS 11 77 409600
249191449 OLOGY B March 1, 2024, 6:27 p.m. OK Python 2 TESTS 11 77 512000
249176227 OLOGY B March 1, 2024, 5:10 p.m. OK Python 2 TESTS 11 77 512000
249193004 OLOGY B March 1, 2024, 6:37 p.m. OK Python 2 TESTS 11 498 512000
249234369 dnawaz B March 2, 2024, 3:20 a.m. OK Python 3 TESTS 12 46 204800
249193254 aramadia B March 1, 2024, 6:38 p.m. OK Python 3 TESTS 11 77 204800
249214316 Sibtain_1 B March 1, 2024, 9:36 p.m. OK Python 3 TESTS 11 93 0
249194668 Alan_Amin_futureGeniuses B March 1, 2024, 6:47 p.m. OK Python 3 TESTS 11 93 0
249194494 Volodya_Dudchak B March 1, 2024, 6:46 p.m. OK Python 3 TESTS 11 93 0
249205512 good_angel B March 1, 2024, 8:08 p.m. OK Python 3 TESTS 11 93 102400
249190944 __rose B March 1, 2024, 6:25 p.m. OK Python 3 TESTS 11 93 307200
249217543 ArafHasan B March 1, 2024, 10:19 p.m. OK Python 3 TESTS 11 108 0
249233118 SriVarshiniAkula B March 2, 2024, 3:07 a.m. OK Python 3 TESTS 12 108 102400
249224317 ijweors B March 2, 2024, 12:43 a.m. OK Python 3 TESTS 11 108 102400
249189050 a.dot B March 1, 2024, 6:13 p.m. OK Rust 2021 TESTS 11 31 0
249185892 tamuraup_wa B March 1, 2024, 5:55 p.m. OK Rust 2021 TESTS 11 61 0

remove filters

Back to search problems