Codeforces Round 576 (Div. 1)

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
1198 Codeforces Round 576 (Div. 1) FINISHED False 7200 172941887 July 30, 2019, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 912 ) F GCD Groups 2 PROGRAMMING greedy number theory probabilities 2900

B'You are given an array of n integers. You need to split all integers into two groups so that the GCD of all integers in the first group is equal to one and the GCD of all integers in the second group is equal to one. The GCD of a group of integers is the largest non-negative integer that divides all the integers in the group. Both groups have to be non-empty. The first line contains a single integer n ( 2 <= q n <= q 10^5 ). The second line contains n integers a_1 , a_2 , ldots , a_n ( 1 <= q a_i <= q 10^9 ) -- the elements of the array. In the first line print "YES" (without quotes), if it is possible to split the integers into two groups as required, and "NO" (without quotes) otherwise. If it is possible to split the integers, in the second line print n integers, where the i -th integer is equal to 1 if the integer a_i should be in the first group, and 2 otherwise. If there are multiple solutions, print any. '...

Tutorials

E

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
58223632 cuizhuyefei F Aug. 3, 2019, 1:34 p.m. OK GNU C++11 TESTS 79 46 5734400 2900
58241786 _twilight F Aug. 4, 2019, 1:53 a.m. OK GNU C++11 TESTS 79 46 11264000 2900
58705534 HyscereXD F Aug. 13, 2019, 9:22 a.m. OK GNU C++11 TESTS 79 61 31436800 2900
59012654 ohweonfire F Aug. 18, 2019, 2:02 p.m. OK GNU C++11 TESTS 79 62 819200 2900
58192148 tomekkulczynski F Aug. 2, 2019, 8:21 p.m. OK GNU C++11 TESTS 79 62 4300800 2900
58204842 Buzhibujue F Aug. 3, 2019, 6:29 a.m. OK GNU C++11 TESTS 79 62 4710400 2900
58192004 tomekkulczynski F Aug. 2, 2019, 8:16 p.m. OK GNU C++11 TESTS 79 62 13107200 2900
58092581 BigBag F July 31, 2019, 6:11 p.m. OK GNU C++11 TESTS 77 62 30412800 2900
58241632 _twilight F Aug. 4, 2019, 1:45 a.m. OK GNU C++11 TESTS 79 77 7577600 2900
60487139 lanpang F Sept. 13, 2019, 1:03 p.m. OK GNU C++11 TESTS 79 77 65843200 2900
58050240 Radewoosh F July 31, 2019, 2:18 a.m. OK GNU C++14 TESTS 63 62 8908800 2900
58050207 Radewoosh F July 31, 2019, 2:17 a.m. OK GNU C++14 TESTS 63 62 8908800 2900
58050094 Radewoosh F July 31, 2019, 2:14 a.m. OK GNU C++14 TESTS 63 62 8908800 2900
58050069 Radewoosh F July 31, 2019, 2:13 a.m. OK GNU C++14 TESTS 63 62 8908800 2900
58050006 Radewoosh F July 31, 2019, 2:11 a.m. OK GNU C++14 TESTS 63 62 8908800 2900
58049749 Radewoosh F July 31, 2019, 2:05 a.m. OK GNU C++14 TESTS 63 62 8908800 2900
59626046 Marckess F Aug. 28, 2019, 3:59 p.m. OK GNU C++14 TESTS 79 62 27648000 2900
58030444 pashka F July 30, 2019, 4:27 p.m. OK GNU C++14 TESTS 58 77 819200 2900
58115703 tmwilliamlin168 F Aug. 1, 2019, 8:48 a.m. OK GNU C++14 TESTS 77 77 5120000 2900
58101100 shdut F Aug. 1, 2019, 12:55 a.m. OK GNU C++14 TESTS 77 77 5529600 2900
58162403 neal F Aug. 2, 2019, 7:53 a.m. OK GNU C++17 TESTS 79 46 716800 2900
58161986 neal F Aug. 2, 2019, 7:45 a.m. OK GNU C++17 TESTS 79 46 716800 2900
58139526 flashmt F Aug. 1, 2019, 5:30 p.m. OK GNU C++17 TESTS 79 62 1228800 2900
58140131 flashmt F Aug. 1, 2019, 5:46 p.m. OK GNU C++17 TESTS 79 62 1331200 2900
59826448 cerberus97 F Aug. 31, 2019, 7:44 p.m. OK GNU C++17 TESTS 79 62 5836800 2900
58029905 gisp_zjz F July 30, 2019, 4:26 p.m. OK GNU C++17 TESTS 58 62 16793600 2900
58093748 Golovanov399 F July 31, 2019, 6:42 p.m. OK GNU C++17 TESTS 77 77 4403200 2900
58053912 chemthan F July 31, 2019, 3:59 a.m. OK GNU C++17 TESTS 65 77 5529600 2900
58105039 Nakagawa.Kanon F Aug. 1, 2019, 3:39 a.m. OK GNU C++17 TESTS 77 77 8499200 2900
58098909 krijgertje F July 31, 2019, 10:07 p.m. OK GNU C++17 TESTS 77 77 10240000 2900
58214630 dalt F Aug. 3, 2019, 10:12 a.m. OK Java 8 TESTS 79 233 68198400 2900
58146392 fetetriste F Aug. 1, 2019, 9:45 p.m. OK Java 8 TESTS 79 249 51302400 2900
60251519 wir F Sept. 8, 2019, 7:04 a.m. OK Java 8 TESTS 79 421 0 2900
58035237 qwerty787788 F July 30, 2019, 5:56 p.m. OK Java 8 TESTS 58 421 0 2900
58031108 Petr F July 30, 2019, 4:29 p.m. OK Java 8 TESTS 58 421 0 2900
58037392 uwi F July 30, 2019, 6:22 p.m. OK Java 8 TESTS 60 467 2560000 2900
58268902 TOXait F Aug. 4, 2019, 3:59 p.m. OK MS C++ 2017 TESTS 79 405 819200 2900
58228805 xsc F Aug. 3, 2019, 3:43 p.m. OK MS C++ 2017 TESTS 79 420 819200 2900
61940651 IT_MACHINE F Oct. 5, 2019, 7:39 p.m. OK MS C++ 2017 TESTS 79 498 1638400 2900
58483253 vca F Aug. 9, 2019, 6:35 a.m. OK PyPy 3 TESTS 79 343 13824000 2900

remove filters

Back to search problems