Codeforces Round 545 (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
1138 Codeforces Round 545 (Div. 2) FINISHED False 9000 179787299 March 8, 2019, 9:05 a.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 4037 ) B Circus PROGRAMMING brute force greedy math strings 1700

B'Polycarp is a head of a circus troupe. There are n -- an even number -- artists in the troupe. It is known whether the i -th artist can perform as a clown (if yes, then c_i = 1 , otherwise c_i = 0 ), and whether they can perform as an acrobat (if yes, then a_i = 1 , otherwise a_i = 0 ). Split the artists into two performances in such a way that: The first line contains a single integer n ( 2 <= n <= 5 ,000 , n is even) -- the number of artists in the troupe. The second line contains n digits c_1 c_2 ldots c_n , the i -th of which is equal to 1 if the i -th artist can perform as a clown, and 0 otherwise. The third line contains n digits a_1 a_2 ldots a_n , the i -th of which is equal to 1 , if the i -th artist can perform as an acrobat, and 0 otherwise. Print frac{n}{2} distinct integers -- the indices of the artists that should play in the first performance. If there are multiple answers, print any. If there is no solution, print a single integer -1 . In the first example, one of the possible divisions into two performances is as follows: in the first performance artists 1 and 4 should take part. Then the number of artists in the first performance who can perform as clowns is equal to 1 . And the number of artists in the second performance who can perform as acrobats is 1 as well. In the second example, the division is not possible. In the third example, one of the possible divisions is as follows: in the first performance artists 3 and 4 should take part. Then in the first performance there are 2 artists who can perform as clowns. And the number of artists in the second performance who can perform as acrobats is 2 as well. '...

Tutorials

