Codeforces Round 678 (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
1436 Codeforces Round 678 (Div. 2) FINISHED False 7800 133804511 Oct. 24, 2020, 2:05 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 22848 ) A Reorder PROGRAMMING math

B'For a given array a consisting of n integers and a given integer m find if it is possible to reorder elements of the array a in such a way that sum_{i=1}^{n}{ sum_{j=i}^{n}{ frac{a_j}{j}}} equals m ? It is forbidden to delete elements as well as insert new elements. Please note that no rounding occurs during division, for example, frac{5}{2}=2.5 . The first line contains a single integer t -- the number of test cases ( 1 <= t <= 100 ). The test cases follow, each in two lines. The first line of a test case contains two integers n and m ( 1 <= n <= 100 , 0 <= m <= 10^6 ). The second line contains integers a_1, a_2, ldots, a_n ( 0 <= a_i <= 10^6 ) -- the elements of the array. For each test case print "YES", if it is possible to reorder the elements of the array in such a way that the given formula gives the given value, and "NO" otherwise. In the first test case one of the reorders could be [1, 2, 5] . The sum is equal to ( frac{1}{1} + frac{2}{2} + frac{5}{3}) + ( frac{2}{2} + frac{5}{3}) + ( frac{5}{3}) = 8 . The brackets denote the inner sum sum_{j=i}^{n}{ frac{a_j}{j}} , while the summation of brackets corresponds to the sum over i . '...

Tutorials

