Codeforces Round 671 (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
1419 Codeforces Round 671 (Div. 2) FINISHED False 7200 136740263 Sept. 19, 2020, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 3330 ) E Decryption PROGRAMMING bitmasks constructive algorithms implementation math number theory

B"An agent called Cypher is decrypting a message, that contains a composite number n . All divisors of n , which are greater than 1 , are placed in a circle. Cypher can choose the initial order of numbers in the circle. In one move Cypher can choose two adjacent numbers in a circle and insert their least common multiple between them. He can do that move as many times as needed. A message is decrypted, if every two adjacent numbers are not coprime. Note that for such constraints it's always possible to decrypt the message. Find the minimal number of moves that Cypher should do to decrypt the message, and show the initial order of numbers in the circle for that. The first line contains an integer t (1 <= t <= 100) -- the number of test cases. Next t lines describe each test case. In a single line of each test case description, there is a single composite number n (4 <= n <= 10^9) -- the number from the message. It's guaranteed that the total number of divisors of n for all test cases does not exceed 2 cdot 10^5 . For each test case in the first line output the initial order of divisors, which are greater than 1 , in the circle. In the second line output, the minimal number of moves needed to decrypt the message. If there are different possible orders with a correct answer, print any of them. In the first test case 6 has three divisors, which are greater than 1 : 2, 3, 6 . Regardless of the initial order, numbers 2 and 3 are adjacent, so it's needed to place their least common multiple between them. After that the circle becomes 2, 6, 3, 6 , and every two adjacent numbers are not coprime. In the second test case 4 has two divisors greater than 1 : 2, 4 , and they are not coprime, so any initial order is correct, and it's not needed to place any least common multiples. In the third test case all divisors of 30 greater than 1 can be p"...

Tutorials

