Codeforces Round 515 (Div. 3)

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
1066 Codeforces Round 515 (Div. 3) FINISHED False 7200 192468299 Oct. 12, 2018, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 6188 ) E Binary Numbers AND Sum PROGRAMMING data structures implementation math 1700

B'You are given two huge binary integer numbers a and b of lengths n and m respectively. You will repeat the following process: if b > 0 , then add to the answer the value a~ &~ b and divide b by 2 rounding down (i.e. remove the last digit of b ), and repeat the process again, otherwise stop the process. The value a~ &~ b means bitwise AND of a and b . Your task is to calculate the answer modulo 998244353 . Note that you should add the value a~ &~ b to the answer in decimal notation, not in binary. So your task is to calculate the answer in decimal notation. For example, if a = 1010_2~ (10_{10}) and b = 1000_2~ (8_{10}) , then the value a~ &~ b will be equal to 8 , not to 1000 . The first line of the input contains two integers n and m ( 1 <= n, m <= 2 cdot 10^5 ) -- the length of a and the length of b correspondingly. The second line of the input contains one huge integer a . It is guaranteed that this number consists of exactly n zeroes and ones and the first digit is always 1 . The third line of the input contains one huge integer b . It is guaranteed that this number consists of exactly m zeroes and ones and the first digit is always 1 . Print the answer to this problem in decimal notation modulo 998244353 . The algorithm for the first example: So the answer is 8 + 2 + 2 + 0 = 12 . The algorithm for the second example: So the answer is 1 + 8 + 1 + 0 + 1 = 11 . '...

Tutorials

