Codeforces Global Round 7

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
1326 Codeforces Global Round 7 FINISHED False 9000 152724311 March 19, 2020, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 508 ) F2 Wise Men (Hard Version) PROGRAMMING bitmasks dp math 3200

B"This is the hard version of the problem. The difference is constraints on the number of wise men and the time limit. You can make hacks only if all versions of this task are solved. n wise men live in a beautiful city. Some of them know each other. For each of the n! possible permutations p_1, p_2, ldots, p_n of the wise men, let's generate a binary string of length n-1 : for each 1 <= q i < n set s_i=1 if p_i and p_{i+1} know each other, and s_i=0 otherwise. For all possible 2^{n-1} binary strings, find the number of permutations that produce this binary string. The first line of input contains one integer n ( 2 <= q n <= q 18) -- the number of wise men in the city. The next n lines contain a binary string of length n each, such that the j -th character of the i -th string is equal to '1' if wise man i knows wise man j , and equals '0' otherwise. It is guaranteed that if the i -th man knows the j -th man, then the j -th man knows i -th man and no man knows himself. Print 2^{n-1} space-separated integers. For each 0 <= q x < 2^{n-1} : In the first test, each wise man knows each other, so every permutation will produce the string 11 . In the second test: "...

Tutorials

74961

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
73773733 dqa2020 F2 March 20, 2020, 8:21 a.m. OK GNU C++11 TESTS 36 1123 124006400 3200
73784728 Phinney F2 March 20, 2020, 11 a.m. OK GNU C++11 TESTS 36 1403 265932800 3200
73792641 Pigbrain F2 March 20, 2020, 12:41 p.m. OK GNU C++11 TESTS 36 1450 119808000 3200
73773806 Backseat-Stargazer F2 March 20, 2020, 8:22 a.m. OK GNU C++11 TESTS 36 1512 214528000 3200
73812796 Phinney F2 March 20, 2020, 4:57 p.m. OK GNU C++11 TESTS 36 1544 125235200 3200
73792162 Isonan F2 March 20, 2020, 12:35 p.m. OK GNU C++11 TESTS 36 1700 86016000 3200
73763287 lzoilxy F2 March 20, 2020, 5:52 a.m. OK GNU C++11 TESTS 36 1871 530739200 3200
73786295 _twilight F2 March 20, 2020, 11:21 a.m. OK GNU C++11 TESTS 36 2121 160665600 3200
73812321 XLor F2 March 20, 2020, 4:51 p.m. OK GNU C++11 TESTS 36 2355 242995200 3200
73716216 WZYYN F2 March 19, 2020, 4:14 p.m. OK GNU C++11 TESTS 36 2682 21196800 3200
73789825 mayaohua2003 F2 March 20, 2020, 12:08 p.m. OK GNU C++14 TESTS 36 1091 121036800 3200
73792515 beginend F2 March 20, 2020, 12:39 p.m. OK GNU C++14 TESTS 36 1325 169676800 3200
73749245 yhx-12243 F2 March 20, 2020, 12:08 a.m. OK GNU C++14 TESTS 36 1591 85299200 3200
73797638 DCXDCX F2 March 20, 2020, 1:40 p.m. OK GNU C++14 TESTS 36 1840 131481600 3200
73755101 ZZZZZZZZZZZZZZZZZZ F2 March 20, 2020, 3:14 a.m. OK GNU C++14 TESTS 36 2371 94822400 3200
73747841 krijgertje F2 March 19, 2020, 11:15 p.m. OK GNU C++14 TESTS 36 3775 42803200 3200
73730352 cuizhuyefei F2 March 19, 2020, 4:55 p.m. OK GNU C++14 TESTS 36 3790 44544000 3200
73801053 Combi F2 March 20, 2020, 2:21 p.m. OK GNU C++14 TESTS 36 3930 91750400 3200
73728399 apiadu F2 March 19, 2020, 4:50 p.m. OK GNU C++14 TESTS 36 3993 46592000 3200
73804638 A_Fan_of_the_AK_King--lk F2 March 20, 2020, 3:04 p.m. OK GNU C++17 TESTS 36 1278 183091200 3200
73799867 Rubbish12345 F2 March 20, 2020, 2:07 p.m. OK GNU C++17 TESTS 36 1372 82329600 3200
73798277 autoint F2 March 20, 2020, 1:47 p.m. OK GNU C++17 TESTS 36 1372 123187200 3200
73703973 Um_nik F2 March 19, 2020, 3:44 p.m. OK GNU C++17 TESTS 36 1544 123084800 3200
73742443 Golovanov399 F2 March 19, 2020, 9:09 p.m. OK GNU C++17 TESTS 36 1621 119910400 3200
73793696 CMXRYNP F2 March 20, 2020, 12:54 p.m. OK GNU C++17 TESTS 36 1637 82227200 3200
73806041 hjk1030 F2 March 20, 2020, 3:22 p.m. OK GNU C++17 TESTS 36 1669 83251200 3200
73793294 cold_chair F2 March 20, 2020, 12:49 p.m. OK GNU C++17 TESTS 36 1902 125030400 3200
73707244 tourist F2 March 19, 2020, 3:51 p.m. OK GNU C++17 TESTS 36 1980 40755200 3200
73741564 I_love_chickpea F2 March 19, 2020, 8:53 p.m. OK GNU C++17 TESTS 36 1996 122060800 3200
73820189 PavelKunyavskiy F2 March 20, 2020, 6:06 p.m. OK GNU C++17 (64) TESTS 36 951 80076800 3200

remove filters

Back to search problems