Codeforces Round 502 (in memory of Leopoldo Taravilse, Div. 1 + 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
1017 Codeforces Round 502 (in memory of Leopoldo Taravilse, Div. 1 + Div. 2) FINISHED False 9600 203788524 Aug. 8, 2018, 2:05 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 9194 ) B The Bits PROGRAMMING implementation math 1200

B"Rudolf is on his way to the castle. Before getting into the castle, the security staff asked him a question: Given two binary numbers a and b of length n . How many different ways of swapping two digits in a (only in a , not b ) so that bitwise OR of these two numbers will be changed? In other words, let c be the bitwise OR of a and b , you need to find the number of ways of swapping two bits in a so that bitwise OR will not be equal to c . Note that binary numbers can contain leading zeros so that length of each number is exactly n . Bitwise OR is a binary operation. A result is a binary number which contains a one in each digit if there is a one in at least one of the two numbers. For example, 01010_2 OR 10011_2 = 11011_2 . Well, to your surprise, you are not Rudolf, and you don't need to help him ldots You are the security staff! Please find the number of ways of swapping two bits in a so that bitwise OR will be changed. The first line contains one integer n ( 2 <= q n <= q 10^5 ) -- the number of bits in each number. The second line contains a binary number a of length n . The third line contains a binary number b of length n . Print the number of ways to swap two bits in a so that bitwise OR will be changed. In the first sample, you can swap bits that have indexes (1, 4) , (2, 3) , (3, 4) , and (3, 5) . In the second example, you can swap bits that have indexes (1, 2) , (1, 3) , (2, 4) , (3, 4) , (3, 5) , and (3, 6) . "...

Tutorials

