Codeforces Round 521 (Div. 3)

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
1077 Codeforces Round 521 (Div. 3) FINISHED False 7200 189444299 Nov. 16, 2018, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 17681 ) C Good Array PROGRAMMING 1400

B"Let's call an array good if there is an element in the array that equals to the sum of all other elements. For example, the array a=[1, 3, 3, 7] is good because there is the element a_4=7 which equals to the sum 1 + 3 + 3 . You are given an array a consisting of n integers. Your task is to print all indices j of this array such that after removing the j -th element from the array it will be good (let's call such indices nice). For example, if a=[8, 3, 5, 2] , the nice indices are 1 and 4 : You have to consider all removals independently, i. xe2 x80 x89e. remove the element, check if the resulting array is good, and return the element into the array. The first line of the input contains one integer n ( 2 <= n <= 2 cdot 10^5 ) -- the number of elements in the array a . The second line of the input contains n integers a_1, a_2, ... , a_n ( 1 <= a_i <= 10^6 ) -- elements of the array a . In the first line print one integer k -- the number of indices j of the array a such that after removing the j -th element from the array it will be good (i.e. print the number of the nice indices). In the second line print k distinct integers j_1, j_2, ... , j_k in any order -- nice indices of the array a . If there are no such indices in the array a , just print 0 in the first line and leave the second line empty or do not print it at all. In the first example you can remove any element with the value 2 so the array will look like [5, 1, 2, 2] . The sum of this array is 10 and there is an element equals to the sum of remaining elements ( 5 = 1 + 2 + 2 ). In the second example you can remove 8 so the array will look like [3, 5, 2] . The sum of this array is 10 and there is an element equals to the sum of remaining elements ( 5 = 3 + 2 ). You can also remove 2 so the array will look lik"...

Tutorials

