Codeforces Round 307 (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
551 Codeforces Round 307 (Div. 2) FINISHED False 7200 303484504 June 12, 2015, 4:45 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 1990 ) D GukiZ and Binary Operations PROGRAMMING combinatorics implementation math matrices number theory 2400

B"We all know that GukiZ often plays with arrays. Now he is thinking about this problem: how many arrays a, of length n, with non-negative elements strictly less then 2l meet the following condition: ? Here operation means bitwise AND (in Pascal it is equivalent to and, in C/C++/Java/Python it is equivalent to &), operation means bitwise OR (in Pascal it is equivalent to , in C/C++/Java/Python it is equivalent to |). Because the answer can be quite large, calculate it modulo m. This time GukiZ hasn't come up with solution, and needs you to help him! First and the only line of input contains four integers n, k, l, m (2 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x891018, 0 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89k xe2 x80 x89 xe2 x89 xa4 xe2 x80 x891018, 0 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89l xe2 x80 x89 xe2 x89 xa4 xe2 x80 x8964, 1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89m xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89109 xe2 x80 x89+ xe2 x80 x897). In the single line print the number of arrays satisfying the condition above modulo m. In the first sample, satisfying arrays are {1, xe2 x80 x891}, xe2 x80 x89{3, xe2 x80 x891}, xe2 x80 x89{1, xe2 x80 x893}. In the second sample, only satisfying array is {1, xe2 x80 x891}. In the third sample, satisfying arrays are {0, xe2 x80 x893, xe2 x80 x893}, xe2 x80 x89{1, xe2 x80 x893, xe2 x80 x892}, xe2 x80 x89{1, xe2 x80 x893, xe2 x80 x893}, xe2 x80 x89{2, xe2 x80 x893, xe2 x80 x891}, xe2 x80 x89{2, xe2 x80 x893, xe2 x80 x893}, xe2 x80 x89{3, xe2 x80 x893, xe2 x80 x890}, xe2 x80 x89{3, xe2 x80 x893, xe2 x80 x891}, xe2 x80 x89{3, xe2 x80 x893, xe2 x80 x892}, xe2 x80 x89{3, xe2 x80 x893, xe2 x80 x893}."...

Tutorials

Tutorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
60061500 czdb D Sept. 5, 2019, 7:13 a.m. OK Clang++17 Diagnostics TESTS 70 46 0 2400
11812189 dr.ikros D June 28, 2015, 12:44 a.m. OK D TESTS 70 15 0 2400
11629868 ruban D June 18, 2015, 9:10 a.m. OK Delphi TESTS 70 31 26931200 2400
33150777 AsahiKasugano D Dec. 12, 2017, 10:02 a.m. OK FPC TESTS 70 30 1638400 2400
11922206 chaiyt D July 4, 2015, 11:46 a.m. OK FPC TESTS 70 31 0 2400
27793808 Septher D June 15, 2017, 12:50 p.m. OK GNU C++ TESTS 70 15 0 2400
27264161 vjudge1 D May 21, 2017, 9:58 a.m. OK GNU C++ TESTS 70 15 0 2400
31164675 vjudge2 D Oct. 9, 2017, 10:42 a.m. OK GNU C++ TESTS 70 15 0 2400
27264117 vjudge4 D May 21, 2017, 9:56 a.m. OK GNU C++ TESTS 70 15 0 2400
26983125 killjee D May 9, 2017, 7:21 p.m. OK GNU C++ TESTS 70 15 0 2400
22095160 vjudge3 D Nov. 7, 2016, 1:27 p.m. OK GNU C++ TESTS 70 15 0 2400
20915879 ayush24 D Sept. 25, 2016, 9:34 p.m. OK GNU C++ TESTS 70 15 0 2400
20414642 zhan8855 D Sept. 6, 2016, 8:15 a.m. OK GNU C++ TESTS 70 15 0 2400
20406804 pooo D Sept. 5, 2016, 8:05 p.m. OK GNU C++ TESTS 70 15 0 2400
27826076 jimmy61209 D June 16, 2017, 1:26 p.m. OK GNU C++ TESTS 70 15 0 2400
61230211 rainboy D Sept. 24, 2019, 4:22 p.m. OK GNU C11 TESTS 70 31 0 2400
31164702 liuyuqiang D Oct. 9, 2017, 10:45 a.m. OK GNU C++11 TESTS 70 15 0 2400
31067210 Etta D Oct. 6, 2017, 1:35 p.m. OK GNU C++11 TESTS 70 15 0 2400
30804898 HappyEnd D Sept. 28, 2017, 12:48 p.m. OK GNU C++11 TESTS 70 15 0 2400
30338856 Mikaeel D Sept. 14, 2017, 9:38 p.m. OK GNU C++11 TESTS 70 15 0 2400
31273319 I_always_love_cc D Oct. 13, 2017, noon OK GNU C++11 TESTS 70 15 0 2400
29505418 saeed_odak D Aug. 16, 2017, 12:44 p.m. OK GNU C++11 TESTS 70 15 0 2400
27532965 Reem D June 2, 2017, 11:51 p.m. OK GNU C++11 TESTS 70 15 0 2400
27417986 Ehsan22 D May 28, 2017, 6:17 p.m. OK GNU C++11 TESTS 70 15 0 2400
23007445 TamimIqbal D Dec. 15, 2016, 1:32 p.m. OK GNU C++11 TESTS 70 15 0 2400
29858308 gerardd D Aug. 29, 2017, 5:08 a.m. OK GNU C++11 TESTS 70 15 0 2400
30102772 I-Love-Islam D Sept. 5, 2017, 2:49 p.m. OK GNU C++14 TESTS 70 15 0 2400
31176822 Aviously D Oct. 9, 2017, 8:04 p.m. OK GNU C++14 TESTS 70 15 0 2400
31176820 Aviously D Oct. 9, 2017, 8:04 p.m. OK GNU C++14 TESTS 70 15 0 2400
31051370 3015218054 D Oct. 6, 2017, 2:55 a.m. OK GNU C++14 TESTS 70 15 0 2400
31035503 chien.than D Oct. 5, 2017, 1:37 p.m. OK GNU C++14 TESTS 70 15 0 2400
30942239 wladw D Oct. 2, 2017, 12:25 p.m. OK GNU C++14 TESTS 70 15 0 2400
30304946 waynetuinfor D Sept. 13, 2017, 11:08 a.m. OK GNU C++14 TESTS 70 15 0 2400
30257504 zhangzy D Sept. 11, 2017, 1:36 a.m. OK GNU C++14 TESTS 70 15 0 2400
30226698 magdy.hasan D Sept. 9, 2017, 1:26 p.m. OK GNU C++14 TESTS 70 15 0 2400
30021932 i_love_lady_melisandre D Sept. 2, 2017, 11:40 p.m. OK GNU C++14 TESTS 70 15 0 2400
35818126 AliTavassoly D March 1, 2018, 8:53 p.m. OK GNU C++17 TESTS 70 15 2048000 2400
58933808 rareone0602 D Aug. 17, 2019, 2:41 a.m. OK GNU C++17 TESTS 70 30 0 2400
43501115 3agwa D Sept. 27, 2018, 5:09 p.m. OK GNU C++17 TESTS 70 30 102400 2400
38577337 vjudge1 D May 24, 2018, 5:29 a.m. OK GNU C++17 TESTS 70 30 204800 2400
38570308 Davood D May 23, 2018, 6:47 p.m. OK GNU C++17 TESTS 70 30 204800 2400
48488892 jimmy18 D Jan. 17, 2019, 9:44 a.m. OK GNU C++17 TESTS 70 30 204800 2400
38918736 Reference D June 3, 2018, 11:12 a.m. OK GNU C++17 TESTS 70 30 3379200 2400
38334468 Smaug D May 16, 2018, 10:47 p.m. OK GNU C++17 TESTS 70 30 3481600 2400
69346620 nNguyeNn D Jan. 22, 2020, 3:45 p.m. OK GNU C++17 TESTS 70 31 0 2400
69230413 grey_rabbit D Jan. 21, 2020, 9:14 a.m. OK GNU C++17 TESTS 70 31 0 2400
11717583 I_love_Malika D June 23, 2015, 4:59 a.m. OK Go TESTS 70 31 204800 2400
12269453 behzad.nouri D July 29, 2015, 9:55 p.m. OK Haskell TESTS 70 30 0 2400
12236873 mjf D July 27, 2015, 7:16 a.m. OK Haskell TESTS 70 31 0 2400
11738388 krigan D June 24, 2015, 3:44 p.m. OK Java 7 TESTS 70 77 0 2400
11591336 Sumeet.Varma D June 15, 2015, 7:19 a.m. OK Java 7 TESTS 70 77 0 2400
12002174 alibaba D July 10, 2015, 10:02 p.m. OK Java 7 TESTS 70 78 0 2400
11564529 free.dom D June 13, 2015, 7:29 a.m. OK Java 7 TESTS 70 78 0 2400
11560146 HidenoriS D June 12, 2015, 10:13 p.m. OK Java 7 TESTS 70 78 0 2400
11591224 flk D June 15, 2015, 7 a.m. OK Java 7 TESTS 70 93 0 2400
15144155 HappyNewYearMike D Jan. 1, 2016, 12:34 a.m. OK Java 7 TESTS 70 93 0 2400
11607802 dev_il D June 16, 2015, 1:47 p.m. OK Java 7 TESTS 70 93 0 2400
11607743 dev_il D June 16, 2015, 1:42 p.m. OK Java 7 TESTS 70 93 0 2400
11580172 tayjukitomo D June 14, 2015, 10:42 a.m. OK Java 7 TESTS 70 93 0 2400
58072921 ZeyadKhattab D July 31, 2019, 11:21 a.m. OK Java 8 TESTS 70 109 0 2400
13221191 mashinist D Sept. 25, 2015, 3:31 p.m. OK Java 8 TESTS 70 109 0 2400
12892130 donli D Sept. 8, 2015, 4:16 a.m. OK Java 8 TESTS 70 109 0 2400
12613226 darsh D Aug. 20, 2015, 8:32 a.m. OK Java 8 TESTS 70 109 0 2400
12276838 afrizal D July 30, 2015, 3:27 p.m. OK Java 8 TESTS 70 109 0 2400
12108975 bubnov D July 18, 2015, 4:37 p.m. OK Java 8 TESTS 70 109 0 2400
11815369 stan D June 28, 2015, 6:56 a.m. OK Java 8 TESTS 70 109 0 2400
11717473 I_love_Malika D June 23, 2015, 4:44 a.m. OK Java 8 TESTS 70 109 0 2400
11624274 mukku D June 17, 2015, 6:43 p.m. OK Java 8 TESTS 70 109 0 2400
11621138 alculquicondor D June 17, 2015, 2:47 p.m. OK Java 8 TESTS 70 109 0 2400
11566183 kroyl D June 13, 2015, 10 a.m. OK MS C# TESTS 70 62 2252800 2400
18346617 camypaper D June 9, 2016, 6:34 p.m. OK MS C# TESTS 70 62 9728000 2400
16822746 Mem D March 19, 2016, 3:38 p.m. OK MS C# TESTS 70 77 11673600 2400
16549278 shjgkwo D March 6, 2016, 9:10 a.m. OK MS C++ TESTS 70 15 0 2400
16271128 vjudge2 D Feb. 22, 2016, 4:53 a.m. OK MS C++ TESTS 70 15 0 2400
14565112 hgkim D Nov. 30, 2015, 3:59 a.m. OK MS C++ TESTS 70 15 0 2400
13861797 BRAD_BIT D Oct. 25, 2015, 9:08 p.m. OK MS C++ TESTS 70 15 0 2400
13861783 ZIPP D Oct. 25, 2015, 9:07 p.m. OK MS C++ TESTS 70 15 0 2400
12215226 Lint D July 24, 2015, 2:10 p.m. OK MS C++ TESTS 70 15 0 2400
11665824 dotorya D June 19, 2015, 9:54 a.m. OK MS C++ TESTS 70 15 0 2400
11602294 beihanggmj D June 16, 2015, 5 a.m. OK MS C++ TESTS 70 15 0 2400
11595668 AlexIlin D June 15, 2015, 2:52 p.m. OK MS C++ TESTS 70 15 0 2400
11571390 firmsnail D June 13, 2015, 5:01 p.m. OK MS C++ TESTS 70 15 0 2400
11669240 komendart D June 19, 2015, 1:43 p.m. OK PyPy 2 TESTS 70 77 307200 2400
23340339 Noureldin D Dec. 26, 2016, 12:54 p.m. OK PyPy 2 TESTS 70 77 22016000 2400
11570831 hungpham2511 D June 13, 2015, 4:20 p.m. OK PyPy 2 TESTS 70 124 4505600 2400
35887834 ______u______ D March 3, 2018, 2:12 p.m. OK PyPy 3 TESTS 70 77 19968000 2400
35887580 ______n______ D March 3, 2018, 2:07 p.m. OK PyPy 3 TESTS 70 77 19968000 2400
35887216 _____k_____ D March 3, 2018, 2 p.m. OK PyPy 3 TESTS 70 77 19968000 2400
35875397 ______h______ D March 3, 2018, 8:17 a.m. OK PyPy 3 TESTS 70 77 19968000 2400
35875124 ______k______ D March 3, 2018, 8:08 a.m. OK PyPy 3 TESTS 70 77 19968000 2400
35874666 ______i______ D March 3, 2018, 7:57 a.m. OK PyPy 3 TESTS 70 77 19968000 2400
35873011 ______M______ D March 3, 2018, 7:22 a.m. OK PyPy 3 TESTS 70 77 19968000 2400
11669301 komendart D June 19, 2015, 1:47 p.m. OK PyPy 3 TESTS 70 93 307200 2400
11635463 johannesk D June 18, 2015, 4:11 p.m. OK PyPy 3 TESTS 70 109 0 2400
11566281 TokuchiToa D June 13, 2015, 10:09 a.m. OK Python 2 TESTS 70 46 0 2400
11579981 Rustt D June 14, 2015, 10:20 a.m. OK Python 2 TESTS 70 61 0 2400
11573006 sanchit.agrawal D June 13, 2015, 7:17 p.m. OK Python 2 TESTS 70 61 0 2400
11589669 dut200901102 D June 15, 2015, 2:22 a.m. OK Python 2 TESTS 70 62 0 2400
25016462 goodbye_Dandelion D Feb. 25, 2017, 3:27 p.m. OK Python 2 TESTS 70 62 4608000 2400
11737027 Antichamber D June 24, 2015, 1:42 p.m. OK Python 2 TESTS 70 77 0 2400
11736976 Antichamber D June 24, 2015, 1:37 p.m. OK Python 2 TESTS 70 93 0 2400
12620280 Nekrolm D Aug. 20, 2015, 7:58 p.m. OK Python 3 TESTS 70 62 0 2400
12620090 Nekrolm D Aug. 20, 2015, 7:34 p.m. OK Python 3 TESTS 70 62 0 2400
11821680 Linkk D June 28, 2015, 11:41 a.m. OK Python 3 TESTS 70 62 0 2400
11635477 johannesk D June 18, 2015, 4:13 p.m. OK Python 3 TESTS 70 62 0 2400
11635383 johannesk D June 18, 2015, 4:05 p.m. OK Python 3 TESTS 70 62 0 2400
11563388 duckladydinh D June 13, 2015, 5:39 a.m. OK Python 3 TESTS 70 62 0 2400
14973862 cugel D Dec. 24, 2015, 1:49 p.m. OK Python 3 TESTS 70 62 307200 2400
11563124 chaotic_iak D June 13, 2015, 5:16 a.m. OK Python 3 TESTS 70 62 307200 2400
11566909 Bobrosoft D June 13, 2015, 11:03 a.m. OK Python 3 TESTS 70 77 512000 2400
11582567 nigus D June 14, 2015, 2:03 p.m. OK Python 3 TESTS 70 124 0 2400
11579555 vjudge4 D June 14, 2015, 9:42 a.m. OK Ruby TESTS 70 62 102400 2400
11579563 CyberZHG D June 14, 2015, 9:43 a.m. OK Ruby TESTS 70 62 204800 2400
11595181 RoundheadOFF D June 15, 2015, 1:58 p.m. OK Scala TESTS 70 187 0 2400
11782408 fqw D June 27, 2015, 9:09 a.m. OK Scala TESTS 70 218 0 2400

remove filters

Back to search problems