Codeforces Round 859 (Div. 4)

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
1807 Codeforces Round 859 (Div. 4) FINISHED False 8100 52585499 March 19, 2023, 2:55 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 19283 ) G1 Subsequence Addition (Easy Version) PROGRAMMING brute force dp greedy implementation sortings

B'The only difference between the two versions is that in this version, the constraints are lower. Initially, array a contains just the number 1 . You can perform several operations in order to change the array. In an operation, you can select some subsequence ^{ dagger} of a and add into a an element equal to the sum of all elements of the subsequence. You are given a final array c . Check if c can be obtained from the initial array a by performing some number (possibly 0) of operations on the initial array. ^{ dagger} A sequence b is a subsequence of a sequence a if b can be obtained from a by the deletion of several (possibly zero, but not all) elements. In other words, select k ( 1 <= q k <= q |a| ) distinct indices i_1, i_2, ... , i_k and insert anywhere into a a new element with the value equal to a_{i_1} + a_{i_2} + ... + a_{i_k} . The first line of the input contains an integer t ( 1 <= q t <= q 1000 ) -- the number of test cases. The description of the test cases follows. The first line of each test case contains a single integer n ( 1 <= q n <= q 5000 ) -- the number of elements the final array c should have. The second line of each test case contains n space-separated integers c_i ( 1 <= q c_i <= q 5000 ) -- the elements of the final array c that should be obtained from the initial array a . It is guaranteed that the sum of n over all test cases does not exceed 5000 . For each test case, output "YES" (without quotes) if such a sequence of operations exists, and "NO" (without quotes) otherwise. You can output the answer in any case (for example, the strings "yEs", "yes", "Yes" and "YES" will be recognized as a positive answer). For the first test case, the initial array a is already equal to [1] , so the answer is "YES". For the second test case, performing any a'...

Tutorials