Codeforces Round #678 (Div. 2). Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
96635488 angsir_chen A Oct. 25, 2020, 8:03 a.m. OK GNU C11 TESTS 68 31 0
96625748 ja1467 A Oct. 25, 2020, 4:55 a.m. OK GNU C11 TESTS 68 31 0
96624197 nitinkumar1729 A Oct. 25, 2020, 3:45 a.m. OK GNU C11 TESTS 68 31 0
96635837 Md.Ripon A Oct. 25, 2020, 8:10 a.m. OK GNU C11 TESTS 68 31 0
96644362 roopashree123 A Oct. 25, 2020, 10:07 a.m. OK GNU C11 TESTS 68 31 0
96698227 BugLeave A Oct. 25, 2020, 1:02 p.m. OK GNU C11 TESTS 68 31 0
96714726 Ekta04 A Oct. 25, 2020, 4:08 p.m. OK GNU C11 TESTS 68 31 0
96736954 cmt_23941 A Oct. 26, 2020, 12:20 a.m. OK GNU C11 TESTS 68 31 0
96737099 ONCEACCEPT A Oct. 26, 2020, 12:26 a.m. OK GNU C11 TESTS 68 31 0
96635401 angsir_chen A Oct. 25, 2020, 8:02 a.m. OK GNU C11 TESTS 68 31 0
96624939 luogu_bot1 A Oct. 25, 2020, 4:19 a.m. OK GNU C++11 TESTS 68 30 0
96596842 _costheta_ A Oct. 24, 2020, 5:44 p.m. OK GNU C++11 TESTS 68 30 0
96639094 luogu_bot4 A Oct. 25, 2020, 8:53 a.m. OK GNU C++11 TESTS 68 30 0
96634416 luogu_bot3 A Oct. 25, 2020, 7:47 a.m. OK GNU C++11 TESTS 68 30 0
96624816 theHermit A Oct. 25, 2020, 4:14 a.m. OK GNU C++11 TESTS 68 30 0
96632071 luogu_bot4 A Oct. 25, 2020, 7:09 a.m. OK GNU C++11 TESTS 68 30 0
96618899 chengni A Oct. 24, 2020, 11:54 p.m. OK GNU C++11 TESTS 68 30 8089600
96749201 kcn999 A Oct. 26, 2020, 5:59 a.m. OK GNU C++11 TESTS 68 31 0
96746997 Uchiha_Dystractor A Oct. 26, 2020, 5:17 a.m. OK GNU C++11 TESTS 68 31 0
96744308 beyond_compare A Oct. 26, 2020, 4:12 a.m. OK GNU C++11 TESTS 68 31 0
96728480 qxforever A Oct. 25, 2020, 7:59 p.m. OK GNU C++14 TESTS 68 30 3993600
96748700 Varun12 A Oct. 26, 2020, 5:49 a.m. OK GNU C++14 TESTS 68 31 0
96749113 hyperion_1724 A Oct. 26, 2020, 5:57 a.m. OK GNU C++14 TESTS 68 31 0
96748754 preetham A Oct. 26, 2020, 5:50 a.m. OK GNU C++14 TESTS 68 31 0
96747977 ehasan302 A Oct. 26, 2020, 5:35 a.m. OK GNU C++14 TESTS 68 31 0
96747361 aaditherise A Oct. 26, 2020, 5:23 a.m. OK GNU C++14 TESTS 68 31 0
96746769 Robin008 A Oct. 26, 2020, 5:12 a.m. OK GNU C++14 TESTS 68 31 0
96746350 aabbccddeeff A Oct. 26, 2020, 5:03 a.m. OK GNU C++14 TESTS 68 31 0
96745654 taparia17rashmi A Oct. 26, 2020, 4:48 a.m. OK GNU C++14 TESTS 68 31 0
96745028 vikasydv_19 A Oct. 26, 2020, 4:32 a.m. OK GNU C++14 TESTS 68 31 0
96747998 paradox64ce A Oct. 26, 2020, 5:36 a.m. OK GNU C++17 TESTS 68 31 0
96748249 siddharth963 A Oct. 26, 2020, 5:41 a.m. OK GNU C++17 TESTS 68 31 0
96748423 kaa200102 A Oct. 26, 2020, 5:44 a.m. OK GNU C++17 TESTS 68 31 0
96748486 codeAJ A Oct. 26, 2020, 5:45 a.m. OK GNU C++17 TESTS 68 31 0
96748489 chauhan14 A Oct. 26, 2020, 5:45 a.m. OK GNU C++17 TESTS 68 31 0
96748669 ahujaanmol1289 A Oct. 26, 2020, 5:49 a.m. OK GNU C++17 TESTS 68 31 0
96748845 nerdycode.101 A Oct. 26, 2020, 5:52 a.m. OK GNU C++17 TESTS 68 31 0
96748951 Paladin. A Oct. 26, 2020, 5:54 a.m. OK GNU C++17 TESTS 68 31 0
96749052 bruteforce_everything A Oct. 26, 2020, 5:56 a.m. OK GNU C++17 TESTS 68 31 0
96749343 324165877 A Oct. 26, 2020, 6:01 a.m. OK GNU C++17 TESTS 68 31 0
96682048 Arif19 A Oct. 25, 2020, 12:18 p.m. OK GNU C++17 (64) TESTS 68 15 0
96716640 nishant_2001 A Oct. 25, 2020, 4:35 p.m. OK GNU C++17 (64) TESTS 68 31 0
96742102 nippletwister A Oct. 26, 2020, 3:09 a.m. OK GNU C++17 (64) TESTS 68 31 0
96724412 j30 A Oct. 25, 2020, 6:43 p.m. OK GNU C++17 (64) TESTS 68 31 0
96722450 REDBLACK01 A Oct. 25, 2020, 6:09 p.m. OK GNU C++17 (64) TESTS 68 31 0
96722361 gamelover A Oct. 25, 2020, 6:08 p.m. OK GNU C++17 (64) TESTS 68 31 0
96721921 constant1923 A Oct. 25, 2020, 6 p.m. OK GNU C++17 (64) TESTS 68 31 0
96714160 deepesharya359 A Oct. 25, 2020, 4 p.m. OK GNU C++17 (64) TESTS 68 31 0
96746049 tannatsri A Oct. 26, 2020, 4:56 a.m. OK GNU C++17 (64) TESTS 68 31 0
96745770 sameer.g2347 A Oct. 26, 2020, 4:51 a.m. OK GNU C++17 (64) TESTS 68 31 0
96729288 ehsandaramir A Oct. 25, 2020, 8:18 p.m. OK Go TESTS 68 155 102400
96631407 gsahil216 A Oct. 25, 2020, 6:51 a.m. OK Java 11 TESTS 68 187 0
96624642 Md_Osama A Oct. 25, 2020, 4:06 a.m. OK Java 11 TESTS 68 187 0
96597357 gssakash A Oct. 24, 2020, 5:47 p.m. OK Java 11 TESTS 68 187 0
96639748 prakash.4 A Oct. 25, 2020, 9:02 a.m. OK Java 11 TESTS 68 187 0
96634803 kunalkatiyar9 A Oct. 25, 2020, 7:52 a.m. OK Java 11 TESTS 68 187 0
96644178 a1000 A Oct. 25, 2020, 10:04 a.m. OK Java 11 TESTS 68 202 0
96645789 gssakash2 A Oct. 25, 2020, 10:28 a.m. OK Java 11 TESTS 68 202 0
96630544 Saichand440 A Oct. 25, 2020, 6:25 a.m. OK Java 11 TESTS 68 202 0
96627239 sanju2504 A Oct. 25, 2020, 5:25 a.m. OK Java 11 TESTS 68 202 0
96599371 Prateek_Jakhar A Oct. 24, 2020, 5:58 p.m. OK Java 11 TESTS 68 202 0
96740044 godxpunk A Oct. 26, 2020, 2:10 a.m. OK Java 8 TESTS 68 109 0
96744498 gagan_6730 A Oct. 26, 2020, 4:18 a.m. OK Java 8 TESTS 68 109 0
96708934 nopre A Oct. 25, 2020, 2:52 p.m. OK Java 8 TESTS 68 124 0
96693447 01naveenv A Oct. 25, 2020, 12:50 p.m. OK Java 8 TESTS 68 124 0
96646003 Slamur A Oct. 25, 2020, 10:31 a.m. OK Java 8 TESTS 68 124 0
96644106 antonskubiiev A Oct. 25, 2020, 10:03 a.m. OK Java 8 TESTS 68 124 0
96642861 kimshy9805 A Oct. 25, 2020, 9:46 a.m. OK Java 8 TESTS 68 124 0
96640267 arpit_c10992 A Oct. 25, 2020, 9:09 a.m. OK Java 8 TESTS 68 124 0
96632452 shekabhi369 A Oct. 25, 2020, 7:17 a.m. OK Java 8 TESTS 68 124 0
96631756 hassanU A Oct. 25, 2020, 7 a.m. OK Java 8 TESTS 68 124 0
96608399 HassanAzzam A Oct. 24, 2020, 7:20 p.m. OK JavaScript TESTS 68 31 102400
96597957 nuralamcse024 A Oct. 24, 2020, 5:48 p.m. OK JavaScript TESTS 68 46 102400
96623895 Spheniscine A Oct. 25, 2020, 3:30 a.m. OK Kotlin TESTS 68 140 1126400
96631546 wbars A Oct. 25, 2020, 6:54 a.m. OK Kotlin TESTS 68 171 0
96597293 overwrite A Oct. 24, 2020, 5:47 p.m. OK Kotlin TESTS 68 187 1843200
96647952 TRR A Oct. 25, 2020, 10:57 a.m. OK Mono C# TESTS 68 62 512000
96614881 vitaliy_dubovyk A Oct. 24, 2020, 9:29 p.m. OK Mono C# TESTS 68 62 614400
96641707 Zorch A Oct. 25, 2020, 9:29 a.m. OK MS C++ TESTS 68 31 0
96612360 ak_0609 A Oct. 24, 2020, 8:29 p.m. OK MS C++ TESTS 68 31 0
96673289 Sebi_Ripa A Oct. 25, 2020, 11:54 a.m. OK MS C++ 2017 TESTS 68 31 0
96741319 Mbox A Oct. 26, 2020, 2:48 a.m. OK MS C++ 2017 TESTS 68 31 0
96737837 GUESSER A Oct. 26, 2020, 12:57 a.m. OK MS C++ 2017 TESTS 68 31 0
96702469 mragab A Oct. 25, 2020, 1:45 p.m. OK MS C++ 2017 TESTS 68 31 0
96668992 akashraj2707 A Oct. 25, 2020, 11:44 a.m. OK MS C++ 2017 TESTS 68 31 0
96619948 yousef_elmahdy A Oct. 25, 2020, 12:50 a.m. OK MS C++ 2017 TESTS 68 31 0
96611928 vladnoov A Oct. 24, 2020, 8:21 p.m. OK MS C++ 2017 TESTS 68 31 0
96737211 Tommy_Fang A Oct. 26, 2020, 12:31 a.m. OK MS C++ 2017 TESTS 68 31 102400
96683740 ThomasCrull A Oct. 25, 2020, 12:22 p.m. OK MS C++ 2017 TESTS 68 46 0
96719001 Thebestofthebest A Oct. 25, 2020, 5:11 p.m. OK MS C++ 2017 TESTS 68 46 0
96719091 asutosh1998 A Oct. 25, 2020, 5:12 p.m. OK .NET Core C# TESTS 68 124 409600
96639420 dipta10 A Oct. 25, 2020, 8:58 a.m. OK Node.js TESTS 68 78 0
96639072 dipta10 A Oct. 25, 2020, 8:53 a.m. OK Node.js TESTS 68 108 0
96625759 bazzyadb A Oct. 25, 2020, 4:55 a.m. OK PyPy 2 TESTS 68 124 307200
96647904 Soumik43 A Oct. 25, 2020, 10:57 a.m. OK PyPy 3 TESTS 68 140 1536000
96736598 vjudge5 A Oct. 26, 2020, 12:06 a.m. OK PyPy 3 TESTS 68 155 1433600
96643914 nitin.tejuja12 A Oct. 25, 2020, 10 a.m. OK PyPy 3 TESTS 68 155 1433600
96643587 amrinderkgglr A Oct. 25, 2020, 9:56 a.m. OK PyPy 3 TESTS 68 155 1433600
96639604 Coding_RDX A Oct. 25, 2020, 9 a.m. OK PyPy 3 TESTS 68 155 1433600
96598369 Coki628 A Oct. 24, 2020, 5:51 p.m. OK PyPy 3 TESTS 68 155 1433600
96647984 aKELA03 A Oct. 25, 2020, 10:58 a.m. OK PyPy 3 TESTS 68 155 1536000
96747936 shivam_hbtu A Oct. 26, 2020, 5:35 a.m. OK PyPy 3 TESTS 68 155 1536000
96746301 rohithvengala2000 A Oct. 26, 2020, 5:02 a.m. OK PyPy 3 TESTS 68 155 1536000
96646675 ondrei A Oct. 25, 2020, 10:41 a.m. OK PyPy 3 TESTS 68 155 1536000
96619106 ComptineDunAutreEte A Oct. 25, 2020, 12:08 a.m. OK Python 2 TESTS 68 171 102400
96608409 Jeyam03 A Oct. 24, 2020, 7:20 p.m. OK Python 3 TESTS 68 108 0
96638078 priyannk_k A Oct. 25, 2020, 8:39 a.m. OK Python 3 TESTS 68 108 0
96631877 shaswat008 A Oct. 25, 2020, 7:04 a.m. OK Python 3 TESTS 68 108 0
96709149 Shivam_singh197 A Oct. 25, 2020, 2:55 p.m. OK Python 3 TESTS 68 109 0
96642633 Suraj_Palod A Oct. 25, 2020, 9:42 a.m. OK Python 3 TESTS 68 109 0
96741998 Vadel A Oct. 26, 2020, 3:06 a.m. OK Python 3 TESTS 68 109 0
96746346 rohithvengala2000 A Oct. 26, 2020, 5:03 a.m. OK Python 3 TESTS 68 109 0
96742213 prayashverma007 A Oct. 26, 2020, 3:11 a.m. OK Python 3 TESTS 68 109 0
96711111 kjat A Oct. 25, 2020, 3:19 p.m. OK Python 3 TESTS 68 109 0
96640705 KLWDSF_mantra A Oct. 25, 2020, 9:15 a.m. OK Python 3 TESTS 68 109 0
96602610 utkarsh2102 A Oct. 24, 2020, 6:14 p.m. OK Ruby TESTS 68 514 921600
96620137 MoSooN A Oct. 25, 2020, 12:58 a.m. OK Rust TESTS 68 46 0

remove filters

Back to search problems