Codeforces Round 236 (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
402 Codeforces Round 236 (Div. 2) FINISHED False 7200 342541823 March 16, 2014, 3:30 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 2645 ) D Upgrading Array PROGRAMMING dp greedy math number theory 2000

B'You have an array of positive integers a[1], xe2 x80 x89a[2], xe2 x80 x89..., xe2 x80 x89a[n] and a set of bad prime numbers b1, xe2 x80 x89b2, xe2 x80 x89..., xe2 x80 x89bm. The prime numbers that do not occur in the set b are considered good. The beauty of array a is the sum , where function f(s) is determined as follows: You are allowed to perform an arbitrary (probably zero) number of operations to improve array a. The operation of improvement is the following sequence of actions: What is the maximum beauty of the array you can get? The first line contains two integers n and m (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n, xe2 x80 x89m xe2 x80 x89 xe2 x89 xa4 xe2 x80 x895000) showing how many numbers are in the array and how many bad prime numbers there are. The second line contains n space-separated integers a[1], xe2 x80 x89a[2], xe2 x80 x89..., xe2 x80 x89a[n] (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89a[i] xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89109) -- array a. The third line contains m space-separated integers b1, xe2 x80 x89b2, xe2 x80 x89..., xe2 x80 x89bm (2 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89b1 xe2 x80 x89< xe2 x80 x89b2 xe2 x80 x89< xe2 x80 x89... xe2 x80 x89< xe2 x80 x89bm xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89109) -- the set of bad prime numbers. Print a single integer -- the answer to the problem. Note that the answer to the problem can be negative. The GCD(x1, x2, ..., xk) is the maximum positive integer that divides each xi.'...

Tutorials

