CodeTON Round 4 (Div. 1 + Div. 2, Rated, Prizes!)

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
1810 CodeTON Round 4 (Div. 1 + Div. 2, Rated, Prizes!) FINISHED False 7200 51549899 March 31, 2023, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 17622 ) B Candies PROGRAMMING constructive algorithms math number theory

B"This problem is about candy. Initially, you only have 1 candy, and you want to have exactly n candies. You can use the two following spells in any order at most 40 times in total. Construct a sequence of spells, such that after using them in order, you will have exactly n candies, or determine it's impossible. Each test contains multiple test cases. The first line contains a single integer t ( 1 <= t <= 10^4 ) -- the number of test cases. Their description follows. Each test case contains one line with a single integer n ( 2 <= n <= 10^9 ) -- the required final number of candies. For each test case, output the following. If it's possible to eventually have n candies within 40 spells, in the first line print an integer m ( 1 <= m <= 40 ), representing the total number of spells you use. In the second print m integers a_{1}, a_{2}, ldots, a_{m} ( a_{i} is 1 or 2 ) separated by spaces, where a_{i} = 1 means that you use the first spell in the i -th step, while a_{i} = 2 means that you use the second spell in the i -th step. Note that you do not have to minimize m , and if there are multiple solutions, you may output any one of them. If it's impossible, output -1 in one line. For n=3 , you can just use the second spell once, and then have 2 cdot 1 + 1 = 3 candies. For n=7 , you can use the second spell twice. After the first step, you will have 3 candies. And after the second step, you will have 2 cdot 3 + 1 = 7 candies. "...

Tutorials