Разбор (англ.)

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
42094508 hexl B Aug. 25, 2018, 3:15 p.m. OK Clang++17 Diagnostics TESTS 23 31 0 1200
42072640 vjudge1 B Aug. 25, 2018, 2:12 a.m. OK Clang++17 Diagnostics TESTS 23 31 0 1200
42760670 vjudge5 B Sept. 11, 2018, 10:21 a.m. OK Clang++17 Diagnostics TESTS 23 31 0 1200
51420768 vivek_shah B March 17, 2019, 4:23 p.m. OK Clang++17 Diagnostics TESTS 23 78 14745600 1200
69187131 hos.lyric B Jan. 20, 2020, 12:20 p.m. OK D TESTS 23 30 4198400 1200
41804309 rr_ B Aug. 18, 2018, 8:32 p.m. OK D TESTS 23 31 4198400 1200
41360566 PAG B Aug. 8, 2018, 3:33 p.m. OK Delphi TESTS 23 46 3174400 1200
49400795 PhuongPeu B Feb. 3, 2019, 2:39 p.m. OK FPC TESTS 23 30 614400 1200
51584406 TShT B March 20, 2019, 3:44 p.m. OK FPC TESTS 23 31 1126400 1200
41583787 wushuhan B Aug. 14, 2018, 9:40 a.m. OK FPC TESTS 23 31 1126400 1200
41409205 __ShaW B Aug. 9, 2018, 6:49 p.m. OK FPC TESTS 23 31 1126400 1200
41372750 PiMat B Aug. 8, 2018, 6:34 p.m. OK FPC TESTS 23 31 1126400 1200
44680398 chaorenhaha B Oct. 22, 2018, 5:57 a.m. OK FPC TESTS 23 46 1126400 1200
42224127 chinahhy B Aug. 29, 2018, 12:34 a.m. OK FPC TESTS 23 46 1126400 1200
41615476 BattleCry B Aug. 15, 2018, 8:50 a.m. OK FPC TESTS 23 46 7987200 1200
41459733 Gompu123 B Aug. 11, 2018, 8:06 a.m. OK GNU C TESTS 23 30 204800 1200
41523906 xzjisme B Aug. 12, 2018, 10:46 a.m. OK GNU C TESTS 23 31 204800 1200
41528112 vjudge1 B Aug. 12, 2018, 1:04 p.m. OK GNU C TESTS 23 31 204800 1200
41527955 vjudge2 B Aug. 12, 2018, 12:59 p.m. OK GNU C TESTS 23 31 204800 1200
41439109 SaimaJST B Aug. 10, 2018, 5:02 p.m. OK GNU C TESTS 23 31 204800 1200
41406465 RenKai_Z B Aug. 9, 2018, 5:03 p.m. OK GNU C TESTS 23 31 204800 1200
41405674 kara42 B Aug. 9, 2018, 4:34 p.m. OK GNU C TESTS 23 31 204800 1200
41404053 egg23333 B Aug. 9, 2018, 3:29 p.m. OK GNU C TESTS 23 31 204800 1200
41369107 Busan2Line B Aug. 8, 2018, 4:34 p.m. OK GNU C TESTS 23 31 204800 1200
41365033 ddakjaaaaaaae B Aug. 8, 2018, 3:59 p.m. OK GNU C TESTS 23 31 204800 1200
41605625 vjudge4 B Aug. 15, 2018, 2:05 a.m. OK GNU C++ TESTS 23 15 0 1200
41398932 sdibt5 B Aug. 9, 2018, 12:36 p.m. OK GNU C++ TESTS 23 15 0 1200
41398152 sdibt5 B Aug. 9, 2018, 12:12 p.m. OK GNU C++ TESTS 23 15 512000 1200
41362873 Anderson_GR B Aug. 8, 2018, 3:45 p.m. OK GNU C++ TESTS 23 15 1024000 1200
42140884 vjudge4 B Aug. 27, 2018, 5:22 a.m. OK GNU C++ TESTS 23 30 0 1200
41428671 vjudge5 B Aug. 10, 2018, 11:07 a.m. OK GNU C++ TESTS 23 30 0 1200
42227229 d.j6082013 B Aug. 29, 2018, 3:47 a.m. OK GNU C++ TESTS 23 30 204800 1200
41558351 geyanlu B Aug. 13, 2018, 12:45 p.m. OK GNU C++ TESTS 23 30 204800 1200
41548730 Turky B Aug. 13, 2018, 7:01 a.m. OK GNU C++ TESTS 23 30 204800 1200
41447494 vjudge5 B Aug. 11, 2018, 1:40 a.m. OK GNU C++ TESTS 23 30 204800 1200
41366432 zhangthree B Aug. 8, 2018, 4:09 p.m. OK GNU C11 TESTS 23 30 204800 1200
59646397 Dream.to B Aug. 29, 2019, 6:02 a.m. OK GNU C11 TESTS 23 31 204800 1200
69097700 sinhadip21 B Jan. 19, 2020, 12:43 p.m. OK GNU C11 TESTS 23 31 204800 1200
66420576 Razvan2000f B Dec. 6, 2019, 6:44 p.m. OK GNU C11 TESTS 23 31 204800 1200
65269267 ratul_supertramp B Nov. 17, 2019, 6:47 p.m. OK GNU C11 TESTS 23 31 204800 1200
65269233 vjudge5 B Nov. 17, 2019, 6:45 p.m. OK GNU C11 TESTS 23 31 204800 1200
52824085 A1phaZ3r0 B April 16, 2019, 1:05 p.m. OK GNU C11 TESTS 23 31 204800 1200
52823610 IndianPirate B April 16, 2019, 12:54 p.m. OK GNU C11 TESTS 23 31 204800 1200
46648721 NoSoul B Dec. 5, 2018, 1 p.m. OK GNU C11 TESTS 23 31 204800 1200
42473477 dalek_cos B Sept. 4, 2018, 8:02 p.m. OK GNU C11 TESTS 23 31 204800 1200
41378541 acmlxc B Aug. 9, 2018, 12:12 a.m. OK GNU C++11 TESTS 23 15 204800 1200
41389493 PrimeMinister B Aug. 9, 2018, 7:43 a.m. OK GNU C++11 TESTS 23 30 0 1200
45314175 faizul B Nov. 5, 2018, 6:58 a.m. OK GNU C++11 TESTS 23 30 204800 1200
56619893 bagpipe B July 6, 2019, 11:33 a.m. OK GNU C++11 TESTS 23 30 204800 1200
41654325 gml B Aug. 16, 2018, 1:37 p.m. OK GNU C++11 TESTS 23 30 204800 1200
42305984 Billah_Kuet14 B Aug. 31, 2018, 11:17 a.m. OK GNU C++11 TESTS 23 30 204800 1200
41379566 glys B Aug. 9, 2018, 1:17 a.m. OK GNU C++11 TESTS 23 30 204800 1200
41448092 mizersy B Aug. 11, 2018, 2:01 a.m. OK GNU C++11 TESTS 23 30 204800 1200
41521835 ChiHong B Aug. 12, 2018, 9:29 a.m. OK GNU C++11 TESTS 23 30 204800 1200
41579836 Lested B Aug. 14, 2018, 7:30 a.m. OK GNU C++11 TESTS 23 30 204800 1200
41367764 dasper B Aug. 8, 2018, 4:21 p.m. OK GNU C++14 TESTS 23 15 204800 1200
41644713 kut_kjb1994 B Aug. 16, 2018, 7:55 a.m. OK GNU C++14 TESTS 23 15 204800 1200
42249175 nikitoz B Aug. 29, 2018, 5:17 p.m. OK GNU C++14 TESTS 23 15 204800 1200
49183132 ngw B Jan. 30, 2019, 3:43 a.m. OK GNU C++14 TESTS 23 15 409600 1200
54000615 luckys65 B May 11, 2019, 4:27 p.m. OK GNU C++14 TESTS 23 15 512000 1200
59905663 saranshbht B Sept. 2, 2019, 3:16 p.m. OK GNU C++14 TESTS 23 15 512000 1200
46441891 altruist B Dec. 1, 2018, 12:24 p.m. OK GNU C++14 TESTS 23 15 512000 1200
45562994 etman.x.x B Nov. 11, 2018, 12:48 p.m. OK GNU C++14 TESTS 23 15 512000 1200
42131117 g13 B Aug. 26, 2018, 6:40 p.m. OK GNU C++14 TESTS 23 15 512000 1200
41619628 lukomskiy B Aug. 15, 2018, 11:22 a.m. OK GNU C++14 TESTS 23 15 512000 1200
50046924 OvOb B Feb. 17, 2019, 6:24 a.m. OK GNU C++17 TESTS 23 15 102400 1200
50522393 zz212088 B Feb. 26, 2019, 10:06 a.m. OK GNU C++17 TESTS 23 15 204800 1200
41686544 schureedbad B Aug. 17, 2018, 2:32 p.m. OK GNU C++17 TESTS 23 15 204800 1200
41671535 Asher_S B Aug. 17, 2018, 5:27 a.m. OK GNU C++17 TESTS 23 15 204800 1200
41446744 vjudge4 B Aug. 11, 2018, 1:09 a.m. OK GNU C++17 TESTS 23 15 409600 1200
56531489 hack-it B July 4, 2019, 8 p.m. OK GNU C++17 TESTS 23 15 512000 1200
41537408 dasdull B Aug. 12, 2018, 6:53 p.m. OK GNU C++17 TESTS 23 15 512000 1200
42086901 NisTa B Aug. 25, 2018, 11:17 a.m. OK GNU C++17 TESTS 23 15 512000 1200
63120806 erfanaskari1 B Oct. 22, 2019, 11:10 a.m. OK GNU C++17 TESTS 23 15 512000 1200
51427588 vipsharmavip B March 17, 2019, 8:21 p.m. OK GNU C++17 TESTS 23 15 512000 1200
41684656 geohasby B Aug. 17, 2018, 1:16 p.m. OK GNU C++17 Diagnostics TESTS 23 1044 512000 1200
41384613 Yunqiqi B Aug. 9, 2018, 4:56 a.m. OK GNU C++17 Diagnostics TESTS 23 1122 2048000 1200
41382276 shiqi B Aug. 9, 2018, 3:06 a.m. OK GNU C++17 Diagnostics TESTS 23 1482 4505600 1200
41525322 vjudge2 B Aug. 12, 2018, 11:38 a.m. OK GNU C++17 Diagnostics TESTS 23 1575 1024000 1200
41388583 Asurudo B Aug. 9, 2018, 7:17 a.m. OK GNU C++17 Diagnostics TESTS 23 1606 5632000 1200
41568519 alexsotocx B Aug. 13, 2018, 7:11 p.m. OK Go TESTS 23 46 1228800 1200
41568216 alexsotocx B Aug. 13, 2018, 6:58 p.m. OK Go TESTS 23 452 1331200 1200
42068862 fc-lib-xyz B Aug. 24, 2018, 9:40 p.m. OK Go TESTS 23 452 1331200 1200
41680654 otter B Aug. 17, 2018, 10:44 a.m. OK Haskell TESTS 23 46 11776000 1200
41372136 danielfleischman B Aug. 8, 2018, 6:11 p.m. OK Haskell TESTS 23 46 12800000 1200
58109148 Vatsal53 B Aug. 1, 2019, 6:14 a.m. OK Java 8 TESTS 23 108 0 1200
46565840 onishgarg101 B Dec. 3, 2018, 11:03 p.m. OK Java 8 TESTS 23 109 0 1200
41375431 isku B Aug. 8, 2018, 8:19 p.m. OK Java 8 TESTS 23 109 0 1200
56946733 Sleep B July 12, 2019, 10:56 p.m. OK Java 8 TESTS 23 124 0 1200
47233973 HatemMorgan B Dec. 18, 2018, 7:26 p.m. OK Java 8 TESTS 23 124 0 1200
44078274 4mda4mda B Oct. 10, 2018, 1:56 p.m. OK Java 8 TESTS 23 124 0 1200
44066174 donli B Oct. 10, 2018, 9:27 a.m. OK Java 8 TESTS 23 124 0 1200
60406683 StayAwayFromBitches B Sept. 11, 2019, 6:59 p.m. OK Java 8 TESTS 23 124 0 1200
58791133 vvenkai B Aug. 14, 2019, 2:27 a.m. OK Java 8 TESTS 23 124 0 1200
48904391 formalist B Jan. 24, 2019, 7:38 p.m. OK Java 8 TESTS 23 124 0 1200
41500003 wbars B Aug. 11, 2018, 4:41 p.m. OK Kotlin TESTS 23 186 102400 1200
59890968 david_varela B Sept. 2, 2019, 10:21 a.m. OK Kotlin TESTS 23 186 204800 1200
41435998 andrew.albert B Aug. 10, 2018, 3:09 p.m. OK Kotlin TESTS 23 187 0 1200
41402775 Demin B Aug. 9, 2018, 2:41 p.m. OK Kotlin TESTS 23 218 0 1200
44095522 nemars B Oct. 10, 2018, 11:35 p.m. OK Mono C# TESTS 23 46 716800 1200
54763809 og.kostya B May 28, 2019, 4:33 p.m. OK Mono C# TESTS 23 61 716800 1200
41505652 treasuryonly B Aug. 11, 2018, 8:20 p.m. OK Mono C# TESTS 23 61 716800 1200
41360434 Evgenii_Stepanov B Aug. 8, 2018, 3:33 p.m. OK Mono C# TESTS 23 61 716800 1200
41376956 jainchethan87 B Aug. 8, 2018, 9:50 p.m. OK Mono C# TESTS 23 61 1126400 1200
47811395 Skndr801 B Jan. 1, 2019, 11:34 a.m. OK Mono C# TESTS 23 62 1945600 1200
41376131 jainchethan87 B Aug. 8, 2018, 9 p.m. OK Mono C# TESTS 23 62 5529600 1200
41470458 greenkirill B Aug. 11, 2018, 1:14 p.m. OK Mono C# TESTS 23 77 716800 1200
45589348 vjudge5 B Nov. 12, 2018, 11:22 a.m. OK MS C++ TESTS 23 30 204800 1200
57265387 vjudge1 B July 18, 2019, 6:56 a.m. OK MS C++ TESTS 23 30 204800 1200
52443358 vjudge3 B April 7, 2019, 7:08 a.m. OK MS C++ TESTS 23 30 204800 1200
46195347 vjudge1 B Nov. 25, 2018, 8 a.m. OK MS C++ TESTS 23 30 204800 1200
46189496 vjudge1 B Nov. 25, 2018, 3:23 a.m. OK MS C++ TESTS 23 30 204800 1200
41378310 2017030801054 B Aug. 8, 2018, 11:51 p.m. OK MS C++ TESTS 23 30 409600 1200
46195135 vjudge3 B Nov. 25, 2018, 7:54 a.m. OK MS C++ TESTS 23 30 409600 1200
41383817 Mythical B Aug. 9, 2018, 4:12 a.m. OK MS C++ TESTS 23 30 409600 1200
46202432 vjudge3 B Nov. 25, 2018, 12:17 p.m. OK MS C++ TESTS 23 30 409600 1200
48367912 vjudge1 B Jan. 14, 2019, 12:50 a.m. OK MS C++ TESTS 23 30 1024000 1200
63898070 shebao B Oct. 31, 2019, 3:30 a.m. OK MS C++ 2017 TESTS 23 31 204800 1200
63555453 shio B Oct. 27, 2019, 12:43 p.m. OK MS C++ 2017 TESTS 23 31 614400 1200
57168415 vjudge1 B July 17, 2019, 1:24 a.m. OK MS C++ 2017 TESTS 23 31 1126400 1200
41371408 JhonTorres B Aug. 8, 2018, 5:48 p.m. OK Node.js TESTS 23 171 2560000 1200
41384748 brytnispiers B Aug. 9, 2018, 5:04 a.m. OK Node.js TESTS 23 342 13414400 1200
41384768 brytnispiers B Aug. 9, 2018, 5:05 a.m. OK Node.js TESTS 23 342 13414400 1200
41618385 intermet B Aug. 15, 2018, 10:41 a.m. OK Ocaml TESTS 23 233 9523200 1200
41382959 sxrcodeforces B Aug. 9, 2018, 3:33 a.m. OK PascalABC.NET TESTS 23 61 3993600 1200
41394847 fruha B Aug. 9, 2018, 10:28 a.m. OK PascalABC.NET TESTS 23 62 512000 1200
41367613 veta B Aug. 8, 2018, 4:20 p.m. OK PascalABC.NET TESTS 23 62 921600 1200
41590152 gruntov_dima B Aug. 14, 2018, 1:37 p.m. OK PascalABC.NET TESTS 23 62 921600 1200
41382713 yesseyev.mt B Aug. 9, 2018, 3:22 a.m. OK PHP TESTS 23 61 12185600 1200
41365886 yesseyev.mt B Aug. 8, 2018, 4:05 p.m. OK PHP TESTS 23 61 18944000 1200
46125615 mayakin B Nov. 23, 2018, 6:56 p.m. OK PHP TESTS 23 62 0 1200
45337962 noob77777 B Nov. 5, 2018, 6:43 p.m. OK PyPy 2 TESTS 23 140 819200 1200
68636401 vjudge4 B Jan. 12, 2020, 5:59 a.m. OK PyPy 2 TESTS 23 140 819200 1200
41361958 abhigyank B Aug. 8, 2018, 3:40 p.m. OK PyPy 2 TESTS 23 155 819200 1200
68967911 YESMAths B Jan. 17, 2020, 5:51 a.m. OK PyPy 2 TESTS 23 155 819200 1200
42668824 wewakeprasad FatherofBenoni shubhu1596 B Sept. 8, 2018, 9:43 a.m. OK PyPy 2 TESTS 23 155 819200 1200
42234875 D_J_Z B Aug. 29, 2018, 8:57 a.m. OK PyPy 2 TESTS 23 155 819200 1200
41618590 abhigyank B Aug. 15, 2018, 10:47 a.m. OK PyPy 2 TESTS 23 155 819200 1200
42287184 akshay125 B Aug. 30, 2018, 5:59 p.m. OK PyPy 2 TESTS 23 155 921600 1200
41588226 supachai_pay B Aug. 14, 2018, 12:38 p.m. OK PyPy 2 TESTS 23 170 819200 1200
57111814 tanu38 B July 15, 2019, 5:49 p.m. OK PyPy 3 TESTS 23 140 2560000 1200
49863332 SarveshDubey B Feb. 13, 2019, 10:49 a.m. OK PyPy 3 TESTS 23 155 2150400 1200
47382773 omarnvidia B Dec. 22, 2018, 11:51 p.m. OK PyPy 3 TESTS 23 155 2252800 1200
41534345 Zombarian B Aug. 12, 2018, 4:33 p.m. OK PyPy 3 TESTS 23 155 2252800 1200
41441117 mnislam01 B Aug. 10, 2018, 6:23 p.m. OK PyPy 3 TESTS 23 155 2252800 1200
41402417 mFascinet B Aug. 9, 2018, 2:28 p.m. OK PyPy 3 TESTS 23 155 2252800 1200
63653467 vjudge1 B Oct. 28, 2019, 12:03 p.m. OK PyPy 3 TESTS 23 155 2867200 1200
41386450 MajAK B Aug. 9, 2018, 6:12 a.m. OK PyPy 3 TESTS 23 171 2150400 1200
58313592 kchau B Aug. 5, 2019, 1:35 a.m. OK PyPy 3 TESTS 23 171 2560000 1200
69912448 phlk B Jan. 31, 2020, 3:47 p.m. OK PyPy 3 TESTS 23 171 2662400 1200
41402484 Mulx10 B Aug. 9, 2018, 2:30 p.m. OK Python 2 TESTS 23 186 307200 1200
41390322 franckmy B Aug. 9, 2018, 8:08 a.m. OK Python 2 TESTS 23 187 307200 1200
41603422 vjudge3 B Aug. 14, 2018, 10:43 p.m. OK Python 2 TESTS 23 187 1843200 1200
41372417 sunakshi159 B Aug. 8, 2018, 6:22 p.m. OK Python 2 TESTS 23 187 2969600 1200
44164824 onextdg B Oct. 11, 2018, 11:57 p.m. OK Python 2 TESTS 23 202 307200 1200
41537006 morgo B Aug. 12, 2018, 6:32 p.m. OK Python 2 TESTS 23 202 1843200 1200
41393792 tnowakow B Aug. 9, 2018, 9:47 a.m. OK Python 2 TESTS 23 202 1843200 1200
41359404 mihir_94 B Aug. 8, 2018, 3:29 p.m. OK Python 2 TESTS 23 202 1843200 1200
41603427 vjudge4 B Aug. 14, 2018, 10:44 p.m. OK Python 2 TESTS 23 202 1945600 1200
41410253 cycle B Aug. 9, 2018, 7:38 p.m. OK Python 2 TESTS 23 202 5939200 1200
41371177 lifefeeder B Aug. 8, 2018, 5:44 p.m. OK Python 3 TESTS 23 109 819200 1200
62680213 KATAYPEPE B Oct. 16, 2019, 12:38 p.m. OK Python 3 TESTS 23 124 819200 1200
51912231 LintuStorm B March 27, 2019, 6:50 p.m. OK Python 3 TESTS 23 139 614400 1200
44843675 ashok123 B Oct. 25, 2018, 1:41 p.m. OK Python 3 TESTS 23 140 512000 1200
43113649 luis_palomino B Sept. 20, 2018, 12:46 p.m. OK Python 3 TESTS 23 140 512000 1200
42205391 gotsense B Aug. 28, 2018, 11:18 a.m. OK Python 3 TESTS 23 140 512000 1200
41515603 lwy0007123 B Aug. 12, 2018, 5:52 a.m. OK Python 3 TESTS 23 140 512000 1200
41363826 SergiiKo B Aug. 8, 2018, 3:51 p.m. OK Python 3 TESTS 23 140 512000 1200
52765230 lIn_nIl B April 15, 2019, 2:31 a.m. OK Python 3 TESTS 23 140 614400 1200
49307803 _itachi_uchiha B Feb. 1, 2019, 6:28 a.m. OK Python 3 TESTS 23 140 614400 1200
41470399 kichi B Aug. 11, 2018, 1:12 p.m. OK Rust TESTS 23 31 512000 1200
63663811 sansen B Oct. 28, 2019, 2:39 p.m. OK Rust TESTS 23 31 1536000 1200
63650487 vjudge4 B Oct. 28, 2019, 11:14 a.m. OK Rust TESTS 23 31 1536000 1200
41360508 xDEMONx B Aug. 8, 2018, 3:33 p.m. OK Scala TESTS 23 545 0 1200

remove filters

Back to search problems