Editorial Codeforces Round #236

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
6048120 Misha100896 D March 16, 2014, 7:02 p.m. OK Delphi TESTS 45 452 1740800 2000
18751708 water235 D June 27, 2016, 12:09 p.m. OK FPC TESTS 45 109 921600 2000
29129038 vjudge1 D Aug. 2, 2017, 11:57 a.m. OK FPC TESTS 45 109 2560000 2000
10426882 Jicote D March 24, 2015, 8:21 p.m. OK FPC TESTS 45 124 512000 2000
6051548 chicken_coder D March 17, 2014, 2:35 a.m. OK FPC TESTS 45 171 204800 2000
6064398 function348 D March 19, 2014, 3:07 a.m. OK FPC TESTS 45 171 1024000 2000
6051438 chicken_coder D March 17, 2014, 2:14 a.m. OK FPC TESTS 45 187 204800 2000
6093078 clock D March 20, 2014, 5:24 p.m. OK FPC TESTS 45 577 204800 2000
54474208 chaorenhaha D May 22, 2019, 7:26 a.m. OK FPC TESTS 45 889 102400 2000
6164219 zwindstorm D March 27, 2014, 11:34 p.m. OK FPC TESTS 45 889 102400 2000
6161463 zwindstorm D March 27, 2014, 12:46 p.m. OK FPC TESTS 45 889 102400 2000
6177301 josinalvo D March 30, 2014, 3:36 a.m. OK GNU C TESTS 45 93 204288000 2000
6046460 Tebak_Siapa_Aku D March 16, 2014, 6:40 p.m. OK GNU C TESTS 45 139 102400 2000
6498483 ckeling D April 28, 2014, 8:11 a.m. OK GNU C TESTS 45 249 512000 2000
6053127 zeosutt D March 17, 2014, 8:07 a.m. OK GNU C TESTS 45 858 102400 2000
6103970 dhruv94 D March 22, 2014, 10:15 a.m. OK GNU C TESTS 45 889 0 2000
6146904 IIIIIIIIIII D March 26, 2014, 11:04 a.m. OK GNU C TESTS 45 920 102400 2000
6066981 dosoji D March 19, 2014, 12:38 p.m. OK GNU C++ TESTS 45 15 1024000 2000
6066357 Seive_gold D March 19, 2014, 11:09 a.m. OK GNU C++ TESTS 45 30 1024000 2000
12528825 vjudge5 D Aug. 14, 2015, 11:16 a.m. OK GNU C++ TESTS 45 31 409600 2000
12411728 jorik D Aug. 8, 2015, 8:26 a.m. OK GNU C++ TESTS 45 31 409600 2000
40988957 ReaLNero1 D July 30, 2018, 10:28 p.m. OK GNU C++ TESTS 45 31 921600 2000
6123980 greencis D March 23, 2014, 9:43 a.m. OK GNU C++ TESTS 45 31 1228800 2000
6056112 I_love_Tanya_Romanova D March 17, 2014, 3:12 p.m. OK GNU C++ TESTS 45 31 1433600 2000
36247323 vjudge1 D March 13, 2018, 12:10 p.m. OK GNU C++ TESTS 45 31 2457600 2000
12528520 vjudge5 D Aug. 14, 2015, 10:52 a.m. OK GNU C++ TESTS 45 31 2764800 2000
40540922 5095187020216 D July 19, 2018, 8:36 a.m. OK GNU C++ TESTS 45 31 2867200 2000
9163215 Duxar D Dec. 17, 2014, 3:26 p.m. OK GNU C++0x TESTS 45 46 512000 2000
6043157 klamathix D March 16, 2014, 6:10 p.m. OK GNU C++0x TESTS 45 62 1126400 2000
6051433 danielfleischman D March 17, 2014, 2:12 a.m. OK GNU C++0x TESTS 45 62 1331200 2000
6050508 saketh D March 16, 2014, 9:03 p.m. OK GNU C++0x TESTS 45 77 1331200 2000
6056679 rendon D March 17, 2014, 4:45 p.m. OK GNU C++0x TESTS 45 78 921600 2000
6836127 Bidhan D June 8, 2014, 8:49 a.m. OK GNU C++0x TESTS 45 93 1126400 2000
6053765 xywy.1992 D March 17, 2014, 10 a.m. OK GNU C++0x TESTS 45 139 512000 2000
6050584 marat.snowbear D March 16, 2014, 9:24 p.m. OK GNU C++0x TESTS 45 140 409600 2000
6042332 ikatanic D March 16, 2014, 5:48 p.m. OK GNU C++0x TESTS 45 155 102400 2000
6044757 mike_live D March 16, 2014, 6:21 p.m. OK GNU C++0x TESTS 45 202 307200 2000
43404467 luogu_bot4 D Sept. 25, 2018, 10:44 a.m. OK GNU C11 TESTS 45 888 409600 2000
43234380 zhoudong D Sept. 22, 2018, 7:30 a.m. OK GNU C++11 TESTS 45 31 307200 2000
43234424 zhoudong D Sept. 22, 2018, 7:31 a.m. OK GNU C++11 TESTS 45 46 204800 2000
52501948 chuducanhchy D April 8, 2019, 4:33 p.m. OK GNU C++11 TESTS 45 46 307200 2000
56294548 We_R_Young D June 30, 2019, 4:44 a.m. OK GNU C++11 TESTS 45 46 512000 2000
47358473 Diegogrc D Dec. 22, 2018, 7:28 a.m. OK GNU C++11 TESTS 45 46 716800 2000
56294530 We_R_Young D June 30, 2019, 4:43 a.m. OK GNU C++11 TESTS 45 46 716800 2000
20722211 MedoN11 D Sept. 18, 2016, 12:29 a.m. OK GNU C++11 TESTS 45 46 921600 2000
43312008 jangjie D Sept. 23, 2018, 1:42 p.m. OK GNU C++11 TESTS 45 46 2048000 2000
56294358 We_R_Young D June 30, 2019, 4:34 a.m. OK GNU C++11 TESTS 45 46 2048000 2000
56294291 We_R_Young D June 30, 2019, 4:30 a.m. OK GNU C++11 TESTS 45 46 3379200 2000
44941251 zxyoi D Oct. 27, 2018, 7:54 a.m. OK GNU C++14 TESTS 45 31 10956800 2000
28929183 magdy.hasan D July 27, 2017, 11:43 a.m. OK GNU C++14 TESTS 45 31 25395200 2000
29803259 danya.smelskiy D Aug. 26, 2017, 10:04 a.m. OK GNU C++14 TESTS 45 46 716800 2000
65607016 Sixpathsguy D Nov. 23, 2019, 9:28 p.m. OK GNU C++14 TESTS 45 46 819200 2000
28958854 vjudge4 D July 28, 2017, 5:13 p.m. OK GNU C++14 TESTS 45 46 2355200 2000
31532062 Markellonchik D Oct. 20, 2017, 12:04 p.m. OK GNU C++14 TESTS 45 46 2560000 2000
33645479 Heart_Blue D Dec. 26, 2017, 11:39 a.m. OK GNU C++14 TESTS 45 46 4300800 2000
36467140 fzu_cwj D March 22, 2018, 1:24 a.m. OK GNU C++14 TESTS 45 46 6348800 2000
33631329 Atreus D Dec. 25, 2017, 8:52 p.m. OK GNU C++14 TESTS 45 62 3891200 2000
25483428 rick_c137 D March 14, 2017, 6:05 p.m. OK GNU C++14 TESTS 45 62 5529600 2000
61509507 ACraider D Sept. 29, 2019, 3:45 p.m. OK GNU C++17 TESTS 45 31 614400 2000
61509543 ACraider D Sept. 29, 2019, 3:46 p.m. OK GNU C++17 TESTS 45 31 614400 2000
40209354 Ashishgup D July 11, 2018, 5:53 p.m. OK GNU C++17 TESTS 45 46 512000 2000
54076248 m1sch3f D May 13, 2019, 8:16 p.m. OK GNU C++17 TESTS 45 46 614400 2000
47619999 roll_no_1 D Dec. 28, 2018, 12:22 p.m. OK GNU C++17 TESTS 45 46 716800 2000
50335426 Stroustrup D Feb. 22, 2019, 8:41 p.m. OK GNU C++17 TESTS 45 46 1126400 2000
42341517 terminator D Sept. 1, 2018, 5:35 p.m. OK GNU C++17 TESTS 45 46 2969600 2000
39982934 n_dao107 D July 5, 2018, 11:48 a.m. OK GNU C++17 TESTS 45 61 307200 2000
42449522 farhad519 D Sept. 4, 2018, 6:54 a.m. OK GNU C++17 TESTS 45 62 1331200 2000
61146787 OrlandoIsay D Sept. 23, 2019, 2:54 p.m. OK GNU C++17 TESTS 45 77 512000 2000
6052089 AcOnFingers D March 17, 2014, 4:32 a.m. OK Go TESTS 45 155 204800 2000
6051954 AcOnFingers D March 17, 2014, 4:03 a.m. OK Go TESTS 45 233 102400 2000
6056511 alexey.kasatkin D March 17, 2014, 4:15 p.m. OK Java 7 TESTS 45 109 0 2000
6046588 jakabfia D March 16, 2014, 6:49 p.m. OK Java 7 TESTS 45 109 0 2000
15023510 xiaowuc1 D Dec. 25, 2015, 11:02 p.m. OK Java 7 TESTS 45 140 0 2000
11350635 Sumeet.Varma D May 29, 2015, 8:41 p.m. OK Java 7 TESTS 45 155 0 2000
6124561 jooman D March 23, 2014, 11:16 a.m. OK Java 7 TESTS 45 186 0 2000
6124524 jooman D March 23, 2014, 11:09 a.m. OK Java 7 TESTS 45 187 0 2000
10458474 mkirsche D March 26, 2015, 3:03 p.m. OK Java 7 TESTS 45 218 0 2000
9482114 mrkz D Jan. 20, 2015, 7 a.m. OK Java 7 TESTS 45 327 143564800 2000
10207632 marcose18 D March 8, 2015, 1:54 p.m. OK Java 7 TESTS 45 343 0 2000
8803193 alibaba D Nov. 22, 2014, 2:42 p.m. OK Java 7 TESTS 45 420 0 2000
22026262 donli D Nov. 4, 2016, 3:44 a.m. OK Java 8 TESTS 45 139 0 2000
9233761 Spacejoker D Dec. 23, 2014, 2:57 p.m. OK Java 8 TESTS 45 202 0 2000
17968406 .tx D May 17, 2016, 2:18 p.m. OK Java 8 TESTS 45 296 174694400 2000
37997535 Musin D May 7, 2018, 1:56 p.m. OK Java 8 TESTS 45 327 20684800 2000
61867076 gouh9qn D Oct. 4, 2019, 4:54 p.m. OK Java 8 TESTS 45 452 0 2000
61825273 Ahmad D Oct. 4, 2019, 4:27 a.m. OK Java 8 TESTS 45 468 0 2000
17552807 yrjie D April 28, 2016, 1:02 p.m. OK Java 8 TESTS 45 483 20992000 2000
33888770 parthivm20 D Jan. 3, 2018, 4:25 p.m. OK Java 8 TESTS 45 592 20684800 2000
55482056 programbhavan D June 12, 2019, 5:50 a.m. OK Java 8 TESTS 45 686 0 2000
24237159 MazzForces D Jan. 28, 2017, 9:59 p.m. OK Java 8 TESTS 45 717 20582400 2000
6480027 antofik D April 26, 2014, 4:29 p.m. OK MS C# TESTS 45 78 5836800 2000
6817575 og.kostya D June 5, 2014, 6:47 a.m. OK MS C# TESTS 45 93 2662400 2000
6096611 azukun D March 21, 2014, 6:08 a.m. OK MS C# TESTS 45 374 3788800 2000
6062483 cavehubiao D March 18, 2014, 4:52 p.m. OK MS C++ TESTS 45 31 409600 2000
6042647 hasta88 D March 16, 2014, 5:54 p.m. OK MS C++ TESTS 45 62 512000 2000
10093244 No_mercy_ D March 1, 2015, 8:07 a.m. OK MS C++ TESTS 45 108 1331200 2000
10089718 TGIshib D Feb. 28, 2015, 10:25 p.m. OK MS C++ TESTS 45 109 1331200 2000
6057782 khrak D March 17, 2014, 8:36 p.m. OK MS C++ TESTS 45 124 307200 2000
6053941 Carups D March 17, 2014, 10:35 a.m. OK MS C++ TESTS 45 124 614400 2000
6041367 oi111 D March 16, 2014, 5:26 p.m. OK MS C++ TESTS 45 124 1638400 2000
6061269 PugachAG D March 18, 2014, 1:30 p.m. OK MS C++ TESTS 45 139 307200 2000
6061211 PugachAG D March 18, 2014, 1:22 p.m. OK MS C++ TESTS 45 140 409600 2000
6050554 PugachAG D March 16, 2014, 9:16 p.m. OK MS C++ TESTS 45 140 409600 2000
41949493 Onesh0t D Aug. 21, 2018, 10:45 p.m. OK PyPy 2 TESTS 45 436 9523200 2000
6091786 Danstahr D March 20, 2014, 2:14 p.m. OK Python 2 TESTS 45 405 9830400 2000

remove filters

Back to search problems