Codeforces Round #671 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
93272009 rainboy E Sept. 19, 2020, 6:26 p.m. OK GNU C11 TESTS 60 483 1843200
93293301 yan_qiu_ynlchrz E Sept. 20, 2020, 1:47 a.m. OK GNU C++11 TESTS 60 31 0
93276006 srijon51 E Sept. 19, 2020, 6:48 p.m. OK GNU C++11 TESTS 60 31 819200
93295312 linners E Sept. 20, 2020, 2:45 a.m. OK GNU C++11 TESTS 60 46 0
93292671 feifeiko E Sept. 20, 2020, 1:27 a.m. OK GNU C++11 TESTS 60 46 0
93288485 5ab E Sept. 19, 2020, 10:24 p.m. OK GNU C++11 TESTS 60 46 614400
93295711 HHHEN E Sept. 20, 2020, 2:55 a.m. OK GNU C++11 TESTS 60 46 1024000
93299768 lzzAKIOI E Sept. 20, 2020, 4:24 a.m. OK GNU C++11 TESTS 61 46 1740800
93292814 luogu_bot2 E Sept. 20, 2020, 1:32 a.m. OK GNU C++11 TESTS 60 46 2457600
93292775 worcher E Sept. 20, 2020, 1:31 a.m. OK GNU C++11 TESTS 60 46 2457600
93291106 pzc2004 E Sept. 20, 2020, 12:22 a.m. OK GNU C++11 TESTS 60 46 2457600
93268862 GregFocker E Sept. 19, 2020, 4:34 p.m. OK GNU C++14 TESTS 60 31 307200
93278778 udc321 E Sept. 19, 2020, 7:15 p.m. OK GNU C++14 TESTS 60 31 819200
93265654 shubh101220001 E Sept. 19, 2020, 4:29 p.m. OK GNU C++14 TESTS 60 31 921600
93292978 xb0nS E Sept. 20, 2020, 1:37 a.m. OK GNU C++14 TESTS 60 46 204800
93288719 coder_pulkit_c E Sept. 19, 2020, 10:34 p.m. OK GNU C++14 TESTS 60 46 204800
93280566 mehtaji E Sept. 19, 2020, 7:37 p.m. OK GNU C++14 TESTS 60 46 204800
93273716 upobir E Sept. 19, 2020, 6:33 p.m. OK GNU C++14 TESTS 60 46 204800
93273234 Giga_Cronos E Sept. 19, 2020, 6:30 p.m. OK GNU C++14 TESTS 60 46 204800
93268118 m1kush E Sept. 19, 2020, 4:33 p.m. OK GNU C++14 TESTS 60 46 204800
93266523 kfg021 E Sept. 19, 2020, 4:31 p.m. OK GNU C++14 TESTS 60 46 204800
93300660 ningBr E Sept. 20, 2020, 4:43 a.m. OK GNU C++17 TESTS 61 31 204800
93283756 Rvess E Sept. 19, 2020, 8:28 p.m. OK GNU C++17 TESTS 60 31 204800
93265122 pizdato E Sept. 19, 2020, 4:28 p.m. OK GNU C++17 TESTS 60 31 204800
93264908 Defener E Sept. 19, 2020, 4:28 p.m. OK GNU C++17 TESTS 60 31 204800
93297355 Slivery E Sept. 20, 2020, 3:37 a.m. OK GNU C++17 TESTS 60 31 409600
93290903 Spitfire_F_Mk_IX E Sept. 20, 2020, 12:11 a.m. OK GNU C++17 TESTS 60 31 409600
93264789 Ta180m E Sept. 19, 2020, 4:27 p.m. OK GNU C++17 TESTS 60 31 1638400
93293018 liujia123456 E Sept. 20, 2020, 1:38 a.m. OK GNU C++17 TESTS 60 31 7987200
93295081 2018030102067 E Sept. 20, 2020, 2:39 a.m. OK GNU C++17 TESTS 60 46 0
93294584 kohi E Sept. 20, 2020, 2:26 a.m. OK GNU C++17 TESTS 60 46 0
93272632 Harshlyn94 E Sept. 19, 2020, 6:28 p.m. OK GNU C++17 (64) TESTS 60 31 0
93265343 _Ash__ E Sept. 19, 2020, 4:28 p.m. OK GNU C++17 (64) TESTS 60 31 0
93292302 yamate11 E Sept. 20, 2020, 1:13 a.m. OK GNU C++17 (64) TESTS 60 31 204800
93283442 I3J03RN E Sept. 19, 2020, 8:23 p.m. OK GNU C++17 (64) TESTS 60 31 307200
93292959 Larry0101 E Sept. 20, 2020, 1:36 a.m. OK GNU C++17 (64) TESTS 60 31 921600
93296784 inszva E Sept. 20, 2020, 3:23 a.m. OK GNU C++17 (64) TESTS 60 31 3174400
93298733 Anachor E Sept. 20, 2020, 4:04 a.m. OK GNU C++17 (64) TESTS 60 46 0
93277789 NinevskiyKN E Sept. 19, 2020, 7:05 p.m. OK GNU C++17 (64) TESTS 60 46 0
93281724 june_waves E Sept. 19, 2020, 7:54 p.m. OK GNU C++17 (64) TESTS 60 46 102400
93267312 Tenzon E Sept. 19, 2020, 4:32 p.m. OK GNU C++17 (64) TESTS 60 46 102400
93288313 clyring E Sept. 19, 2020, 10:18 p.m. OK Haskell TESTS 60 31 102400
93277958 blackBird E Sept. 19, 2020, 7:06 p.m. OK Java 11 TESTS 60 218 0
93268543 Apfeloxid E Sept. 19, 2020, 4:34 p.m. OK Java 11 TESTS 60 233 0
93301532 b0bl0blaw E Sept. 20, 2020, 4:59 a.m. OK Java 11 TESTS 61 248 0
93275087 hiromi_ayase E Sept. 19, 2020, 6:41 p.m. OK Java 11 TESTS 60 249 0
93286825 kostasanemozalis E Sept. 19, 2020, 9:38 p.m. OK Java 11 TESTS 60 249 409600
93273969 skittles1412 E Sept. 19, 2020, 6:34 p.m. OK Java 11 TESTS 60 249 716800
93279036 Dukkha E Sept. 19, 2020, 7:18 p.m. OK Java 11 TESTS 60 280 307200
93300573 dubai03nsr E Sept. 20, 2020, 4:41 a.m. OK Java 11 TESTS 61 514 0
93266280 wleite E Sept. 19, 2020, 4:30 p.m. OK Java 8 TESTS 60 140 0
93279508 flyman3046 E Sept. 19, 2020, 7:23 p.m. OK Java 8 TESTS 60 155 0
93272954 Naman_123 E Sept. 19, 2020, 6:29 p.m. OK Java 8 TESTS 60 156 0
93276550 plusplus6408 E Sept. 19, 2020, 6:52 p.m. OK Java 8 TESTS 60 171 0
93292991 Okhair E Sept. 20, 2020, 1:37 a.m. OK Java 8 TESTS 60 186 0
93266292 ZerooCool E Sept. 19, 2020, 4:30 p.m. OK Java 8 TESTS 60 187 0
93289194 sourav2999 E Sept. 19, 2020, 10:52 p.m. OK Java 8 TESTS 60 202 0
93282943 vvilan E Sept. 19, 2020, 8:14 p.m. OK Java 8 TESTS 60 218 0
93279935 notnamed E Sept. 19, 2020, 7:29 p.m. OK Java 8 TESTS 60 295 0
93281185 O_E E Sept. 19, 2020, 7:46 p.m. OK Java 8 TESTS 60 343 0
93275740 ostroumov E Sept. 19, 2020, 6:46 p.m. OK Kotlin TESTS 60 171 1740800
93281814 sid9406 E Sept. 19, 2020, 7:55 p.m. OK Kotlin TESTS 60 202 921600
93273154 malchmih E Sept. 19, 2020, 6:30 p.m. OK Kotlin TESTS 60 592 1433600
93272369 fancy_lettuce E Sept. 19, 2020, 6:27 p.m. OK Mono C# TESTS 60 124 141721600
93295744 Cube219 E Sept. 20, 2020, 2:55 a.m. OK MS C++ 2017 TESTS 60 78 102400
93277462 Extraordinary_ E Sept. 19, 2020, 7:01 p.m. OK MS C++ 2017 TESTS 60 124 0
93273321 fancy_lettuce E Sept. 19, 2020, 6:31 p.m. OK .NET Core C# TESTS 60 140 4915200
93292905 ngoc.ks E Sept. 20, 2020, 1:34 a.m. OK Node.js TESTS 60 264 8089600
93266015 throwawayatcoder E Sept. 19, 2020, 4:30 p.m. OK PyPy 3 TESTS 60 218 4915200
93290640 thnkndblv E Sept. 19, 2020, 11:59 p.m. OK PyPy 3 TESTS 60 218 9728000
93282708 thnkndblv E Sept. 19, 2020, 8:10 p.m. OK PyPy 3 TESTS 60 233 9216000
93291395 FlakeLCR E Sept. 20, 2020, 12:34 a.m. OK PyPy 3 TESTS 60 264 6246400
93266849 nasuo E Sept. 19, 2020, 4:31 p.m. OK PyPy 3 TESTS 60 280 9523200
93273141 ayaoni E Sept. 19, 2020, 6:30 p.m. OK PyPy 3 TESTS 60 280 9625600
93283975 nagitaosu E Sept. 19, 2020, 8:33 p.m. OK PyPy 3 TESTS 60 295 9318400
93279825 marroncastle E Sept. 19, 2020, 7:27 p.m. OK PyPy 3 TESTS 60 295 9420800
93266698 kclee2172 E Sept. 19, 2020, 4:31 p.m. OK PyPy 3 TESTS 60 296 7065600
93295652 nehan_der_thal E Sept. 20, 2020, 2:53 a.m. OK PyPy 3 TESTS 60 311 9625600
93277489 sh1194 E Sept. 19, 2020, 7:01 p.m. OK Python 3 TESTS 60 327 512000
93277067 sh1194 E Sept. 19, 2020, 6:57 p.m. OK Python 3 TESTS 60 342 614400
93273598 erickjohnross E Sept. 19, 2020, 6:32 p.m. OK Python 3 TESTS 60 358 614400
93296458 ngtkana E Sept. 20, 2020, 3:15 a.m. OK Rust TESTS 60 46 307200
93272647 Chipe1 E Sept. 19, 2020, 6:28 p.m. OK Rust TESTS 60 46 409600

remove filters

Back to search problems