62419

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
44281893 yafngzh E Oct. 14, 2018, 5:20 a.m. OK Clang++17 Diagnostics TESTS 26 109 15769600 1700
44290241 Kouei E Oct. 14, 2018, 9:36 a.m. OK Clang++17 Diagnostics TESTS 26 124 15564800 1700
44290194 Kouei E Oct. 14, 2018, 9:34 a.m. OK Clang++17 Diagnostics TESTS 26 139 15564800 1700
44252288 cpy E Oct. 13, 2018, 10:59 a.m. OK D TESTS 26 31 4198400 1700
44260623 ruban E Oct. 13, 2018, 2:19 p.m. OK Delphi TESTS 26 108 9728000 1700
44763160 njsfdxfszx59 E Oct. 24, 2018, 8:19 a.m. OK FPC TESTS 26 46 1024000 1700
44841161 vdanh7277 E Oct. 25, 2018, 12:49 p.m. OK FPC TESTS 26 46 3481600 1700
45347242 luogu_bot3 E Nov. 6, 2018, 4:35 a.m. OK FPC TESTS 26 46 32153600 1700
45136971 Dawn_Chase E Oct. 31, 2018, 12:47 p.m. OK FPC TESTS 26 62 64102400 1700
44692001 vjudge2 E Oct. 22, 2018, 12:32 p.m. OK FPC TESTS 26 561 5120000 1700
44691988 luogu_bot4 E Oct. 22, 2018, 12:32 p.m. OK FPC TESTS 26 561 5120000 1700
45664042 DedMartyn E Nov. 13, 2018, 7:25 a.m. OK GNU C11 TESTS 26 31 1228800 1700
44817213 MrLolthe1st E Oct. 24, 2018, 10:16 p.m. OK GNU C11 TESTS 26 46 1843200 1700
44349390 pma E Oct. 15, 2018, 9:14 a.m. OK GNU C11 TESTS 26 62 1228800 1700
44737306 vjudge3 E Oct. 23, 2018, 1:18 p.m. OK GNU C11 TESTS 26 78 1228800 1700
44595804 suheyin E Oct. 20, 2018, 12:29 p.m. OK GNU C++11 TESTS 26 30 2048000 1700
54091520 vjudge2 E May 14, 2019, 11:03 a.m. OK GNU C++11 TESTS 26 30 2355200 1700
44845428 xish E Oct. 25, 2018, 2:18 p.m. OK GNU C++11 TESTS 26 31 204800 1700
44254860 markotee E Oct. 13, 2018, 11:57 a.m. OK GNU C++11 TESTS 26 31 409600 1700
44254568 markotee E Oct. 13, 2018, 11:50 a.m. OK GNU C++11 TESTS 26 31 409600 1700
44227336 mouse_wireless E Oct. 12, 2018, 8:22 p.m. OK GNU C++11 TESTS 26 31 409600 1700
44381528 PinesL E Oct. 16, 2018, 4:12 a.m. OK GNU C++11 TESTS 26 31 409600 1700
44409291 vjudge2 E Oct. 16, 2018, 4:06 p.m. OK GNU C++11 TESTS 26 31 409600 1700
45501505 Sunshine_Hu E Nov. 10, 2018, 7:53 a.m. OK GNU C++11 TESTS 26 31 409600 1700
45541697 michal2000 E Nov. 10, 2018, 7:50 p.m. OK GNU C++11 TESTS 26 31 409600 1700
44749199 OrionChocoPie E Oct. 23, 2018, 6:38 p.m. OK GNU C++14 TESTS 26 15 716800 1700
44248346 L0u1Za E Oct. 13, 2018, 9:32 a.m. OK GNU C++14 TESTS 26 15 716800 1700
44322388 d-xiang-ha E Oct. 14, 2018, 2:38 p.m. OK GNU C++14 TESTS 26 15 3993600 1700
44232803 chnk58binh E Oct. 13, 2018, 1:58 a.m. OK GNU C++14 TESTS 26 15 8908800 1700
44964889 brunomont E Oct. 27, 2018, 6:37 p.m. OK GNU C++14 TESTS 26 30 409600 1700
45433705 kumalimak E Nov. 8, 2018, 6:29 a.m. OK GNU C++14 TESTS 26 30 716800 1700
55509942 Farabi E June 12, 2019, 9:10 p.m. OK GNU C++14 TESTS 26 30 819200 1700
44375677 eagle93 E Oct. 15, 2018, 9:14 p.m. OK GNU C++14 TESTS 26 30 819200 1700
45166146 DovydasVad E Nov. 1, 2018, 11:11 a.m. OK GNU C++14 TESTS 26 30 819200 1700
53302757 IngaleAnkur10 E April 25, 2019, 10:31 p.m. OK GNU C++14 TESTS 26 30 819200 1700
68494309 frangl E Jan. 10, 2020, 12:51 p.m. OK GNU C++17 TESTS 26 15 819200 1700
53455306 giaosudauto E April 28, 2019, 1:51 a.m. OK GNU C++17 TESTS 26 15 819200 1700
46283298 vjudge1 E Nov. 27, 2018, 2:33 p.m. OK GNU C++17 TESTS 26 15 10035200 1700
44536844 17110581098 E Oct. 19, 2018, 9:21 a.m. OK GNU C++17 TESTS 26 30 614400 1700
46516326 fakhoury E Dec. 2, 2018, 4:32 p.m. OK GNU C++17 TESTS 26 30 819200 1700
57855580 kenechi E July 27, 2019, 2:55 p.m. OK GNU C++17 TESTS 26 30 819200 1700
44425681 lklee E Oct. 17, 2018, 4:05 a.m. OK GNU C++17 TESTS 26 30 1024000 1700
48423850 cprayer E Jan. 15, 2019, 1:59 p.m. OK GNU C++17 TESTS 26 30 1024000 1700
44458938 dagon E Oct. 17, 2018, 7:19 p.m. OK GNU C++17 TESTS 26 30 1126400 1700
44253032 abhinav3010 E Oct. 13, 2018, 11:15 a.m. OK GNU C++17 TESTS 26 30 1126400 1700
49224199 dongy E Jan. 30, 2019, 9:09 p.m. OK Go TESTS 26 31 716800 1700
49820821 ricklee666666 E Feb. 12, 2019, 8:46 a.m. OK Go TESTS 26 46 716800 1700
44256821 Marii E Oct. 13, 2018, 12:40 p.m. OK Go TESTS 26 109 6860800 1700
69858041 viajero E Jan. 30, 2020, 5:35 p.m. OK Java 11 TESTS 26 218 0 1700
69904720 GiantTornado E Jan. 31, 2020, 1:51 p.m. OK Java 11 TESTS 26 311 0 1700
69903520 GiantTornado E Jan. 31, 2020, 1:36 p.m. OK Java 11 TESTS 26 311 0 1700
66657270 bleh0.5 E Dec. 12, 2019, 12:50 a.m. OK Java 11 TESTS 26 327 0 1700
66814521 bakekaga E Dec. 14, 2019, 5:01 a.m. OK Java 11 TESTS 26 404 0 1700
44276882 4mda4mda E Oct. 13, 2018, 10:46 p.m. OK Java 8 TESTS 26 108 0 1700
51220778 rishz E March 12, 2019, 12:23 p.m. OK Java 8 TESTS 26 109 0 1700
49537010 mikkk E Feb. 6, 2019, 4:28 p.m. OK Java 8 TESTS 26 124 0 1700
49373591 poiuytrewq E Feb. 2, 2019, 6:38 p.m. OK Java 8 TESTS 26 124 0 1700
54359632 Hemose E May 18, 2019, 7:41 p.m. OK Java 8 TESTS 26 124 0 1700
62382129 elkadymohammed01 E Oct. 11, 2019, 7:33 p.m. OK Java 8 TESTS 26 124 0 1700
58557096 Blastman E Aug. 11, 2019, 2:51 a.m. OK Java 8 TESTS 26 124 0 1700
51467301 tiagoss2005 E March 19, 2019, 3:01 a.m. OK Java 8 TESTS 26 124 0 1700
50297204 ZeyadKhattab E Feb. 21, 2019, 9:39 p.m. OK Java 8 TESTS 26 124 0 1700
50297192 ZeyadKhattab E Feb. 21, 2019, 9:37 p.m. OK Java 8 TESTS 26 124 0 1700
44898542 witchu E Oct. 26, 2018, 7:52 a.m. OK Mono C# TESTS 26 62 1536000 1700
46110233 treasuryonly E Nov. 23, 2018, 11:49 a.m. OK Mono C# TESTS 26 62 3072000 1700
44257906 azukun E Oct. 13, 2018, 1:07 p.m. OK Mono C# TESTS 26 62 6656000 1700
44256684 Coder_D E Oct. 13, 2018, 12:36 p.m. OK Mono C# TESTS 26 77 6656000 1700
44255570 Coder_D E Oct. 13, 2018, 12:13 p.m. OK Mono C# TESTS 26 77 6656000 1700
44458881 Roverandom E Oct. 17, 2018, 7:17 p.m. OK Mono C# TESTS 26 77 9523200 1700
44348372 omikad E Oct. 15, 2018, 8:39 a.m. OK Mono C# TESTS 26 77 10752000 1700
68841323 mban259 E Jan. 15, 2020, 5:53 a.m. OK Mono C# TESTS 26 155 9216000 1700
48060081 bHemp E Jan. 7, 2019, 2:37 p.m. OK Mono C# TESTS 26 280 8499200 1700
44240095 regitiger98 E Oct. 13, 2018, 6:36 a.m. OK MS C++ TESTS 26 31 1024000 1700
44240166 regitiger98 E Oct. 13, 2018, 6:38 a.m. OK MS C++ TESTS 26 31 1024000 1700
44492574 scorpiowf E Oct. 18, 2018, 3:10 p.m. OK MS C++ TESTS 26 31 1228800 1700
51064282 vjudge3 E March 9, 2019, 5:07 a.m. OK MS C++ TESTS 26 31 1228800 1700
51206975 vjudge2 E March 12, 2019, 5:34 a.m. OK MS C++ TESTS 26 31 1228800 1700
51063642 vjudge3 E March 9, 2019, 4:46 a.m. OK MS C++ TESTS 26 31 1228800 1700
44216699 youx E Oct. 12, 2018, 4:30 p.m. OK MS C++ TESTS 26 31 1433600 1700
46638511 jernchr11 E Dec. 5, 2018, 8:16 a.m. OK MS C++ TESTS 26 31 1638400 1700
44239920 regitiger98 E Oct. 13, 2018, 6:33 a.m. OK MS C++ TESTS 26 31 1740800 1700
51289419 vjudge2 E March 14, 2019, 9:17 a.m. OK MS C++ TESTS 26 31 1843200 1700
58066629 YaMi506 E July 31, 2019, 9:08 a.m. OK MS C++ 2017 TESTS 26 46 819200 1700
68162010 AleksanderBalobanov E Jan. 4, 2020, 11:18 a.m. OK MS C++ 2017 TESTS 26 46 3276800 1700
51060794 work_hard. E March 9, 2019, 2:48 a.m. OK MS C++ 2017 TESTS 26 77 1638400 1700
55234816 hwangganzi E June 7, 2019, 7:48 a.m. OK MS C++ 2017 TESTS 26 109 4812800 1700
58366670 yorky E Aug. 6, 2019, 4:25 a.m. OK MS C++ 2017 TESTS 26 171 819200 1700
44228028 sk0 E Oct. 12, 2018, 8:48 p.m. OK Ocaml TESTS 26 109 16179200 1700
52059961 mm944 E March 30, 2019, 11:19 p.m. OK PascalABC.NET TESTS 26 343 1740800 1700
46230375 akifpatel E Nov. 25, 2018, 8:27 p.m. OK PyPy 2 TESTS 26 140 3584000 1700
50802750 c1729 E March 5, 2019, 2:04 a.m. OK PyPy 2 TESTS 26 140 3788800 1700
50802841 c1729 E March 5, 2019, 2:12 a.m. OK PyPy 2 TESTS 26 155 6144000 1700
46740073 figdan E Dec. 8, 2018, 1:11 a.m. OK PyPy 2 TESTS 26 155 8294400 1700
46740075 vjudge5 E Dec. 8, 2018, 1:11 a.m. OK PyPy 2 TESTS 26 155 8396800 1700
60035982 soumyasarkar1998 E Sept. 4, 2019, 4:47 p.m. OK PyPy 2 TESTS 26 217 2355200 1700
44417699 FatherofBenoni E Oct. 16, 2018, 8 p.m. OK PyPy 2 TESTS 26 373 13414400 1700
44217081 phantomhive E Oct. 12, 2018, 4:32 p.m. OK PyPy 2 TESTS 26 389 2355200 1700
44226856 Pratik_2106 E Oct. 12, 2018, 8:03 p.m. OK PyPy 2 TESTS 26 405 12492800 1700
50802666 c1729 E March 5, 2019, 1:55 a.m. OK PyPy 2 TESTS 26 420 13004800 1700
44247764 tranphuminhbkhn E Oct. 13, 2018, 9:20 a.m. OK PyPy 3 TESTS 26 155 4198400 1700
54715736 aleonov E May 27, 2019, 1:10 p.m. OK PyPy 3 TESTS 26 170 4198400 1700
64633843 gnomus042 E Nov. 10, 2019, 11 a.m. OK PyPy 3 TESTS 26 171 3891200 1700
45233349 Firepaw E Nov. 3, 2018, 8:09 a.m. OK PyPy 3 TESTS 26 171 6348800 1700
50631896 vjudge4 E March 1, 2019, 9:34 a.m. OK PyPy 3 TESTS 26 171 8601600 1700
44363576 Kelly E Oct. 15, 2018, 3:37 p.m. OK PyPy 3 TESTS 26 186 4096000 1700
66643385 Dmitry10005 E Dec. 11, 2019, 3:40 p.m. OK PyPy 3 TESTS 26 186 4198400 1700
44285134 cgfs10000 E Oct. 14, 2018, 7:04 a.m. OK PyPy 3 TESTS 26 186 9625600 1700
44424726 qb2008 E Oct. 17, 2018, 3:14 a.m. OK PyPy 3 TESTS 26 187 8704000 1700
49650989 zhaoy1ping E Feb. 9, 2019, 7:37 a.m. OK PyPy 3 TESTS 26 202 8601600 1700
46832363 vjudge4 E Dec. 9, 2018, 10:56 p.m. OK Python 2 TESTS 26 312 716800 1700
44219884 shehebe E Oct. 12, 2018, 4:57 p.m. OK Python 2 TESTS 26 342 5939200 1700
44277074 EoinDavey E Oct. 13, 2018, 11:03 p.m. OK Python 2 TESTS 26 373 7065600 1700
44350574 raven_47 E Oct. 15, 2018, 9:55 a.m. OK Python 2 TESTS 26 373 7270400 1700
44278321 biltharesatyendra E Oct. 14, 2018, 1:11 a.m. OK Python 2 TESTS 26 389 8499200 1700
45422651 kunalk E Nov. 7, 2018, 6:22 p.m. OK Python 2 TESTS 26 420 13824000 1700
44246330 mihir_94 E Oct. 13, 2018, 8:49 a.m. OK Python 2 TESTS 26 499 7577600 1700
44253225 ManasG E Oct. 13, 2018, 11:19 a.m. OK Python 2 TESTS 26 732 16486400 1700
44223008 r57shell E Oct. 12, 2018, 6:04 p.m. OK Python 3 TESTS 26 249 1024000 1700
44219924 fikr E Oct. 12, 2018, 4:57 p.m. OK Python 3 TESTS 26 280 1024000 1700
44223536 lamsd E Oct. 12, 2018, 6:20 p.m. OK Python 3 TESTS 26 280 7168000 1700
44217109 Laida E Oct. 12, 2018, 4:32 p.m. OK Python 3 TESTS 26 296 7065600 1700
44613606 freemax E Oct. 20, 2018, 10:01 p.m. OK Python 3 TESTS 26 296 7987200 1700
44486563 eugalt E Oct. 18, 2018, 12:45 p.m. OK Python 3 TESTS 26 296 8089600 1700
44710660 Himanshuteli E Oct. 22, 2018, 6:41 p.m. OK Python 3 TESTS 26 327 1024000 1700
44463117 tilara E Oct. 17, 2018, 10:18 p.m. OK Python 3 TESTS 26 327 2764800 1700
44447021 KanhuKeNanu E Oct. 17, 2018, 2:19 p.m. OK Python 3 TESTS 26 373 1024000 1700
59180356 kushagr17062 E Aug. 20, 2019, 4:33 p.m. OK Python 3 TESTS 26 389 1126400 1700
44227899 clupasq E Oct. 12, 2018, 8:44 p.m. OK Ruby TESTS 26 249 31641600 1700
44428793 sparshgunner12 E Oct. 17, 2018, 6:27 a.m. OK Rust TESTS 26 31 1024000 1700
44428654 sparshgunner12 E Oct. 17, 2018, 6:22 a.m. OK Rust TESTS 26 46 1024000 1700

remove filters

Back to search problems