Codeforces Round 570 (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
1183 Codeforces Round 570 (Div. 3) FINISHED False 8100 175879487 June 26, 2019, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 2063 ) F Topforces Strikes Back PROGRAMMING brute force math sortings 2400

B'One important contest will take place on the most famous programming platform (Topforces) very soon! The authors have a pool of n problems and should choose at most three of them into this contest. The prettiness of the i -th problem is a_i . The authors have to compose the most pretty contest (in other words, the cumulative prettinesses of chosen problems should be maximum possible). But there is one important thing in the contest preparation: because of some superstitions of authors, the prettinesses of problems cannot divide each other. In other words, if the prettinesses of chosen problems are x, y, z , then x should be divisible by neither y , nor z , y should be divisible by neither x , nor z and z should be divisible by neither x , nor y . If the prettinesses of chosen problems are x and y then neither x should be divisible by y nor y should be divisible by x . Any contest composed from one problem is considered good. Your task is to find out the maximum possible total prettiness of the contest composed of at most three problems from the given pool. You have to answer q independent queries. If you are Python programmer, consider using PyPy instead of Python when you submit your code. The first line of the input contains one integer q ( 1 <= q <= 2 cdot 10^5 ) -- the number of queries. The first line of the query contains one integer n ( 1 <= n <= 2 cdot 10^5 ) -- the number of problems. The second line of the query contains n integers a_1, a_2, ... , a_n ( 2 <= a_i <= 2 cdot 10^5 ), where a_i is the prettiness of the i -th problem. It is guaranteed that the sum of n over all queries does not exceed 2 cdot 10^5 . For each query print one integer -- the maximum possible cumulative prettiness of the contest composed of at most three problems from the given pool of problems'...

Tutorials

Tutorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
56298225 holger F June 30, 2019, 7:21 a.m. OK GNU C11 TESTS 32 78 1638400 2400
56159791 BlueSpirit F June 27, 2019, 11:52 a.m. OK GNU C11 TESTS 32 78 1638400 2400
58072537 MRoy F July 31, 2019, 11:13 a.m. OK GNU C11 TESTS 33 1903 1638400 2400
59706226 Peanut.Tang F Aug. 30, 2019, 12:46 p.m. OK GNU C++11 TESTS 33 46 614400 2400
64155242 yalizjc F Nov. 3, 2019, 12:37 p.m. OK GNU C++11 TESTS 33 46 819200 2400
57865438 lopare F July 27, 2019, 8:40 p.m. OK GNU C++11 TESTS 33 46 819200 2400
56158995 cmwqf F June 27, 2019, 11:33 a.m. OK GNU C++11 TESTS 32 46 819200 2400
64155351 yalizjc F Nov. 3, 2019, 12:39 p.m. OK GNU C++11 TESTS 33 46 819200 2400
56711259 vjudge1 F July 8, 2019, 12:49 p.m. OK GNU C++11 TESTS 33 46 1228800 2400
59568043 Xing_Ling F Aug. 27, 2019, 11:30 a.m. OK GNU C++11 TESTS 33 46 1433600 2400
56156928 huhaoo F June 27, 2019, 10:39 a.m. OK GNU C++11 TESTS 32 46 1433600 2400
58387729 ymz F Aug. 6, 2019, 12:35 p.m. OK GNU C++11 TESTS 33 46 1638400 2400
57282769 ningyuheng F July 18, 2019, 1:23 p.m. OK GNU C++11 TESTS 33 46 2457600 2400
56164639 yan-zp F June 27, 2019, 1:47 p.m. OK GNU C++14 TESTS 32 62 819200 2400
56793729 kaffuchino F July 10, 2019, 11:41 a.m. OK GNU C++14 TESTS 33 62 819200 2400
58510680 n_dao107 F Aug. 9, 2019, 6:49 p.m. OK GNU C++14 TESTS 33 62 819200 2400
58997823 kevin66654 F Aug. 18, 2019, 12:15 p.m. OK GNU C++14 TESTS 33 62 819200 2400
56170175 HynDuf F June 27, 2019, 4:08 p.m. OK GNU C++14 TESTS 32 62 1638400 2400
56413738 gerard.onats F July 2, 2019, 2:48 a.m. OK GNU C++14 TESTS 33 77 819200 2400
56731962 vjudge2 F July 9, 2019, 2:08 a.m. OK GNU C++14 TESTS 33 77 819200 2400
56413823 gerard.onats F July 2, 2019, 2:51 a.m. OK GNU C++14 TESTS 33 77 819200 2400
56159057 Origenes F June 27, 2019, 11:34 a.m. OK GNU C++14 TESTS 32 77 1024000 2400
58150252 CJSHP F Aug. 2, 2019, 2:04 a.m. OK GNU C++14 TESTS 33 77 1638400 2400
56730945 vjudge3 F July 9, 2019, 1:16 a.m. OK GNU C++17 TESTS 33 62 819200 2400
56233750 kempusss F June 28, 2019, 3:17 p.m. OK GNU C++17 TESTS 32 62 819200 2400
56174328 VROOM_VARUN F June 27, 2019, 6:16 p.m. OK GNU C++17 TESTS 32 62 819200 2400
57310020 Anachor F July 19, 2019, 6:03 a.m. OK GNU C++17 TESTS 33 62 1638400 2400
68871929 Phortox F Jan. 15, 2020, 3:32 p.m. OK GNU C++17 TESTS 33 62 1638400 2400
56151327 srijon09pal F June 27, 2019, 8:16 a.m. OK GNU C++17 TESTS 32 62 2457600 2400
69285757 SGHD F Jan. 22, 2020, 8:05 a.m. OK GNU C++17 TESTS 33 77 819200 2400
57940814 -Morass- F July 29, 2019, 12:31 p.m. OK GNU C++17 TESTS 33 77 819200 2400
59245006 saketh F Aug. 21, 2019, 10:39 p.m. OK GNU C++17 TESTS 33 77 819200 2400
59244745 saketh F Aug. 21, 2019, 10:23 p.m. OK GNU C++17 TESTS 33 77 819200 2400
66478492 al_Jahy F Dec. 7, 2019, 10:57 p.m. OK Java 11 TESTS 33 327 8396800 2400
57349523 Ahmad F July 20, 2019, 2:31 a.m. OK Java 8 TESTS 33 155 0 2400
56159147 uwi F June 27, 2019, 11:37 a.m. OK Java 8 TESTS 32 156 0 2400
60507561 beginner1010 F Sept. 13, 2019, 11 p.m. OK Java 8 TESTS 33 171 0 2400
66208637 dalt F Dec. 3, 2019, 5:18 a.m. OK Java 8 TESTS 33 171 19558400 2400
58697565 GiantTornado F Aug. 13, 2019, 6:38 a.m. OK Java 8 TESTS 33 202 15667200 2400
56177212 golions F June 27, 2019, 7:55 p.m. OK Java 8 TESTS 32 202 18534400 2400
56176836 prakhar897 F June 27, 2019, 7:41 p.m. OK Java 8 TESTS 32 217 4608000 2400
56426130 Musin F July 2, 2019, 9:43 a.m. OK Java 8 TESTS 33 217 4710400 2400
56837193 mennafadali F July 11, 2019, 9:40 a.m. OK Java 8 TESTS 33 217 6144000 2400
63930931 dyhu083 F Oct. 31, 2019, 2:16 p.m. OK Java 8 TESTS 33 218 5836800 2400
56475671 harryoooooooooo F July 3, 2019, 1:01 p.m. OK Kotlin TESTS 33 467 18636800 2400
65469094 vjudge1 F Nov. 21, 2019, 7:35 a.m. OK MS C++ TESTS 33 61 1024000 2400
65827951 vjudge1 F Nov. 27, 2019, 1:16 p.m. OK MS C++ TESTS 33 62 819200 2400
56182597 vjudge3 F June 28, 2019, 1:37 a.m. OK MS C++ TESTS 32 77 1638400 2400
65421331 vjudge3 F Nov. 20, 2019, 9:02 a.m. OK MS C++ TESTS 33 93 1638400 2400
56704615 vjudge1 F July 8, 2019, 10:36 a.m. OK MS C++ TESTS 33 93 1638400 2400
64151168 vjudge1 F Nov. 3, 2019, 11:27 a.m. OK MS C++ TESTS 33 109 8089600 2400
56263247 S.K F June 29, 2019, 8:55 a.m. OK MS C++ TESTS 32 109 9625600 2400
65749126 vjudge3 F Nov. 26, 2019, 1:22 p.m. OK MS C++ TESTS 33 156 819200 2400
65700594 vjudge4 F Nov. 25, 2019, 10:36 a.m. OK MS C++ TESTS 33 156 819200 2400
56710675 vjudge2 F July 8, 2019, 12:39 p.m. OK MS C++ TESTS 33 156 819200 2400
56240964 CtrlAlt F June 28, 2019, 6:25 p.m. OK MS C++ 2017 TESTS 32 78 3072000 2400
56170380 xsc F June 27, 2019, 4:14 p.m. OK MS C++ 2017 TESTS 32 93 819200 2400
56239244 0-jij-0 F June 28, 2019, 5:39 p.m. OK MS C++ 2017 TESTS 32 171 819200 2400
56239823 0-jij-0 F June 28, 2019, 5:54 p.m. OK MS C++ 2017 TESTS 32 187 819200 2400
57593650 hanna_d F July 23, 2019, 1:08 p.m. OK MS C++ 2017 TESTS 33 187 3174400 2400
59362080 GeKa F Aug. 23, 2019, 3:42 p.m. OK MS C++ 2017 TESTS 33 187 3379200 2400
69811535 yujular F Jan. 30, 2020, 4:34 a.m. OK MS C++ 2017 TESTS 33 218 1024000 2400
56158082 yumtam F June 27, 2019, 11:11 a.m. OK PyPy 2 TESTS 32 233 15667200 2400
56380607 Akash_123 F July 1, 2019, 8:19 a.m. OK PyPy 3 TESTS 33 311 20684800 2400
56152540 koptev F June 27, 2019, 8:44 a.m. OK PyPy 3 TESTS 32 327 15462400 2400
56224982 shyman F June 28, 2019, 11:46 a.m. OK PyPy 3 TESTS 32 327 19763200 2400
56224822 shyman F June 28, 2019, 11:41 a.m. OK PyPy 3 TESTS 32 358 20582400 2400
56179420 Pokeylope F June 27, 2019, 9:40 p.m. OK PyPy 3 TESTS 32 358 21504000 2400
56190955 aberent F June 28, 2019, 7:33 a.m. OK PyPy 3 TESTS 32 405 20582400 2400
56190936 aberent F June 28, 2019, 7:33 a.m. OK PyPy 3 TESTS 32 405 20684800 2400
56486564 Tlatoani F July 3, 2019, 6:41 p.m. OK PyPy 3 TESTS 33 451 15360000 2400
56415170 nguyenminhhieu0709 F July 2, 2019, 3:59 a.m. OK PyPy 3 TESTS 33 498 15769600 2400
56395064 Maria069 F July 1, 2019, 2:13 p.m. OK PyPy 3 TESTS 33 530 15257600 2400
57551581 Helli.code F July 22, 2019, 5:42 p.m. OK Python 2 TESTS 33 405 12185600 2400
56849382 changhc F July 11, 2019, 3 p.m. OK Python 3 TESTS 33 327 19148800 2400
56287362 erickjohnross F June 29, 2019, 8:33 p.m. OK Python 3 TESTS 32 421 19456000 2400
58345574 ScholarlyChives F Aug. 5, 2019, 2:50 p.m. OK Python 3 TESTS 33 436 17408000 2400
56172396 BenL F June 27, 2019, 5:18 p.m. OK Python 3 TESTS 32 748 15974400 2400
56271403 kobae964 F June 29, 2019, 12:15 p.m. OK Rust TESTS 32 109 1536000 2400
56151762 yakamoto F June 27, 2019, 8:26 a.m. OK Scala TESTS 32 592 6041600 2400

remove filters

Back to search problems