Codeforces Round 225 (Div. 1)

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
383 Codeforces Round 225 (Div. 1) FINISHED False 7200 341591399 Jan. 20, 2014, 3:30 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 3034 ) D Antimatter PROGRAMMING dp 2300

B'Iahub accidentally discovered a secret lab. He found there n devices ordered in a line, numbered from 1 to n from left to right. Each device i (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89i xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n) can create either ai units of matter or ai units of antimatter. Iahub wants to choose some contiguous subarray of devices in the lab, specify the production mode for each of them (produce matter or antimatter) and finally take a photo of it. However he will be successful only if the amounts of matter and antimatter produced in the selected subarray will be the same (otherwise there would be overflowing matter or antimatter in the photo). You are requested to compute the number of different ways Iahub can successful take a photo. A photo is different than another if it represents another subarray, or if at least one device of the subarray is set to produce matter in one of the photos and antimatter in the other one. The first line contains an integer n (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x891000). The second line contains n integers a1, a2, ..., an (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89ai xe2 x80 x89 xe2 x89 xa4 xe2 x80 x891000). The sum a1 xe2 x80 x89+ xe2 x80 x89a2 xe2 x80 x89+ xe2 x80 x89... xe2 x80 x89+ xe2 x80 x89an will be less than or equal to 10000. Output a single integer, the number of ways Iahub can take a photo, modulo 1000000007 (109 xe2 x80 x89+ xe2 x80 x897). The possible photos are [1+, 2-], [1-, 2+], [2+, 3-], [2-, 3+], [3+, 4-], [3-, 4+], [1+, 2+, 3-, 4-], [1+, 2-, 3+, 4-], [1+, 2-, 3-, 4+], [1-, 2+, 3+, 4-], [1-, 2+, 3-, 4+] and [1-, 2-, 3+, 4+], where "i+" means that the i-th element produces matter, and "i-" means that the i-th element produces antimatter.'...

Tutorials

Tutorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
5813270 Misha100896 D Jan. 26, 2014, 2:50 p.m. OK Delphi TESTS 48 93 204800 2300
5753450 annikura D Jan. 20, 2014, 4:26 p.m. OK Delphi TESTS 48 124 80384000 2300
5775197 MrJigan1488 D Jan. 23, 2014, 7:12 a.m. OK Delphi TESTS 48 358 112025600 2300
9507400 mzlxmzx D Jan. 23, 2015, 2:06 a.m. OK FPC TESTS 48 93 307200 2300
8629528 greatsaiyanman D Nov. 10, 2014, 9:20 a.m. OK FPC TESTS 48 93 80384000 2300
8629505 landaigia D Nov. 10, 2014, 9:14 a.m. OK FPC TESTS 48 108 81305600 2300
8629541 TrinhVuAn D Nov. 10, 2014, 9:21 a.m. OK FPC TESTS 48 109 80281600 2300
5833448 Fedosik D Jan. 29, 2014, 4:44 p.m. OK FPC TESTS 48 109 80281600 2300
5755251 loli D Jan. 20, 2014, 4:51 p.m. OK FPC TESTS 48 109 80281600 2300
8610245 Leshka D Nov. 7, 2014, 10:27 p.m. OK FPC TESTS 48 109 160358400 2300
5770626 Reventon1 D Jan. 22, 2014, 12:30 p.m. OK FPC TESTS 48 124 80281600 2300
5756376 vietdoan D Jan. 20, 2014, 5:07 p.m. OK FPC TESTS 48 124 88166400 2300
9297775 SkyDec D Dec. 29, 2014, 12:01 p.m. OK FPC TESTS 48 187 204800 2300
17215878 vjudge2 D April 7, 2016, 4:18 p.m. OK GNU C TESTS 48 46 90726400 2300
17199712 vjudge1 D April 7, 2016, 6:43 a.m. OK GNU C TESTS 48 93 83046400 2300
23911246 srijansingh D Jan. 17, 2017, 10:13 p.m. OK GNU C TESTS 48 295 162406400 2300
17253432 vjudge1 D April 9, 2016, 2:20 p.m. OK GNU C TESTS 48 373 163123200 2300
21631803 Minology D Oct. 21, 2016, 2:56 a.m. OK GNU C++ TESTS 48 31 204800 2300
15837457 vjtest D Feb. 6, 2016, 6:09 a.m. OK GNU C++ TESTS 48 46 0 2300
17315503 vjudge1 D April 14, 2016, 2:15 p.m. OK GNU C++ TESTS 48 46 0 2300
17304153 vjudge5 D April 13, 2016, 3:36 p.m. OK GNU C++ TESTS 48 46 0 2300
15788792 vjtest D Feb. 4, 2016, 2:25 p.m. OK GNU C++ TESTS 48 46 0 2300
15627673 vjtest D Jan. 28, 2016, 11:25 a.m. OK GNU C++ TESTS 48 46 0 2300
15627656 bnuvjudge2 D Jan. 28, 2016, 11:24 a.m. OK GNU C++ TESTS 48 46 0 2300
20363869 bgrm D Sept. 3, 2016, 2:29 p.m. OK GNU C++ TESTS 48 46 102400 2300
11361420 Reyna D May 30, 2015, 10:56 p.m. OK GNU C++ TESTS 48 46 102400 2300
6305693 Al.Cash D April 9, 2014, 12:58 p.m. OK GNU C++ TESTS 48 46 102400 2300
5756982 Krig D Jan. 20, 2014, 5:16 p.m. OK GNU C++0x TESTS 48 46 204800 2300
5752563 bmerry D Jan. 20, 2014, 4:13 p.m. OK GNU C++0x TESTS 48 46 204800 2300
5868899 wakaka D Feb. 2, 2014, 12:51 p.m. OK GNU C++0x TESTS 48 62 102400 2300
5755245 lovro D Jan. 20, 2014, 4:51 p.m. OK GNU C++0x TESTS 48 62 204800 2300
5754770 andreihh D Jan. 20, 2014, 4:44 p.m. OK GNU C++0x TESTS 48 62 204800 2300
5753976 KADR D Jan. 20, 2014, 4:32 p.m. OK GNU C++0x TESTS 48 62 307200 2300
5761280 akaring D Jan. 21, 2014, 1:05 a.m. OK GNU C++0x TESTS 48 62 512000 2300
5762990 fanzhengchen D Jan. 21, 2014, 7:09 a.m. OK GNU C++0x TESTS 48 62 1126400 2300
5757612 johnathan79717 D Jan. 20, 2014, 5:24 p.m. OK GNU C++0x TESTS 48 62 40038400 2300
8427434 Andrei1998 D Oct. 27, 2014, 8:10 a.m. OK GNU C++0x TESTS 48 62 40345600 2300
60573701 rainboy D Sept. 14, 2019, 3:42 p.m. OK GNU C11 TESTS 48 78 204800 2300
17473028 de_inferno D April 23, 2016, 6:33 p.m. OK GNU C11 TESTS 48 78 83046400 2300
15637662 aurinegro D Jan. 29, 2016, 12:39 a.m. OK GNU C++11 TESTS 48 46 102400 2300
67624426 VROOM_VARUN D Dec. 25, 2019, 8:37 p.m. OK GNU C++11 TESTS 48 46 102400 2300
11212014 cq_phqg D May 22, 2015, 4:52 p.m. OK GNU C++11 TESTS 48 46 204800 2300
64363800 shuashuawan D Nov. 6, 2019, 12:28 p.m. OK GNU C++11 TESTS 48 46 204800 2300
30747345 underkarma D Sept. 26, 2017, 10:37 a.m. OK GNU C++11 TESTS 48 46 204800 2300
19060766 Fry_guest D July 13, 2016, 2:28 a.m. OK GNU C++11 TESTS 48 46 204800 2300
27989692 PlayfulPanda D June 23, 2017, 5:20 p.m. OK GNU C++11 TESTS 48 46 2252800 2300
27771789 yanQval D June 14, 2017, 10 a.m. OK GNU C++11 TESTS 48 46 3174400 2300
22877627 o948 D Dec. 11, 2016, 12:11 p.m. OK GNU C++11 TESTS 48 46 80179200 2300
18910431 AkaneSasu D July 6, 2016, 3:03 a.m. OK GNU C++11 TESTS 48 46 80384000 2300
68976783 Qu0cNguyen D Jan. 17, 2020, 9:08 a.m. OK GNU C++14 TESTS 48 46 614400 2300
68157041 MakeSPGreatAgain D Jan. 4, 2020, 9:20 a.m. OK GNU C++14 TESTS 48 46 614400 2300
29218539 Gilmour D Aug. 5, 2017, 12:31 p.m. OK GNU C++14 TESTS 48 46 2048000 2300
34228954 akashdeep D Jan. 16, 2018, 5:46 p.m. OK GNU C++14 TESTS 48 46 2048000 2300
28108452 LiChenKoh D June 28, 2017, 5:37 a.m. OK GNU C++14 TESTS 48 46 2150400 2300
21737624 rachitiitr D Oct. 24, 2016, 9:43 a.m. OK GNU C++14 TESTS 48 46 40345600 2300
33986969 Shayan.P D Jan. 7, 2018, 4:17 p.m. OK GNU C++14 TESTS 48 46 42393600 2300
20996942 JewRaper D Sept. 29, 2016, 3:45 p.m. OK GNU C++14 TESTS 48 46 80384000 2300
32570201 jtnydv25 D Nov. 23, 2017, 8:54 a.m. OK GNU C++14 TESTS 48 46 84582400 2300
50209646 vjudge2 D Feb. 19, 2019, 9:54 p.m. OK GNU C++14 TESTS 48 46 121241600 2300
58882220 mohmahkho D Aug. 15, 2019, 10:09 p.m. OK GNU C++17 TESTS 48 46 204800 2300
58881969 mohmahkho D Aug. 15, 2019, 9:55 p.m. OK GNU C++17 TESTS 48 46 204800 2300
50195083 vjudge2 D Feb. 19, 2019, 4:35 p.m. OK GNU C++17 TESTS 48 46 44544000 2300
64098010 Lamductan D Nov. 2, 2019, 2:31 p.m. OK GNU C++17 TESTS 48 46 88268800 2300
60241844 saketh D Sept. 7, 2019, 10 p.m. OK GNU C++17 TESTS 48 61 204800 2300
58881923 mohmahkho D Aug. 15, 2019, 9:53 p.m. OK GNU C++17 TESTS 48 61 204800 2300
41288995 LawrenceMelo D Aug. 7, 2018, 12:30 a.m. OK GNU C++17 TESTS 48 61 204800 2300
68082937 BRs82 D Jan. 2, 2020, 3:05 p.m. OK GNU C++17 TESTS 48 61 40550400 2300
63922832 neko_nyaaaaaaaaaaaaaaaaa D Oct. 31, 2019, 12:13 p.m. OK GNU C++17 TESTS 48 62 102400 2300
63922901 neko_nyaaaaaaaaaaaaaaaaa D Oct. 31, 2019, 12:14 p.m. OK GNU C++17 TESTS 48 62 102400 2300
5776412 DDDDDDDDDDDDDDDDDDDDDDDD D Jan. 23, 2014, 10:13 a.m. OK Go TESTS 48 171 46080000 2300
65347710 its_aks_ulure D Nov. 19, 2019, 1:10 p.m. OK Java 11 TESTS 48 624 254464000 2300
65347672 its_aks_ulure D Nov. 19, 2019, 1:09 p.m. OK Java 11 TESTS 48 639 254464000 2300
5775984 hiukim D Jan. 23, 2014, 9:40 a.m. OK Java 6 TESTS 48 280 0 2300
8868704 AlwaysNewbie D Nov. 27, 2014, 11:27 a.m. OK Java 6 TESTS 48 280 142745600 2300
9933391 emo D Feb. 20, 2015, 3:18 a.m. OK Java 7 TESTS 48 171 0 2300
5753275 littlesheep2012 D Jan. 20, 2014, 4:23 p.m. OK Java 7 TESTS 48 187 0 2300
5801774 net12k44 D Jan. 25, 2014, 1:49 a.m. OK Java 7 TESTS 48 187 53248000 2300
5753972 uwi D Jan. 20, 2014, 4:32 p.m. OK Java 7 TESTS 48 217 0 2300
5758454 PlayLikeNeverB4 D Jan. 20, 2014, 5:51 p.m. OK Java 7 TESTS 48 217 0 2300
5775032 jakabfia D Jan. 23, 2014, 6:43 a.m. OK Java 7 TESTS 48 218 54067200 2300
5767302 IgorKoval D Jan. 21, 2014, 11:34 p.m. OK Java 7 TESTS 48 234 53248000 2300
18232781 daiict D June 3, 2016, 2:39 p.m. OK Java 7 TESTS 48 248 81305600 2300
5752188 Egor D Jan. 20, 2014, 4:08 p.m. OK Java 7 TESTS 48 249 0 2300
5767308 IgorKoval D Jan. 21, 2014, 11:37 p.m. OK Java 7 TESTS 48 249 53862400 2300
10211115 Pimpom D March 8, 2015, 6:14 p.m. OK Java 8 TESTS 48 358 129536000 2300
47375601 I_love_Harpae D Dec. 22, 2018, 5:05 p.m. OK Java 8 TESTS 48 389 134041600 2300
35284470 mink0389 D Feb. 15, 2018, 6:45 a.m. OK Java 8 TESTS 48 389 166604800 2300
9743968 AStepanov D Feb. 7, 2015, 10:33 a.m. OK Java 8 TESTS 48 390 130048000 2300
62282544 LAKOUAM_IMAD D Oct. 10, 2019, 1:02 p.m. OK Java 8 TESTS 48 405 0 2300
60573700 Dukkha D Sept. 14, 2019, 3:42 p.m. OK Java 8 TESTS 48 467 0 2300
10988058 AlexFetisov D May 3, 2015, 5:45 p.m. OK Java 8 TESTS 48 468 0 2300
31321754 flyman3046 D Oct. 14, 2017, 7:09 p.m. OK Java 8 TESTS 48 468 253440000 2300
20815940 marcose18 D Sept. 22, 2016, 11:44 a.m. OK Java 8 TESTS 48 483 134758400 2300
32316901 Baelish D Nov. 14, 2017, 4:49 p.m. OK Java 8 TESTS 48 483 134860800 2300
11881650 ilyoan D July 1, 2015, 12:07 p.m. OK Mono C# TESTS 48 171 4403200 2300
39004432 antofik D June 6, 2018, 9:21 p.m. OK Mono C# TESTS 48 764 89088000 2300
11015924 azukun D May 6, 2015, 6:34 p.m. OK MS C# TESTS 48 171 6041600 2300
33137396 DCNick3 D Dec. 11, 2017, 7:49 p.m. OK MS C# TESTS 48 187 11878400 2300
33530434 sid0adams D Dec. 23, 2017, 8:37 a.m. OK MS C# TESTS 48 327 90214400 2300
5757836 BotanIQ D Jan. 20, 2014, 5:27 p.m. OK MS C++ TESTS 48 77 204800 2300
5756616 GlebsHP D Jan. 20, 2014, 5:10 p.m. OK MS C++ TESTS 48 77 614400 2300
5766812 vshantarin D Jan. 21, 2014, 7:06 p.m. OK MS C++ TESTS 48 77 40755200 2300
10451732 Alex7 D March 25, 2015, 7:29 p.m. OK MS C++ TESTS 48 78 204800 2300
5873129 Tom. D Feb. 3, 2014, 11:18 a.m. OK MS C++ TESTS 48 78 80588800 2300
5777819 blueseen D Jan. 23, 2014, 2:39 p.m. OK MS C++ TESTS 48 93 0 2300
5764246 Proscriptus D Jan. 21, 2014, 11:15 a.m. OK MS C++ TESTS 48 93 0 2300
5902849 XilinX D Feb. 5, 2014, 10:58 a.m. OK MS C++ TESTS 48 93 102400 2300
5754070 KungA D Jan. 20, 2014, 4:34 p.m. OK MS C++ TESTS 48 93 204800 2300
6105174 vjudge5 D March 22, 2014, 12:45 p.m. OK MS C++ TESTS 48 93 133632000 2300
43745736 szymonkub D Oct. 3, 2018, 8:41 p.m. OK PyPy 2 TESTS 48 592 81203200 2300
43745790 szymonkub D Oct. 3, 2018, 8:44 p.m. OK PyPy 2 TESTS 48 639 81203200 2300

remove filters

Back to search problems