Editorial of CodeTON Round 4 (Div. 1 + Div. 2, Rated, Prizes!)

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
200063816 Jaswanth_1999 B April 1, 2023, 2:17 a.m. OK Clang++17 Diagnostics TESTS 9 109 0
200048019 UnorthodoxNiloy B March 31, 2023, 8:59 p.m. OK Clang++17 Diagnostics TESTS 9 124 0
200076364 zhoujk B April 1, 2023, 5:23 a.m. OK Clang++20 Diagnostics TESTS 9 108 0
200074608 zhoujk B April 1, 2023, 5:02 a.m. OK Clang++20 Diagnostics TESTS 9 109 0
200027808 lazy_03 B March 31, 2023, 5:36 p.m. OK Clang++20 Diagnostics TESTS 9 935 0
200031785 attractors B March 31, 2023, 6:10 p.m. OK GNU C11 TESTS 9 46 102400
200055142 amanxjha_ B March 31, 2023, 10:47 p.m. OK GNU C++14 TESTS 9 30 204800
200057525 aajay7546888562 B March 31, 2023, 11:46 p.m. OK GNU C++14 TESTS 9 30 819200
200036301 TST_02_07 B March 31, 2023, 6:53 p.m. OK GNU C++14 TESTS 9 30 3993600
200075639 starrylight B April 1, 2023, 5:14 a.m. OK GNU C++14 TESTS 9 31 0
200071643 zorbin B April 1, 2023, 4:25 a.m. OK GNU C++14 TESTS 9 31 0
200066083 doyo B April 1, 2023, 2:58 a.m. OK GNU C++14 TESTS 9 31 0
200062120 I_AK_CCF B April 1, 2023, 1:44 a.m. OK GNU C++14 TESTS 9 31 0
200060472 huazai676 B April 1, 2023, 1:05 a.m. OK GNU C++14 TESTS 9 31 0
200059792 chinvuho B April 1, 2023, 12:47 a.m. OK GNU C++14 TESTS 9 31 0
200078260 Alaskan B April 1, 2023, 5:44 a.m. OK GNU C++14 TESTS 9 31 0
200064651 in_use2 B April 1, 2023, 2:32 a.m. OK GNU C++17 TESTS 9 15 0
200038727 OmarWae1 B March 31, 2023, 7:21 p.m. OK GNU C++17 TESTS 9 15 204800
200055551 Ahmed.Hassan B March 31, 2023, 10:56 p.m. OK GNU C++17 TESTS 9 15 204800
200035996 Prakash86 B March 31, 2023, 6:50 p.m. OK GNU C++17 TESTS 9 30 0
200034886 Dominater069 B March 31, 2023, 6:39 p.m. OK GNU C++17 TESTS 9 30 0
200061662 z-y-h B April 1, 2023, 1:34 a.m. OK GNU C++17 TESTS 9 30 0
200042274 subhash1e B March 31, 2023, 8 p.m. OK GNU C++17 TESTS 9 30 0
200076940 nikhilgrewal B April 1, 2023, 5:29 a.m. OK GNU C++17 TESTS 9 30 204800
200068470 redblackblue B April 1, 2023, 3:36 a.m. OK GNU C++17 TESTS 9 30 204800
200032134 varahamihira_ B March 31, 2023, 6:14 p.m. OK GNU C++17 TESTS 9 30 204800
200018868 galaniaditya B March 31, 2023, 4:34 p.m. OK GNU C++17 (64) TESTS 9 15 0
200069123 Once_I_Liked_AGirl B April 1, 2023, 3:47 a.m. OK GNU C++17 (64) TESTS 9 15 0
200036069 darishkhan B March 31, 2023, 6:51 p.m. OK GNU C++17 (64) TESTS 9 15 0
200042977 daukah_ B March 31, 2023, 8:08 p.m. OK GNU C++17 (64) TESTS 9 30 0
200049162 HelmOptimum B March 31, 2023, 9:12 p.m. OK GNU C++17 (64) TESTS 9 30 0
200068476 Dread.t B April 1, 2023, 3:36 a.m. OK GNU C++17 (64) TESTS 9 30 0
200023894 amansingh81757 B March 31, 2023, 5:13 p.m. OK GNU C++17 (64) TESTS 9 30 0
200076291 viteli B April 1, 2023, 5:22 a.m. OK GNU C++17 (64) TESTS 9 30 0
200073716 korokseeds B April 1, 2023, 4:51 a.m. OK GNU C++17 (64) TESTS 9 30 307200
200021038 coding_happy B March 31, 2023, 5:01 p.m. OK GNU C++17 (64) TESTS 9 30 1638400
200059767 bigJ B April 1, 2023, 12:46 a.m. OK GNU C++20 (64) TESTS 9 15 0
200058851 Walid238 B April 1, 2023, 12:20 a.m. OK GNU C++20 (64) TESTS 9 15 0
200057376 tesst999 B March 31, 2023, 11:42 p.m. OK GNU C++20 (64) TESTS 9 15 0
200062171 Pan_ma_ru B April 1, 2023, 1:45 a.m. OK GNU C++20 (64) TESTS 9 15 0
200075978 Sankalp-29 B April 1, 2023, 5:18 a.m. OK GNU C++20 (64) TESTS 9 15 0
200074266 LuoLi B April 1, 2023, 4:57 a.m. OK GNU C++20 (64) TESTS 9 15 0
200072440 kayumov_muhammad B April 1, 2023, 4:35 a.m. OK GNU C++20 (64) TESTS 9 15 0
200072195 ppafo B April 1, 2023, 4:32 a.m. OK GNU C++20 (64) TESTS 9 15 0
200068440 qinghuanh B April 1, 2023, 3:36 a.m. OK GNU C++20 (64) TESTS 9 15 0
200062437 manik_2021336 B April 1, 2023, 1:51 a.m. OK GNU C++20 (64) TESTS 9 15 0
200037004 kuan525 B March 31, 2023, 7:01 p.m. OK Go TESTS 9 46 4608000
200068590 longsl B April 1, 2023, 3:38 a.m. OK Go TESTS 9 826 4198400
200062741 optimus1369 B April 1, 2023, 1:57 a.m. OK Java 11 TESTS 9 218 0
200027771 vijender_8601 B March 31, 2023, 5:36 p.m. OK Java 11 TESTS 9 218 0
200068965 Reacher01 B April 1, 2023, 3:45 a.m. OK Java 11 TESTS 9 248 0
200074319 bleach__ B April 1, 2023, 4:58 a.m. OK Java 11 TESTS 9 265 4505600
200037863 ilasiawo B March 31, 2023, 7:11 p.m. OK Java 11 TESTS 9 280 0
200072995 Jackyjuman B April 1, 2023, 4:42 a.m. OK Java 11 TESTS 9 327 0
200026399 kasiru_69 B March 31, 2023, 5:27 p.m. OK Java 11 TESTS 9 343 0
200066955 cpcdevar B April 1, 2023, 3:12 a.m. OK Java 11 TESTS 9 358 0
200043577 PlayDate B March 31, 2023, 8:15 p.m. OK Java 11 TESTS 9 998 0
200064248 iklop B April 1, 2023, 2:25 a.m. OK Java 17 TESTS 9 233 819200
200066294 fightingxjz B April 1, 2023, 3:01 a.m. OK Java 17 TESTS 9 249 512000
200035534 brstplayer B March 31, 2023, 6:45 p.m. OK Java 17 TESTS 9 249 614400
200029371 not_just_rr B March 31, 2023, 5:49 p.m. OK Java 17 TESTS 9 264 204800
200031336 merlin_ B March 31, 2023, 6:06 p.m. OK Java 17 TESTS 9 264 409600
200035910 ayush_tiwari26 B March 31, 2023, 6:49 p.m. OK Java 17 TESTS 9 280 614400
200023211 notreallysure B March 31, 2023, 5:09 p.m. OK Java 17 TESTS 9 327 921600
200063855 goalboy B April 1, 2023, 2:18 a.m. OK Java 17 TESTS 9 405 921600
200079048 saras_11 B April 1, 2023, 5:52 a.m. OK Java 17 TESTS 9 420 921600
200068652 AVone B April 1, 2023, 3:39 a.m. OK Java 17 TESTS 9 420 1126400
200070992 amit_roy B April 1, 2023, 4:15 a.m. OK Java 8 TESTS 9 124 0
200023156 formidablechief_27 B March 31, 2023, 5:09 p.m. OK Java 8 TESTS 9 139 0
200073649 tejasS-27 B April 1, 2023, 4:50 a.m. OK Java 8 TESTS 9 140 0
200027112 -crazy_coder- B March 31, 2023, 5:32 p.m. OK Java 8 TESTS 9 140 0
200021037 rkoo7 B March 31, 2023, 5:01 p.m. OK Java 8 TESTS 9 311 0
200072964 lakshay.sharma.ug21 B April 1, 2023, 4:41 a.m. OK Java 8 TESTS 9 436 0
200027246 Evoltex B March 31, 2023, 5:33 p.m. OK MS C++ 2017 TESTS 9 46 0
200022684 tahmurazzz B March 31, 2023, 5:07 p.m. OK MS C++ 2017 TESTS 9 93 0
200078250 Michelle.X B April 1, 2023, 5:44 a.m. OK MS C++ 2017 TESTS 9 233 0
200067723 cz1137 B April 1, 2023, 3:24 a.m. OK MS C++ 2017 TESTS 9 248 0
200037972 ayushgupta2417 B March 31, 2023, 7:12 p.m. OK MS C++ 2017 TESTS 9 249 0
200037854 ayushgupta2417 B March 31, 2023, 7:11 p.m. OK MS C++ 2017 TESTS 9 249 0
200022561 ratatouille99 B March 31, 2023, 5:07 p.m. OK MS C++ 2017 TESTS 9 264 0
200037760 ayushgupta2417 B March 31, 2023, 7:10 p.m. OK MS C++ 2017 TESTS 9 265 0
200069890 jinzew B April 1, 2023, 3:59 a.m. OK PyPy 3 TESTS 9 155 5836800
200030827 torqueaj B March 31, 2023, 6:01 p.m. OK PyPy 3 TESTS 9 280 10240000
200029507 jvatsal0709 B March 31, 2023, 5:51 p.m. OK PyPy 3 TESTS 9 343 10444800
200018684 dorissssy B March 31, 2023, 4:33 p.m. OK PyPy 3 TESTS 9 358 8089600
200054537 bpdolson B March 31, 2023, 10:35 p.m. OK PyPy 3 TESTS 9 389 9728000
200037413 vishwajitha B March 31, 2023, 7:06 p.m. OK PyPy 3 TESTS 9 404 9625600
200043262 AndreiZherder B March 31, 2023, 8:11 p.m. OK PyPy 3-64 TESTS 9 124 8499200
200033632 rmr B March 31, 2023, 6:27 p.m. OK PyPy 3-64 TESTS 9 139 9932800
200025094 TaeyanG4 B March 31, 2023, 5:19 p.m. OK PyPy 3-64 TESTS 9 139 11878400
200046573 almkdadAli B March 31, 2023, 8:44 p.m. OK PyPy 3-64 TESTS 9 140 9113600
200053486 fmoney B March 31, 2023, 10:13 p.m. OK PyPy 3-64 TESTS 9 140 9216000
200027001 blue_ice_yj B March 31, 2023, 5:31 p.m. OK PyPy 3-64 TESTS 9 155 9830400
200029088 bookofsky B March 31, 2023, 5:47 p.m. OK PyPy 3-64 TESTS 9 155 11059200
200065807 Youarenotgood B April 1, 2023, 2:53 a.m. OK PyPy 3-64 TESTS 9 155 11161600
200039479 isekun B March 31, 2023, 7:29 p.m. OK PyPy 3-64 TESTS 9 155 11161600
200068737 The_MazeRunner B April 1, 2023, 3:41 a.m. OK PyPy 3-64 TESTS 9 170 11468800
200055288 Nanonumpy B March 31, 2023, 10:50 p.m. OK Python 3 TESTS 9 202 102400
200051947 MdNazmulHossain B March 31, 2023, 9:46 p.m. OK Python 3 TESTS 9 249 0
200026672 ResDT B March 31, 2023, 5:29 p.m. OK Python 3 TESTS 9 264 0
200048164 eugalt B March 31, 2023, 9 p.m. OK Python 3 TESTS 9 373 307200
200054517 RachedSouihi B March 31, 2023, 10:34 p.m. OK Python 3 TESTS 9 389 0
200050234 eugalt B March 31, 2023, 9:24 p.m. OK Python 3 TESTS 9 389 307200
200055982 logicalpencils B March 31, 2023, 11:08 p.m. OK Python 3 TESTS 9 452 0
200023083 Block_Cipher B March 31, 2023, 5:09 p.m. OK Python 3 TESTS 9 467 0
200053999 pipoika3 B March 31, 2023, 10:24 p.m. OK Python 3 TESTS 9 483 0
200034535 ScarlettH B March 31, 2023, 6:35 p.m. OK Python 3 TESTS 9 498 0
200062050 novice.li B April 1, 2023, 1:42 a.m. OK Rust 2021 TESTS 9 15 307200
200058838 drdilyor B April 1, 2023, 12:20 a.m. OK Rust 2021 TESTS 9 30 0

remove filters

Back to search problems