114143

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
198268572 ruban G1 March 19, 2023, 6:30 p.m. OK FPC TESTS 13 31 155648000
198308103 LinRui G1 March 20, 2023, 4:21 a.m. OK GNU C++14 TESTS 13 0 0
198316016 Ahsan_habib_47 G1 March 20, 2023, 5:56 a.m. OK GNU C++14 TESTS 13 15 0
198314422 richroy07 G1 March 20, 2023, 5:37 a.m. OK GNU C++14 TESTS 13 15 0
198313678 AbrarTo_o G1 March 20, 2023, 5:28 a.m. OK GNU C++14 TESTS 13 15 0
198312665 rutikdeshmukh3 G1 March 20, 2023, 5:15 a.m. OK GNU C++14 TESTS 13 15 0
198312319 st0rm_kr G1 March 20, 2023, 5:11 a.m. OK GNU C++14 TESTS 13 15 0
198304793 student941871365 G1 March 20, 2023, 3:29 a.m. OK GNU C++14 TESTS 13 15 0
198302457 RongDuJiKsp G1 March 20, 2023, 2:47 a.m. OK GNU C++14 TESTS 13 15 0
198301388 c-y-t G1 March 20, 2023, 2:25 a.m. OK GNU C++14 TESTS 13 15 0
198300217 Pankaj777 G1 March 20, 2023, 2 a.m. OK GNU C++14 TESTS 13 15 0
198306264 101degrees G1 March 20, 2023, 3:53 a.m. OK GNU C++17 TESTS 13 0 0
198311553 guesshere G1 March 20, 2023, 5:02 a.m. OK GNU C++17 TESTS 13 0 102400
198307101 nitin17k G1 March 20, 2023, 4:05 a.m. OK GNU C++17 TESTS 13 0 102400
198301448 GPR G1 March 20, 2023, 2:26 a.m. OK GNU C++17 TESTS 13 0 102400
198288993 liuyubobobo G1 March 19, 2023, 10:50 p.m. OK GNU C++17 TESTS 13 0 102400
198278962 Moaaz2065 G1 March 19, 2023, 8:05 p.m. OK GNU C++17 TESTS 13 0 102400
198273443 5-gon G1 March 19, 2023, 7:09 p.m. OK GNU C++17 TESTS 13 0 102400
198312091 TiagoPDS G1 March 20, 2023, 5:08 a.m. OK GNU C++17 TESTS 13 0 819200
198290252 liympanda G1 March 19, 2023, 11:19 p.m. OK GNU C++17 TESTS 13 0 819200
198273032 Rund.Rasheed G1 March 19, 2023, 7:05 p.m. OK GNU C++17 TESTS 13 0 2457600
198313112 dongts G1 March 20, 2023, 5:21 a.m. OK GNU C++17 (64) TESTS 13 0 0
198294124 knucklee_head G1 March 20, 2023, 12:57 a.m. OK GNU C++17 (64) TESTS 13 0 0
198292699 MaGnsi0 G1 March 20, 2023, 12:21 a.m. OK GNU C++17 (64) TESTS 13 0 0
198287979 AGG G1 March 19, 2023, 10:27 p.m. OK GNU C++17 (64) TESTS 13 0 0
198284553 briel_abreu G1 March 19, 2023, 9:20 p.m. OK GNU C++17 (64) TESTS 13 0 0
198272000 khalidlaaroussi20 G1 March 19, 2023, 6:56 p.m. OK GNU C++17 (64) TESTS 13 0 0
198271117 fdvv_i G1 March 19, 2023, 6:49 p.m. OK GNU C++17 (64) TESTS 13 0 0
198265440 FACELESSgod G1 March 19, 2023, 6:09 p.m. OK GNU C++17 (64) TESTS 13 0 0
198313939 alif_cse_ju G1 March 20, 2023, 5:31 a.m. OK GNU C++17 (64) TESTS 13 15 0
198312606 Lose_Face G1 March 20, 2023, 5:15 a.m. OK GNU C++17 (64) TESTS 13 15 0
198315096 shift. G1 March 20, 2023, 5:46 a.m. OK GNU C++20 (64) TESTS 13 0 0
198314708 tandingfu G1 March 20, 2023, 5:40 a.m. OK GNU C++20 (64) TESTS 13 0 0
198314485 New_beginner G1 March 20, 2023, 5:38 a.m. OK GNU C++20 (64) TESTS 13 0 0
198310255 minhnguyenxuan60 G1 March 20, 2023, 4:48 a.m. OK GNU C++20 (64) TESTS 13 0 0
198309501 akash__goyal_ G1 March 20, 2023, 4:39 a.m. OK GNU C++20 (64) TESTS 13 0 0
198307361 nhantoX G1 March 20, 2023, 4:09 a.m. OK GNU C++20 (64) TESTS 13 0 0
198305001 Ycy0fmine G1 March 20, 2023, 3:33 a.m. OK GNU C++20 (64) TESTS 13 0 0
198302998 wangcz G1 March 20, 2023, 2:57 a.m. OK GNU C++20 (64) TESTS 13 0 0
198302908 lololu G1 March 20, 2023, 2:55 a.m. OK GNU C++20 (64) TESTS 13 0 0
198301555 TASHFIQ_TAIF G1 March 20, 2023, 2:28 a.m. OK GNU C++20 (64) TESTS 13 0 0
198300666 Ankita1129 G1 March 20, 2023, 2:11 a.m. OK Java 11 TESTS 13 186 0
198275611 Zoatel G1 March 19, 2023, 7:29 p.m. OK Java 11 TESTS 13 186 0
198291903 etian6795 G1 March 20, 2023, 12:01 a.m. OK Java 11 TESTS 13 187 0
198286171 ETHANHUNTMI5 G1 March 19, 2023, 9:48 p.m. OK Java 11 TESTS 13 187 0
198285239 coffeeCoder69 G1 March 19, 2023, 9:31 p.m. OK Java 11 TESTS 13 187 0
198263545 ash_79 G1 March 19, 2023, 5:58 p.m. OK Java 11 TESTS 13 187 0
198268021 the_half_blood_prince G1 March 19, 2023, 6:26 p.m. OK Java 11 TESTS 13 202 0
198262956 ash_79 G1 March 19, 2023, 5:55 p.m. OK Java 11 TESTS 13 202 0
198267902 MaSaRwI_19 G1 March 19, 2023, 6:25 p.m. OK Java 11 TESTS 13 233 0
198262357 Un_sung G1 March 19, 2023, 5:51 p.m. OK Java 11 TESTS 13 249 0
198313447 bleach__ G1 March 20, 2023, 5:25 a.m. OK Java 17 TESTS 13 186 614400
198267391 blademo G1 March 19, 2023, 6:21 p.m. OK Java 17 TESTS 13 187 204800
198290384 ansuman_83 G1 March 19, 2023, 11:22 p.m. OK Java 17 TESTS 13 202 409600
198272443 Extradict G1 March 19, 2023, 7 p.m. OK Java 17 TESTS 13 202 409600
198304530 Danger_Don G1 March 20, 2023, 3:25 a.m. OK Java 17 TESTS 13 217 409600
198262175 LucunJi G1 March 19, 2023, 5:50 p.m. OK Java 17 TESTS 13 218 307200
198272317 Extradict G1 March 19, 2023, 6:59 p.m. OK Java 17 TESTS 13 233 204800
198304450 piyu_2602 G1 March 20, 2023, 3:24 a.m. OK Java 17 TESTS 13 233 1126400
198273199 andry57 G1 March 19, 2023, 7:06 p.m. OK Java 17 TESTS 13 249 921600
198278440 adarsh8604707199 G1 March 19, 2023, 7:59 p.m. OK Java 17 TESTS 13 264 819200
198294850 Hinnawi24 G1 March 20, 2023, 1:14 a.m. OK Java 8 TESTS 13 93 0
198269286 rish1896 G1 March 19, 2023, 6:35 p.m. OK Java 8 TESTS 13 108 0
198281883 tiwariabhishek G1 March 19, 2023, 8:42 p.m. OK Java 8 TESTS 13 109 0
198279253 arutsudar G1 March 19, 2023, 8:09 p.m. OK Java 8 TESTS 13 109 0
198273513 SuchayK G1 March 19, 2023, 7:09 p.m. OK Java 8 TESTS 13 109 0
198272472 Ziran3234 G1 March 19, 2023, 7 p.m. OK Java 8 TESTS 13 109 0
198263507 __SSB__ G1 March 19, 2023, 5:58 p.m. OK Java 8 TESTS 13 109 0
198263605 mohamedhassan_c G1 March 19, 2023, 5:59 p.m. OK Java 8 TESTS 13 109 6041600
198264449 procoderomk G1 March 19, 2023, 6:03 p.m. OK Java 8 TESTS 13 124 0
198268694 M.Abdelnasser G1 March 19, 2023, 6:31 p.m. OK Java 8 TESTS 13 171 0
198265344 aadrito G1 March 19, 2023, 6:09 p.m. OK MS C++ 2017 TESTS 13 15 0
198270748 ayushgupta2417 G1 March 19, 2023, 6:46 p.m. OK MS C++ 2017 TESTS 13 15 102400
198275811 DatMomoAgain G1 March 19, 2023, 7:31 p.m. OK MS C++ 2017 TESTS 13 15 204800
198263236 whiteReboot G1 March 19, 2023, 5:56 p.m. OK MS C++ 2017 TESTS 13 15 204800
198309686 IITeens G1 March 20, 2023, 4:41 a.m. OK MS C++ 2017 TESTS 13 30 102400
198276648 mukhaledd G1 March 19, 2023, 7:39 p.m. OK MS C++ 2017 TESTS 13 31 0
198269966 KolyanRobocope G1 March 19, 2023, 6:40 p.m. OK MS C++ 2017 TESTS 13 31 102400
198293077 ishybee G1 March 20, 2023, 12:30 a.m. OK MS C++ 2017 TESTS 13 31 3174400
198308126 b-baka G1 March 20, 2023, 4:21 a.m. OK PyPy 3 TESTS 13 77 1740800
198262714 only_oneNinja G1 March 19, 2023, 5:53 p.m. OK PyPy 3 TESTS 13 109 2867200
198263400 flexr G1 March 19, 2023, 5:57 p.m. OK PyPy 3 TESTS 13 124 2560000
198285916 oneku16 G1 March 19, 2023, 9:43 p.m. OK PyPy 3-64 TESTS 13 46 1740800
198285733 oneku16 G1 March 19, 2023, 9:40 p.m. OK PyPy 3-64 TESTS 13 62 1740800
198266636 SoleProprietor G1 March 19, 2023, 6:17 p.m. OK PyPy 3-64 TESTS 13 62 1740800
198302223 toTheBlue G1 March 20, 2023, 2:43 a.m. OK PyPy 3-64 TESTS 13 62 2048000
198262607 OmarMoBadr G1 March 19, 2023, 5:53 p.m. OK PyPy 3-64 TESTS 13 62 2150400
198305800 akash3502 G1 March 20, 2023, 3:46 a.m. OK PyPy 3-64 TESTS 13 77 1945600
198304063 Youarenotgood G1 March 20, 2023, 3:16 a.m. OK PyPy 3-64 TESTS 13 77 3584000
198293595 maxliang G1 March 20, 2023, 12:43 a.m. OK PyPy 3-64 TESTS 13 77 3788800
198313972 ankan2526 G1 March 20, 2023, 5:32 a.m. OK PyPy 3-64 TESTS 13 77 132915200
198299903 harshk_52 G1 March 20, 2023, 1:54 a.m. OK PyPy 3-64 TESTS 13 93 2048000
198315999 sagarhasan273 G1 March 20, 2023, 5:56 a.m. OK Python 3 TESTS 13 46 0
198312636 vjudge1 G1 March 20, 2023, 5:15 a.m. OK Python 3 TESTS 13 46 0
198309580 2100031199cseh G1 March 20, 2023, 4:40 a.m. OK Python 3 TESTS 13 46 0
198309009 fathorse G1 March 20, 2023, 4:33 a.m. OK Python 3 TESTS 13 46 0
198301485 wkk_nv G1 March 20, 2023, 2:27 a.m. OK Python 3 TESTS 13 46 0
198292726 AbdallaE G1 March 20, 2023, 12:22 a.m. OK Python 3 TESTS 13 46 0
198279605 sohamm20 G1 March 19, 2023, 8:13 p.m. OK Python 3 TESTS 13 46 0
198272831 jamerrq G1 March 19, 2023, 7:03 p.m. OK Python 3 TESTS 13 46 0
198271069 GinOwO G1 March 19, 2023, 6:49 p.m. OK Python 3 TESTS 13 46 0
198262190 tristans G1 March 19, 2023, 5:50 p.m. OK Python 3 TESTS 13 46 0
198310055 Tuhil G1 March 20, 2023, 4:46 a.m. OK Rust 2021 TESTS 13 15 102400

remove filters

Back to search problems