Codeforces Round #521 (Div. 3) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
47856355 toysmars C Jan. 2, 2019, 10:49 p.m. OK Clang++17 Diagnostics TESTS 101 420 28979200 1400
47856362 vjudge5 C Jan. 2, 2019, 10:50 p.m. OK Clang++17 Diagnostics TESTS 101 421 28979200 1400
46124728 rr_ C Nov. 23, 2018, 6:23 p.m. OK D TESTS 101 93 36147200 1400
54995676 Denor C June 2, 2019, 11:10 p.m. OK Delphi TESTS 101 77 6451200 1400
51476720 chaorenhaha C March 19, 2019, 9:50 a.m. OK FPC TESTS 101 560 7987200 1400
46017576 Craspedacusta C Nov. 21, 2018, 5:23 a.m. OK FPC TESTS 101 577 12083200 1400
64793590 luogu_bot3 C Nov. 13, 2019, 12:05 p.m. OK FPC TESTS 101 608 4812800 1400
51476194 chaorenhaha C March 19, 2019, 9:32 a.m. OK FPC TESTS 101 639 24268800 1400
46448014 AmjadMoqade C Dec. 1, 2018, 2:36 p.m. OK GNU C11 TESTS 101 623 3174400 1400
47368730 vjudge3 C Dec. 22, 2018, 1 p.m. OK GNU C11 TESTS 101 639 1638400 1400
46017310 vjudge2 C Nov. 21, 2018, 5:07 a.m. OK GNU C11 TESTS 101 654 1638400 1400
47606072 jyoung C Dec. 28, 2018, 4:51 a.m. OK GNU C11 TESTS 101 654 2457600 1400
47510868 vjudge4 C Dec. 26, 2018, 6:26 a.m. OK GNU C11 TESTS 101 654 2457600 1400
46060553 egg23333 C Nov. 22, 2018, 1:07 p.m. OK GNU C11 TESTS 101 654 5632000 1400
46094223 Daymaker9000 C Nov. 22, 2018, 9:43 p.m. OK GNU C11 TESTS 101 655 819200 1400
47370579 vjudge2 C Dec. 22, 2018, 2:02 p.m. OK GNU C11 TESTS 101 655 1638400 1400
46850060 indentuum C Dec. 10, 2018, 11:49 a.m. OK GNU C11 TESTS 101 655 1843200 1400
46296839 yoogottamk C Nov. 28, 2018, 3:46 a.m. OK GNU C11 TESTS 101 655 3174400 1400
46850958 _zay C Dec. 10, 2018, 12:15 p.m. OK GNU C++11 TESTS 101 31 6451200 1400
46195599 luogu_bot1 C Nov. 25, 2018, 8:08 a.m. OK GNU C++11 TESTS 101 46 1433600 1400
46096060 ZredXNy C Nov. 23, 2018, 12:19 a.m. OK GNU C++11 TESTS 101 46 1638400 1400
49115080 vjudge5 C Jan. 28, 2019, 4:36 p.m. OK GNU C++11 TESTS 101 46 2252800 1400
57479455 Prof_BL C July 22, 2019, 1:30 a.m. OK GNU C++11 TESTS 101 46 2457600 1400
46653378 qwqshq C Dec. 5, 2018, 3:04 p.m. OK GNU C++11 TESTS 101 46 3174400 1400
53216299 chenke C April 24, 2019, 8:59 a.m. OK GNU C++11 TESTS 101 46 4710400 1400
48657204 ReaLNero1 C Jan. 21, 2019, 3:36 a.m. OK GNU C++11 TESTS 101 46 4710400 1400
46283721 luogu_bot1 C Nov. 27, 2018, 2:47 p.m. OK GNU C++11 TESTS 101 46 4812800 1400
47968792 Karry5307 C Jan. 5, 2019, 1:29 p.m. OK GNU C++11 TESTS 101 46 4812800 1400
47449689 vjudge2 C Dec. 24, 2018, 8:47 a.m. OK GNU C++14 TESTS 101 61 1536000 1400
49092007 vjudge5 C Jan. 28, 2019, 8:51 a.m. OK GNU C++14 TESTS 101 61 1536000 1400
48103922 Justice_Hui C Jan. 9, 2019, 1:45 a.m. OK GNU C++14 TESTS 101 61 1843200 1400
59059327 Gilgamesh_01 C Aug. 18, 2019, 8:32 p.m. OK GNU C++14 TESTS 101 61 2457600 1400
47724211 ru_98 C Dec. 30, 2018, 1:17 p.m. OK GNU C++14 TESTS 101 61 3174400 1400
46539132 vjudge5 C Dec. 3, 2018, 10:58 a.m. OK GNU C++14 TESTS 101 61 3174400 1400
66221758 nihar_99 C Dec. 3, 2019, 11:02 a.m. OK GNU C++14 TESTS 101 61 3993600 1400
60387733 alhiris C Sept. 11, 2019, 12:09 p.m. OK GNU C++14 TESTS 101 61 6860800 1400
48042348 ArshiaDadras C Jan. 6, 2019, 8:48 p.m. OK GNU C++14 TESTS 101 61 9625600 1400
60740280 nader.yehiaa C Sept. 17, 2019, 7:36 p.m. OK GNU C++14 TESTS 101 61 9625600 1400
58250555 Liverbird2002 C Aug. 4, 2019, 7:39 a.m. OK GNU C++17 TESTS 101 61 1638400 1400
49915058 Green_pepper C Feb. 14, 2019, 4:04 p.m. OK GNU C++17 TESTS 101 61 2457600 1400
46027775 vjudge1 C Nov. 21, 2018, 12:12 p.m. OK GNU C++17 TESTS 101 61 4300800 1400
54522455 vjudge1 C May 23, 2019, 12:53 p.m. OK GNU C++17 TESTS 101 61 5632000 1400
46097427 B15DCDT131 C Nov. 23, 2018, 2:04 a.m. OK GNU C++17 TESTS 101 61 6451200 1400
47895227 yuiop8747 C Jan. 4, 2019, 9:52 a.m. OK GNU C++17 TESTS 101 61 6656000 1400
46673787 vjudge2 C Dec. 6, 2018, 8:35 a.m. OK GNU C++17 TESTS 101 61 17612800 1400
64369126 emrey C Nov. 6, 2019, 1:49 p.m. OK GNU C++17 TESTS 101 61 67276800 1400
46537122 vjudge3 C Dec. 3, 2018, 9:40 a.m. OK GNU C++17 TESTS 101 62 819200 1400
57003920 ysq231916 C July 14, 2019, 5:33 a.m. OK GNU C++17 TESTS 101 62 2355200 1400
47243501 ledinhbao C Dec. 19, 2018, 4 a.m. OK Go TESTS 101 748 5222400 1400
46227184 photon1592 C Nov. 25, 2018, 7 p.m. OK Haskell TESTS 101 545 36966400 1400
66623961 akifpathan C Dec. 11, 2019, 8:09 a.m. OK Java 11 TESTS 101 249 40755200 1400
69908008 GiantTornado C Jan. 31, 2020, 2:37 p.m. OK Java 11 TESTS 101 280 1843200 1400
65936952 bleh0.5 C Nov. 29, 2019, 3:01 a.m. OK Java 11 TESTS 101 296 7168000 1400
68643707 cribabby C Jan. 12, 2020, 8:21 a.m. OK Java 11 TESTS 101 904 17203200 1400
46428125 rogernadal C Dec. 1, 2018, 2:55 a.m. OK Java 8 TESTS 101 124 0 1400
57751074 Bashar. C July 25, 2019, 2:48 p.m. OK Java 8 TESTS 101 124 0 1400
46752114 sooraj10 C Dec. 8, 2018, 9:42 a.m. OK Java 8 TESTS 101 124 0 1400
46038559 hitesh.bothra C Nov. 21, 2018, 5:55 p.m. OK Java 8 TESTS 101 124 0 1400
60946276 Hoctopus C Sept. 20, 2019, 7:03 p.m. OK Java 8 TESTS 101 124 2560000 1400
46023988 prathmesh_01 C Nov. 21, 2018, 9:59 a.m. OK Java 8 TESTS 101 124 4505600 1400
46972581 kumarmonu0522 C Dec. 13, 2018, 2:40 p.m. OK Java 8 TESTS 101 139 2662400 1400
46727075 dyhu083 C Dec. 7, 2018, 3:34 p.m. OK Java 8 TESTS 101 140 0 1400
49545023 manuel30 SebasV8 elizarv C Feb. 6, 2019, 9:19 p.m. OK Java 8 TESTS 101 140 2662400 1400
47972513 Maks95Ivanovo C Jan. 5, 2019, 3:42 p.m. OK Java 8 TESTS 101 140 3276800 1400
46057557 alxrm C Nov. 22, 2018, 11:43 a.m. OK Kotlin TESTS 101 436 17100800 1400
61540055 david_varela C Sept. 30, 2019, 8:23 a.m. OK Kotlin TESTS 101 483 17100800 1400
54901517 og.kostya C June 1, 2019, 6:51 a.m. OK Mono C# TESTS 101 62 10240000 1400
46924967 Mem C Dec. 12, 2018, 8 a.m. OK Mono C# TESTS 101 124 25088000 1400
69026355 hibatibati C Jan. 18, 2020, 7:17 a.m. OK Mono C# TESTS 101 186 35123200 1400
49113069 nemars C Jan. 28, 2019, 3:46 p.m. OK Mono C# TESTS 101 202 44236800 1400
47715705 tarptaeya C Dec. 30, 2018, 7:31 a.m. OK Mono C# TESTS 101 686 17612800 1400
46362838 Xtreemist C Nov. 29, 2018, 11:57 a.m. OK Mono C# TESTS 101 717 19251200 1400
60009650 boookva C Sept. 4, 2019, 10:58 a.m. OK Mono C# TESTS 101 717 27648000 1400
46057263 vjudge5 C Nov. 22, 2018, 11:35 a.m. OK MS C++ TESTS 101 46 3993600 1400
47372377 vjudge5 C Dec. 22, 2018, 3:02 p.m. OK MS C++ TESTS 101 61 1740800 1400
47896706 _doreen C Jan. 4, 2019, 11:05 a.m. OK MS C++ TESTS 101 61 2355200 1400
47955007 vjudge5 C Jan. 5, 2019, 5:24 a.m. OK MS C++ TESTS 101 61 2457600 1400
46477799 vjudge4 C Dec. 2, 2018, 8:25 a.m. OK MS C++ TESTS 101 61 2457600 1400
47090085 vjudge4 C Dec. 16, 2018, 5:03 a.m. OK MS C++ TESTS 101 61 3174400 1400
54894539 vjudge3 C June 1, 2019, 12:53 a.m. OK MS C++ TESTS 101 62 819200 1400
46409125 vjudge4 C Nov. 30, 2018, 4:11 p.m. OK MS C++ TESTS 101 62 1638400 1400
50044083 HollowKnight123 C Feb. 17, 2019, 4:38 a.m. OK MS C++ TESTS 101 62 1638400 1400
57004920 vjudge4 C July 14, 2019, 6:12 a.m. OK MS C++ TESTS 101 62 1638400 1400
51943613 NPUlzh C March 28, 2019, 3:39 p.m. OK MS C++ 2017 TESTS 101 93 1638400 1400
57004145 vjudge1 C July 14, 2019, 5:42 a.m. OK MS C++ 2017 TESTS 101 93 2457600 1400
63720867 Ekrte C Oct. 29, 2019, 11:20 a.m. OK MS C++ 2017 TESTS 101 93 2560000 1400
66574747 vjudge4 C Dec. 10, 2019, 6:44 a.m. OK MS C++ 2017 TESTS 101 93 3993600 1400
68032435 AleksanderBalobanov C Jan. 1, 2020, 10:05 a.m. OK MS C++ 2017 TESTS 101 93 5324800 1400
50910859 work_hard. C March 7, 2019, 1:59 a.m. OK MS C++ 2017 TESTS 101 93 5632000 1400
55197481 hwangganzi C June 6, 2019, 9:08 a.m. OK MS C++ 2017 TESTS 101 93 5632000 1400
53108156 risa243 C April 21, 2019, 10:09 p.m. OK MS C++ 2017 TESTS 101 108 8704000 1400
57003247 MiaoMiao_E C July 14, 2019, 5:09 a.m. OK MS C++ 2017 TESTS 101 108 81920000 1400
49755722 sodala C Feb. 11, 2019, 6:14 a.m. OK MS C++ 2017 TESTS 101 218 3686400 1400
49868699 vjudge4 C Feb. 13, 2019, 1:02 p.m. OK Node.js TESTS 101 326 42086400 1400
46368762 Netherfield C Nov. 29, 2018, 2:32 p.m. OK Node.js TESTS 101 404 36761600 1400
51087019 rnd C March 9, 2019, 1:25 p.m. OK Ocaml TESTS 101 342 18329600 1400
46171345 jhilary C Nov. 24, 2018, 1 p.m. OK PyPy 2 TESTS 101 233 34099200 1400
54852488 gatsko C May 30, 2019, 5:19 p.m. OK PyPy 2 TESTS 101 249 16384000 1400
55334912 shafwanur010 C June 9, 2019, 1:11 p.m. OK PyPy 2 TESTS 101 249 27033600 1400
53887342 vjudge4 C May 8, 2019, 7:24 p.m. OK PyPy 3 TESTS 101 280 22425600 1400
51540681 kill-z C March 19, 2019, 6:11 p.m. OK PyPy 3 TESTS 101 295 17612800 1400
55940316 tchr C June 22, 2019, 4:14 p.m. OK PyPy 3 TESTS 101 296 16179200 1400
67651639 ZeroooIQ C Dec. 26, 2019, 12:21 p.m. OK PyPy 3 TESTS 101 311 17510400 1400
50581753 EliasMera C Feb. 27, 2019, 10:08 p.m. OK PyPy 3 TESTS 101 311 17817600 1400
50581755 vjudge3 C Feb. 27, 2019, 10:08 p.m. OK PyPy 3 TESTS 101 311 17817600 1400
60645362 Lanimel C Sept. 15, 2019, 4:55 p.m. OK PyPy 3 TESTS 101 312 16076800 1400
64637511 Natyren C Nov. 10, 2019, 12:02 p.m. OK PyPy 3 TESTS 101 326 16896000 1400
68485881 gaidash C Jan. 10, 2020, 9:42 a.m. OK PyPy 3 TESTS 101 326 24883200 1400
67651712 WA-----Me-----AC C Dec. 26, 2019, 12:22 p.m. OK PyPy 3 TESTS 101 327 17510400 1400
48437922 scambret C Jan. 15, 2019, 10:39 p.m. OK Python 2 TESTS 101 358 12800000 1400
47248899 kaif_7 C Dec. 19, 2018, 7:16 a.m. OK Python 2 TESTS 101 389 11059200 1400
46998728 wateret C Dec. 14, 2018, 10:16 a.m. OK Python 2 TESTS 101 389 14233600 1400
47167668 alessandrosolbiati C Dec. 17, 2018, 1:20 p.m. OK Python 2 TESTS 101 390 11264000 1400
47722547 venomous C Dec. 30, 2018, 12:15 p.m. OK Python 2 TESTS 101 405 11059200 1400
47249773 kaif_7 C Dec. 19, 2018, 7:42 a.m. OK Python 2 TESTS 101 405 11059200 1400
47330407 vjudge2 C Dec. 21, 2018, 12:37 p.m. OK Python 2 TESTS 101 405 14233600 1400
46538553 nihalgeorge01 C Dec. 3, 2018, 10:36 a.m. OK Python 2 TESTS 101 436 11059200 1400
48369917 biltharesatyendra C Jan. 14, 2019, 3:15 a.m. OK Python 2 TESTS 101 452 11059200 1400
54283898 vjudge5 C May 17, 2019, 2:52 p.m. OK Python 2 TESTS 101 467 20275200 1400
47720491 xiejunzhong2000 C Dec. 30, 2018, 10:56 a.m. OK Python 3 TESTS 101 234 17203200 1400
49056353 Shaivite108 C Jan. 27, 2019, 1:28 p.m. OK Python 3 TESTS 101 264 16281600 1400
46045177 cpscanan C Nov. 22, 2018, 12:47 a.m. OK Python 3 TESTS 101 280 15872000 1400
53671682 vjudge1 C May 2, 2019, 1:30 p.m. OK Python 3 TESTS 101 280 16384000 1400
54279547 vjudge5 C May 17, 2019, 12:45 p.m. OK Python 3 TESTS 101 280 17203200 1400
47780413 JoeGun C Dec. 31, 2018, 7:44 a.m. OK Python 3 TESTS 101 295 17203200 1400
46187304 Sharp_Eye C Nov. 25, 2018, 12:01 a.m. OK Python 3 TESTS 101 311 17203200 1400
46885172 Dracoid C Dec. 10, 2018, 10:54 p.m. OK Python 3 TESTS 101 311 19251200 1400
47432864 ProGrammar666 C Dec. 23, 2018, 5:01 p.m. OK Python 3 TESTS 101 327 17305600 1400
46062532 rafi101 C Nov. 22, 2018, 2:06 p.m. OK Python 3 TESTS 101 342 28569600 1400
46580647 janela C Dec. 4, 2018, 11:05 a.m. OK Ruby TESTS 101 280 32563200 1400
66052084 ten- C Nov. 30, 2019, 5:45 p.m. OK Rust TESTS 101 108 6348800 1400
46247330 yakamoto C Nov. 26, 2018, 12:11 p.m. OK Scala TESTS 101 530 12595200 1400
57911775 dcordb C July 28, 2019, 8:46 p.m. OK Scala TESTS 101 561 17203200 1400
57911984 dcordb C July 28, 2019, 8:57 p.m. OK Scala TESTS 101 592 17305600 1400
46831798 hot_yoghurt C Dec. 9, 2018, 10:02 p.m. OK Scala TESTS 101 826 27648000 1400

remove filters

Back to search problems