Codeforces Round 628 (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
1325 Codeforces Round 628 (Div. 2) FINISHED False 7200 153156311 March 14, 2020, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 2090 ) E Ehab's REAL Number Theory Problem PROGRAMMING brute force dfs and similar graphs number theory shortest paths 2700

B'You are given an array a of length n that has a special condition: every element in this array has at most 7 divisors. Find the length of the shortest non-empty subsequence of this array product of whose elements is a perfect square. A sequence a is a subsequence of an array b if a can be obtained from b by deletion of several (possibly, zero or all) elements. The first line contains an integer n ( 1 <= n <= 10^5 ) -- the length of a . The second line contains n integers a_1 , a_2 , ldots , a_{n} ( 1 <= a_i <= 10^6 ) -- the elements of the array a . Output the length of the shortest non-empty subsequence of a product of whose elements is a perfect square. If there are several shortest subsequences, you can find any of them. If there 's no such subsequence, print "-1". In the first sample, you can choose a subsequence [1] . In the second sample, you can choose a subsequence [6, 6] . In the third sample, you can choose a subsequence [6, 15, 10] . In the fourth sample, there is no such subsequence. '...

Tutorials

74235

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
73277329 nwi E March 14, 2020, 6:14 p.m. OK GNU C++11 TESTS 146 187 11673600 2700
73411112 Neal20060701 E March 16, 2020, 1:27 p.m. OK GNU C++11 TESTS 150 233 24678400 2700
73355769 XLor E March 15, 2020, 5:17 p.m. OK GNU C++11 TESTS 150 280 25497600 2700
73355404 XLor E March 15, 2020, 5:12 p.m. OK GNU C++11 TESTS 150 280 25497600 2700
73404504 qxforever E March 16, 2020, 11:54 a.m. OK GNU C++11 TESTS 150 280 38502400 2700
73276485 XLor E March 14, 2020, 6:08 p.m. OK GNU C++11 TESTS 146 296 25497600 2700
73644602 twobrothers E March 19, 2020, 10:39 a.m. OK GNU C++11 TESTS 151 327 33894400 2700
73390534 George1123 E March 16, 2020, 8:14 a.m. OK GNU C++11 TESTS 150 342 9420800 2700
73374626 TYGZ E March 16, 2020, 12:54 a.m. OK GNU C++11 TESTS 150 358 46080000 2700
73298346 WZYYN E March 15, 2020, 2:51 a.m. OK GNU C++11 TESTS 148 358 56115200 2700
73612648 Danzev E March 18, 2020, 10:52 p.m. OK GNU C++14 TESTS 151 109 36864000 2700
73282963 Malomalomalomalo E March 14, 2020, 7:23 p.m. OK GNU C++14 TESTS 147 124 30720000 2700
73346030 KisekiPurin2019 E March 15, 2020, 3:08 p.m. OK GNU C++14 TESTS 150 124 31129600 2700
73328034 TheAnshul E March 15, 2020, 11:16 a.m. OK GNU C++14 TESTS 150 139 22220800 2700
73377814 Devil E March 16, 2020, 3:18 a.m. OK GNU C++14 TESTS 150 140 14233600 2700
73414991 zucc31801313 E March 16, 2020, 2:19 p.m. OK GNU C++14 TESTS 150 171 11673600 2700
73377886 Devil E March 16, 2020, 3:21 a.m. OK GNU C++14 TESTS 150 171 13721600 2700
73377864 Devil E March 16, 2020, 3:20 a.m. OK GNU C++14 TESTS 150 171 14233600 2700
73380359 Devil E March 16, 2020, 4:45 a.m. OK GNU C++14 TESTS 150 171 14745600 2700
73377793 Devil E March 16, 2020, 3:18 a.m. OK GNU C++14 TESTS 150 186 14233600 2700
73301098 nvmdava E March 15, 2020, 4:15 a.m. OK GNU C++17 TESTS 148 124 36966400 2700
73268254 6720 E March 14, 2020, 4:22 p.m. OK GNU C++17 TESTS 146 124 36966400 2700
73278066 StarCuriosity E March 14, 2020, 6:20 p.m. OK GNU C++17 TESTS 146 187 20377600 2700
73380787 Pi_Yuan_Yuan E March 16, 2020, 4:58 a.m. OK GNU C++17 TESTS 150 187 33894400 2700
73348600 Ruins E March 15, 2020, 3:45 p.m. OK GNU C++17 TESTS 150 218 4608000 2700
73348477 Ruins E March 15, 2020, 3:43 p.m. OK GNU C++17 TESTS 150 218 4812800 2700
73460610 heavyshower E March 17, 2020, 7:07 a.m. OK GNU C++17 TESTS 151 218 16384000 2700
73279058 Vosatorp E March 14, 2020, 6:31 p.m. OK GNU C++17 TESTS 146 234 55296000 2700
73278983 Boterphile E March 14, 2020, 6:30 p.m. OK GNU C++17 TESTS 146 234 55296000 2700
73287000 AlexanderL E March 14, 2020, 8:34 p.m. OK GNU C++17 TESTS 148 249 7680000 2700
73526590 Jughead E March 17, 2020, 9:50 p.m. OK Go TESTS 151 951 22732800 2700
73632078 synapse E March 19, 2020, 7:35 a.m. OK Go TESTS 151 1154 143462400 2700
73485773 synapse E March 17, 2020, 12:46 p.m. OK Go TESTS 151 1185 139673600 2700
73526473 Jughead E March 17, 2020, 9:48 p.m. OK Go TESTS 151 1216 22732800 2700
73450329 synapse E March 17, 2020, 3:03 a.m. OK Go TESTS 151 1434 170291200 2700
73451234 synapse E March 17, 2020, 3:36 a.m. OK Go TESTS 151 1606 148582400 2700
73450168 synapse E March 17, 2020, 2:58 a.m. OK Go TESTS 151 1793 175001600 2700
73354603 Musin E March 15, 2020, 5 p.m. OK Java 11 TESTS 150 982 13004800 2700
73268165 uwi E March 14, 2020, 4:22 p.m. OK Java 11 TESTS 146 1310 46694400 2700
73398038 polyakoff E March 16, 2020, 10:15 a.m. OK Java 11 TESTS 150 1544 48332800 2700
73398372 polyakoff E March 16, 2020, 10:21 a.m. OK Java 11 TESTS 150 1731 43929600 2700
73655933 noahlewis.ca E March 19, 2020, 1:19 p.m. OK Java 11 TESTS 151 1762 25088000 2700
73508130 noahlewis.ca E March 17, 2020, 5:04 p.m. OK Java 11 TESTS 151 1824 24268800 2700
73510078 noahlewis.ca E March 17, 2020, 5:25 p.m. OK Java 11 TESTS 151 1918 28774400 2700
73511863 Whiplash99 E March 17, 2020, 5:46 p.m. OK Java 11 TESTS 151 1981 97792000 2700
73481240 happy15 E March 17, 2020, 12:09 p.m. OK Java 11 TESTS 151 2822 142233600 2700
73351668 YahiaSherif E March 15, 2020, 4:31 p.m. OK Java 8 TESTS 150 1481 65536000 2700
73463095 manu1996 E March 17, 2020, 7:46 a.m. OK Java 8 TESTS 151 1622 43417600 2700
73397962 polyakoff E March 16, 2020, 10:14 a.m. OK Java 8 TESTS 150 1699 53657600 2700
73384918 cwise E March 16, 2020, 6:29 a.m. OK Java 8 TESTS 150 1762 178585600 2700
73511669 Whiplash99 E March 17, 2020, 5:44 p.m. OK Java 8 TESTS 151 1902 93184000 2700
73514686 Whiplash99 E March 17, 2020, 6:18 p.m. OK Java 8 TESTS 151 1918 95641600 2700
73356249 cwise E March 15, 2020, 5:24 p.m. OK Java 8 TESTS 150 1980 178585600 2700
73515598 Whiplash99 E March 17, 2020, 6:29 p.m. OK Java 8 TESTS 151 2136 93184000 2700
73515071 Whiplash99 E March 17, 2020, 6:23 p.m. OK Java 8 TESTS 151 2292 93184000 2700
73286504 martins E March 14, 2020, 8:24 p.m. OK Java 8 TESTS 148 2448 20480000 2700
73449992 Spheniscine E March 17, 2020, 2:50 a.m. OK Kotlin TESTS 151 1154 28467200 2700
73449628 Spheniscine E March 17, 2020, 2:37 a.m. OK Kotlin TESTS 151 1200 28467200 2700
73448478 Spheniscine E March 17, 2020, 1:51 a.m. OK Kotlin TESTS 151 1247 28876800 2700
73400039 Spheniscine E March 16, 2020, 10:48 a.m. OK Kotlin TESTS 150 1294 32768000 2700
73282109 pichulia E March 14, 2020, 7:10 p.m. OK MS C++ 2017 TESTS 147 312 19353600 2700
73281042 pichulia E March 14, 2020, 6:55 p.m. OK MS C++ 2017 TESTS 146 779 19763200 2700
73338650 danilgrig E March 15, 2020, 1:34 p.m. OK MS C++ 2017 TESTS 150 1247 18124800 2700
73588586 taekop E March 18, 2020, 4:18 p.m. OK MS C++ 2017 TESTS 151 1340 47718400 2700
73280973 CrashMaster E March 14, 2020, 6:54 p.m. OK MS C++ 2017 TESTS 146 1528 23347200 2700
73279489 pichulia E March 14, 2020, 6:35 p.m. OK MS C++ 2017 TESTS 146 1731 22118400 2700
73280823 CrashMaster E March 14, 2020, 6:51 p.m. OK MS C++ 2017 TESTS 146 2886 23347200 2700
73333151 danilgrig E March 15, 2020, 12:23 p.m. OK MS C++ 2017 TESTS 150 2901 14745600 2700
73389149 panamavan E March 16, 2020, 7:51 a.m. OK PyPy 3 TESTS 150 1731 46796800 2700
73449347 panamavan E March 17, 2020, 2:27 a.m. OK PyPy 3 TESTS 151 1825 48742400 2700
73449265 panamavan E March 17, 2020, 2:24 a.m. OK PyPy 3 TESTS 151 1856 49971200 2700
73344517 meooow E March 15, 2020, 2:48 p.m. OK PyPy 3 TESTS 150 1902 45977600 2700
73344767 meooow E March 15, 2020, 2:52 p.m. OK PyPy 3 TESTS 150 2183 45977600 2700
73386792 panamavan E March 16, 2020, 7:07 a.m. OK PyPy 3 TESTS 150 2262 45977600 2700
73292986 meooow E March 14, 2020, 11:23 p.m. OK PyPy 3 TESTS 148 2401 52838400 2700
73416714 mkawa2 E March 16, 2020, 2:52 p.m. OK PyPy 3 TESTS 150 2964 65331200 2700
73417197 mkawa2 E March 16, 2020, 2:59 p.m. OK PyPy 3 TESTS 150 2979 64921600 2700
73333120 loujunjie E March 15, 2020, 12:22 p.m. OK Rust TESTS 150 374 6963200 2700
73633839 sansen E March 19, 2020, 7:58 a.m. OK Rust TESTS 151 2105 29388800 2700
73331706 loujunjie E March 15, 2020, 12:04 p.m. OK Rust TESTS 150 2495 24883200 2700
73585272 cotton100pc E March 18, 2020, 3:38 p.m. OK Rust TESTS 151 2994 21504000 2700

remove filters

Back to search problems