Codeforces Round #545 – Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
52529343 cui010 B April 9, 2019, 12:52 p.m. OK Clang++17 Diagnostics TESTS 36 62 0 1700
51129360 sersht B March 10, 2019, 1:05 p.m. OK Clang++17 Diagnostics TESTS 36 140 11571200 1700
61741089 LaSWeeG B Oct. 2, 2019, 8:18 p.m. OK FPC TESTS 36 31 307200 1700
51019192 AHTOH._. B March 8, 2019, 10:42 a.m. OK FPC TESTS 34 31 409600 1700
51925369 chaorenhaha B March 28, 2019, 7:17 a.m. OK FPC TESTS 36 46 204800 1700
51341923 Mint_Dentifrice B March 15, 2019, 4:36 p.m. OK FPC TESTS 36 46 614400 1700
51566201 k_ankita B March 20, 2019, 9:49 a.m. OK GNU C11 TESTS 36 31 0 1700
51072519 MYNAMEISSHARIFUL B March 9, 2019, 8:14 a.m. OK GNU C11 TESTS 34 31 0 1700
51125872 eku B March 10, 2019, 11:35 a.m. OK GNU C11 TESTS 36 31 0 1700
66826083 lazybear B Dec. 14, 2019, 8:59 a.m. OK GNU C11 TESTS 36 78 102400 1700
51060587 WULI B March 9, 2019, 2:40 a.m. OK GNU C++11 TESTS 34 15 0 1700
51074170 crawarb B March 9, 2019, 8:49 a.m. OK GNU C++11 TESTS 34 30 0 1700
51061348 lyh B March 9, 2019, 3:10 a.m. OK GNU C++11 TESTS 34 30 0 1700
51060517 WULI B March 9, 2019, 2:37 a.m. OK GNU C++11 TESTS 34 30 0 1700
51058004 boycute B March 9, 2019, 12:45 a.m. OK GNU C++11 TESTS 34 30 0 1700
51057319 ChenHaoJie B March 9, 2019, 12:02 a.m. OK GNU C++11 TESTS 34 30 0 1700
51119234 Wuchupeng B March 10, 2019, 8:26 a.m. OK GNU C++11 TESTS 36 30 0 1700
51124246 redbag B March 10, 2019, 10:53 a.m. OK GNU C++11 TESTS 36 30 0 1700
51263424 wannaAC B March 13, 2019, 2:22 p.m. OK GNU C++11 TESTS 36 30 0 1700
51395976 hld67890 B March 17, 2019, 4:31 a.m. OK GNU C++11 TESTS 36 30 0 1700
52001384 dingmingcheng B March 30, 2019, 6:23 a.m. OK GNU C++14 TESTS 36 15 0 1700
51928224 Hacker_khan B March 28, 2019, 8:55 a.m. OK GNU C++14 TESTS 36 15 0 1700
51412531 preposterous101 B March 17, 2019, 12:38 p.m. OK GNU C++14 TESTS 36 15 0 1700
51249937 xiji233 B March 13, 2019, 8:01 a.m. OK GNU C++14 TESTS 36 15 0 1700
51109669 xsjlmzs B March 10, 2019, 3:14 a.m. OK GNU C++14 TESTS 36 15 0 1700
51061629 vvvb B March 9, 2019, 3:21 a.m. OK GNU C++14 TESTS 34 15 0 1700
68012193 MB1151 B Dec. 31, 2019, 4:25 p.m. OK GNU C++14 TESTS 36 15 0 1700
57955692 ruchi02 B July 29, 2019, 6:35 p.m. OK GNU C++14 TESTS 36 15 0 1700
57489825 vjudge2 B July 22, 2019, 6:42 a.m. OK GNU C++14 TESTS 36 15 0 1700
57484798 201801090150 B July 22, 2019, 4:39 a.m. OK GNU C++14 TESTS 36 15 0 1700
51241901 tspn B March 12, 2019, 11:19 p.m. OK GNU C++17 TESTS 36 15 0 1700
51922015 LumpBloom7 B March 28, 2019, 5:15 a.m. OK GNU C++17 TESTS 36 15 0 1700
51748733 kleinercubs B March 23, 2019, 8:41 a.m. OK GNU C++17 TESTS 36 15 0 1700
51061397 zzu20172430702 B March 9, 2019, 3:12 a.m. OK GNU C++17 TESTS 34 15 0 1700
51044372 s5WiwiBoldnodA6t B March 8, 2019, 6:10 p.m. OK GNU C++17 TESTS 34 15 0 1700
51014452 lyh1999 B March 8, 2019, 10:04 a.m. OK GNU C++17 TESTS 34 15 102400 1700
51062793 wnpccc B March 9, 2019, 4:14 a.m. OK GNU C++17 TESTS 34 15 102400 1700
51066953 yoshinoz B March 9, 2019, 6:16 a.m. OK GNU C++17 TESTS 34 15 102400 1700
51394982 raghavkaushik7 B March 17, 2019, 3:40 a.m. OK GNU C++17 TESTS 36 15 102400 1700
51423258 minaminao B March 17, 2019, 5:43 p.m. OK GNU C++17 TESTS 36 15 102400 1700
51023949 gksato B March 8, 2019, 11:19 a.m. OK Haskell TESTS 34 31 102400 1700
52628096 sonowz B April 12, 2019, 5:16 a.m. OK Haskell TESTS 36 78 102400 1700
68061952 thisbeit B Jan. 2, 2020, 4:58 a.m. OK Java 11 TESTS 36 186 0 1700
59969756 TheSawan B Sept. 3, 2019, 11:47 p.m. OK Java 8 TESTS 36 109 0 1700
57148744 Garett B July 16, 2019, 1:56 p.m. OK Java 8 TESTS 36 109 0 1700
55513849 vjudge4 B June 13, 2019, 3:13 a.m. OK Java 8 TESTS 36 109 0 1700
51200140 bluesky111 B March 11, 2019, 10:01 p.m. OK Java 8 TESTS 36 109 0 1700
51105715 Asgar B March 9, 2019, 10:12 p.m. OK Java 8 TESTS 36 109 0 1700
65888988 darren_yao B Nov. 28, 2019, 1:56 a.m. OK Java 8 TESTS 36 124 0 1700
62234395 Shady51 B Oct. 9, 2019, 10:02 p.m. OK Java 8 TESTS 36 124 0 1700
61772621 vjudge5 B Oct. 3, 2019, 10:44 a.m. OK Java 8 TESTS 36 124 0 1700
59193136 the41 B Aug. 20, 2019, 11:10 p.m. OK Java 8 TESTS 36 124 0 1700
58796565 saurabhs1206 B Aug. 14, 2019, 5:23 a.m. OK Java 8 TESTS 36 124 0 1700
51487858 yumtam B March 19, 2019, 2:20 p.m. OK Kotlin TESTS 36 171 102400 1700
51147274 selpo B March 11, 2019, 4:49 a.m. OK Mono C# TESTS 36 46 204800 1700
51012801 selpo B March 8, 2019, 9:51 a.m. OK Mono C# TESTS 34 46 204800 1700
51010479 omikad B March 8, 2019, 9:33 a.m. OK Mono C# TESTS 34 61 204800 1700
51151125 selpo B March 11, 2019, 7:45 a.m. OK Mono C# TESTS 36 61 204800 1700
51485500 BNIS B March 19, 2019, 1:23 p.m. OK Mono C# TESTS 36 62 102400 1700
51144640 SegaMegaDrive B March 10, 2019, 10:17 p.m. OK Mono C# TESTS 36 62 204800 1700
51014274 eki B March 8, 2019, 10:03 a.m. OK Mono C# TESTS 34 62 409600 1700
53463903 plasma-effect B April 28, 2019, 8:56 a.m. OK Mono C# TESTS 36 62 3993600 1700
51026217 fiver B March 8, 2019, 11:33 a.m. OK Mono C# TESTS 34 62 216985600 1700
56508105 ansergeyg B July 4, 2019, 9:18 a.m. OK Mono C# TESTS 36 77 204800 1700
51063594 ZSTU-2018329621261 B March 9, 2019, 4:44 a.m. OK MS C++ TESTS 34 31 0 1700
52434984 vjudge4 B April 7, 2019, 2:43 a.m. OK MS C++ TESTS 36 31 0 1700
57450332 vjudge5 B July 21, 2019, 9:31 a.m. OK MS C++ TESTS 36 31 0 1700
51296509 gs11008 B March 14, 2019, 12:39 p.m. OK MS C++ TESTS 36 31 0 1700
57479710 vjudge2 B July 22, 2019, 1:38 a.m. OK MS C++ TESTS 36 31 0 1700
53277453 vjudge2 B April 25, 2019, 10:16 a.m. OK MS C++ TESTS 36 31 102400 1700
53277374 ys1468362286 B April 25, 2019, 10:14 a.m. OK MS C++ TESTS 36 31 102400 1700
52774480 vjudge3 B April 15, 2019, 11:17 a.m. OK MS C++ TESTS 36 31 102400 1700
51395732 vjudge5 B March 17, 2019, 4:21 a.m. OK MS C++ TESTS 36 31 102400 1700
51379451 qcwlmqy B March 16, 2019, 3:33 p.m. OK MS C++ TESTS 36 31 102400 1700
52136852 yomyom0824 B April 1, 2019, 3:35 a.m. OK MS C++ 2017 TESTS 36 30 102400 1700
51023647 N0fail B March 8, 2019, 11:17 a.m. OK MS C++ 2017 TESTS 34 31 0 1700
57485163 Saber_Altria B July 22, 2019, 4:54 a.m. OK MS C++ 2017 TESTS 36 31 0 1700
51127463 petko_mitkov B March 10, 2019, 12:19 p.m. OK MS C++ 2017 TESTS 36 31 0 1700
51094636 shahakMorag B March 9, 2019, 3:47 p.m. OK MS C++ 2017 TESTS 36 31 0 1700
52136787 yomyom0824 B April 1, 2019, 3:32 a.m. OK MS C++ 2017 TESTS 36 31 102400 1700
51011338 altunyanv B March 8, 2019, 9:40 a.m. OK MS C++ 2017 TESTS 34 31 102400 1700
51069865 Miris B March 9, 2019, 7:18 a.m. OK MS C++ 2017 TESTS 34 31 102400 1700
51211986 arzchherj B March 12, 2019, 8:27 a.m. OK MS C++ 2017 TESTS 36 31 102400 1700
51231508 hwangganzi B March 12, 2019, 4:30 p.m. OK MS C++ 2017 TESTS 36 31 102400 1700
52235269 sash0 B April 2, 2019, 1:31 p.m. OK Ocaml TESTS 36 31 307200 1700
62635073 Walmet B Oct. 15, 2019, 4:35 p.m. OK PascalABC.NET TESTS 36 202 0 1700
65395229 maksimqew B Nov. 19, 2019, 6:49 p.m. OK PascalABC.NET TESTS 36 217 0 1700
51119100 mostyka B March 10, 2019, 8:22 a.m. OK PascalABC.NET TESTS 36 296 0 1700
51779188 amr.magdy B March 24, 2019, 2:46 a.m. OK PyPy 2 TESTS 36 124 1536000 1700
51011802 _kawaii_neko_ B March 8, 2019, 9:43 a.m. OK PyPy 2 TESTS 34 155 921600 1700
51285828 mgor B March 14, 2019, 7:09 a.m. OK PyPy 2 TESTS 36 155 1126400 1700
51039241 Mukundan314 B March 8, 2019, 4:21 p.m. OK PyPy 2 TESTS 34 186 1331200 1700
51043081 CandyZack B March 8, 2019, 5:41 p.m. OK PyPy 2 TESTS 34 187 2150400 1700
51040818 Mukundan314 B March 8, 2019, 4:54 p.m. OK PyPy 2 TESTS 34 202 1433600 1700
51180195 gatsko B March 11, 2019, 5:03 p.m. OK PyPy 2 TESTS 36 218 7270400 1700
51015555 pa.n.ik B March 8, 2019, 10:13 a.m. OK PyPy 2 TESTS 34 233 4710400 1700
51121800 c1729 B March 10, 2019, 9:37 a.m. OK PyPy 2 TESTS 36 249 1843200 1700
51651342 m7mdbadawy B March 21, 2019, 6:59 p.m. OK PyPy 3 TESTS 36 155 921600 1700
51039318 cgfs10000 B March 8, 2019, 4:22 p.m. OK PyPy 3 TESTS 34 155 1536000 1700
59693723 Sevlll B Aug. 30, 2019, 7:29 a.m. OK PyPy 3 TESTS 36 156 2150400 1700
68007010 boseranit B Dec. 31, 2019, 1:42 p.m. OK PyPy 3 TESTS 36 156 3276800 1700
51015388 danchu B March 8, 2019, 10:11 a.m. OK PyPy 3 TESTS 34 170 1536000 1700
51107083 renjied B March 10, 2019, 12:06 a.m. OK PyPy 3 TESTS 36 170 1740800 1700
59681219 deadguy B Aug. 29, 2019, 8:46 p.m. OK PyPy 3 TESTS 36 170 3788800 1700
51020221 conjecture_xyz B March 8, 2019, 10:50 a.m. OK PyPy 3 TESTS 34 171 2048000 1700
51020044 nikeshthapa255 B March 8, 2019, 10:49 a.m. OK PyPy 3 TESTS 34 171 2252800 1700
51099621 jason53415 B March 9, 2019, 6:20 p.m. OK PyPy 3 TESTS 36 171 2355200 1700
51021236 nealkarpe B March 8, 2019, 10:58 a.m. OK Python 2 TESTS 34 187 409600 1700
51015379 wunder9l B March 8, 2019, 10:11 a.m. OK Python 2 TESTS 34 202 409600 1700
51228099 Utuno B March 12, 2019, 2:58 p.m. OK Python 2 TESTS 36 873 102400 1700
51041979 Uranux B March 8, 2019, 5:18 p.m. OK Python 2 TESTS 34 935 307200 1700
51605606 _PortgasD.Ace_ B March 21, 2019, 7:15 a.m. OK Python 3 TESTS 36 109 409600 1700
51431720 star_star B March 18, 2019, 1:20 a.m. OK Python 3 TESTS 36 109 409600 1700
53883526 ecnerwala B May 8, 2019, 4:24 p.m. OK Python 3 TESTS 36 109 512000 1700
54662051 efimmanevich B May 26, 2019, 11:18 a.m. OK Python 3 TESTS 36 109 614400 1700
51017490 malylesio B March 8, 2019, 10:29 a.m. OK Python 3 TESTS 34 109 819200 1700
51872299 anton192 B March 26, 2019, 5:58 p.m. OK Python 3 TESTS 36 124 409600 1700
51431833 star_star B March 18, 2019, 1:30 a.m. OK Python 3 TESTS 36 124 409600 1700
53883508 ecnerwala B May 8, 2019, 4:23 p.m. OK Python 3 TESTS 36 124 512000 1700
51021490 CHelle B March 8, 2019, 11 a.m. OK Python 3 TESTS 34 124 512000 1700
53195801 Codeprig B April 23, 2019, 3:12 p.m. OK Python 3 TESTS 36 124 614400 1700
51119004 vain0 B March 10, 2019, 8:20 a.m. OK Rust TESTS 36 31 102400 1700
52423502 alykov B April 6, 2019, 6:13 p.m. OK Rust TESTS 36 31 512000 1700
51119970 yakamoto B March 10, 2019, 8:47 a.m. OK Scala TESTS 36 951 0 1700

remove filters

Back to search problems