Codeforces Round 239 (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
407 Codeforces Round 239 (Div. 1) FINISHED False 7200 335660399 March 30, 2014, 7 a.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 789 ) E k-d-sequence PROGRAMMING data structures 3100

B"We'll call a sequence of integers a good k-d sequence if we can add to it at most k numbers in such a way that after the sorting the sequence will be an arithmetic progression with difference d. You got hold of some sequence a, consisting of n integers. Your task is to find its longest contiguous subsegment, such that it is a good k-d sequence. The first line contains three space-separated integers n, xe2 x80 x89k, xe2 x80 x89d (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x892 xc2 xb7105; 0 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89k xe2 x80 x89 xe2 x89 xa4 xe2 x80 x892 xc2 xb7105; 0 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89d xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89109). The second line contains n space-separated integers: a1, xe2 x80 x89a2, xe2 x80 x89..., xe2 x80 x89an ( xe2 x80 x89- xe2 x80 x89109 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89ai xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89109) -- the actual sequence. Print two space-separated integers l, xe2 x80 x89r (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89l xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89r xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n) show that sequence al, xe2 x80 x89al xe2 x80 x89+ xe2 x80 x891, xe2 x80 x89..., xe2 x80 x89ar is the longest subsegment that is a good k-d sequence. If there are multiple optimal answers, print the one with the minimum value of l. In the first test sample the answer is the subsegment consisting of numbers 2, 8, 6 -- after adding number 4 and sorting it becomes sequence 2, 4, 6, 8 -- the arithmetic progression with difference 2."...

Tutorials

Codeforces Round #239 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
56474164 Philchieh E July 3, 2019, 12:26 p.m. OK FPC TESTS 84 326 72192000 3100
7045260 SanSiroWaltz E July 8, 2014, 6:33 a.m. OK FPC TESTS 84 467 28262400 3100
40988902 ReaLNero1 E July 30, 2018, 10:26 p.m. OK GNU C++ TESTS 84 171 12083200 3100
26810758 xzyxzy E May 3, 2017, 12:21 a.m. OK GNU C++ TESTS 84 171 14131200 3100
14611137 JOHNKRAM E Dec. 2, 2015, 2:54 a.m. OK GNU C++ TESTS 84 187 23859200 3100
6202889 flashmt E April 1, 2014, 7:52 a.m. OK GNU C++ TESTS 84 202 28569600 3100
12270649 RNS E July 30, 2015, 2:19 a.m. OK GNU C++ TESTS 84 218 15667200 3100
6198839 zhj E March 31, 2014, 3:18 p.m. OK GNU C++ TESTS 84 218 15872000 3100
26810727 xzyxzy E May 3, 2017, 12:14 a.m. OK GNU C++ TESTS 84 218 18944000 3100
26803783 xzyxzy E May 2, 2017, 1:53 p.m. OK GNU C++ TESTS 84 218 18944000 3100
25713723 hwizard E March 22, 2017, 2:09 p.m. OK GNU C++ TESTS 84 233 18944000 3100
7489044 sdogsq E Aug. 17, 2014, 4:21 a.m. OK GNU C++ TESTS 84 233 25088000 3100
6205453 rares.buhai E April 1, 2014, 2:35 p.m. OK GNU C++0x TESTS 84 249 14643200 3100
6322645 Fdg E April 11, 2014, 1:52 p.m. OK GNU C++0x TESTS 84 296 24780800 3100
6271558 ikatanic E April 6, 2014, 3:27 p.m. OK GNU C++0x TESTS 84 343 18124800 3100
6262590 wakaka E April 5, 2014, 7:28 a.m. OK GNU C++0x TESTS 84 358 18432000 3100
6379907 Archon.JK E April 16, 2014, 3:40 p.m. OK GNU C++0x TESTS 84 390 21401600 3100
6379911 Archon.JK E April 16, 2014, 3:40 p.m. OK GNU C++0x TESTS 84 420 21401600 3100
9404110 M.Mahdi E Jan. 11, 2015, 4:22 p.m. OK GNU C++0x TESTS 84 998 54272000 3100
9404226 M.Mahdi E Jan. 11, 2015, 4:45 p.m. OK GNU C++0x TESTS 84 1153 52531200 3100
6380335 Fbulatov E April 16, 2014, 5:13 p.m. OK GNU C++0x TESTS 84 1231 21094400 3100
66012281 C20191629 E Nov. 30, 2019, 3:19 a.m. OK GNU C++11 TESTS 84 156 17612800 3100
51291638 ff_666 E March 14, 2019, 10:38 a.m. OK GNU C++11 TESTS 84 187 25702400 3100
36263350 lll0421 E March 14, 2018, 1:45 a.m. OK GNU C++11 TESTS 84 202 17408000 3100
28279085 AkaneSasu E July 4, 2017, 11:41 a.m. OK GNU C++11 TESTS 84 202 18227200 3100
50157924 liqing E Feb. 19, 2019, 11:09 a.m. OK GNU C++11 TESTS 84 202 20070400 3100
68065994 luogu_bot3 E Jan. 2, 2020, 7:46 a.m. OK GNU C++11 TESTS 84 217 13414400 3100
57891240 lopare E July 28, 2019, 11:55 a.m. OK GNU C++11 TESTS 84 217 15667200 3100
60172367 2016wudi E Sept. 6, 2019, 1:22 p.m. OK GNU C++11 TESTS 84 218 10444800 3100
62866292 luogu_bot3 E Oct. 18, 2019, 12:20 p.m. OK GNU C++11 TESTS 84 218 16281600 3100
51278000 luogu_bot3 E March 14, 2019, 12:01 a.m. OK GNU C++11 TESTS 84 218 19251200 3100
28281047 zhanglexing E July 4, 2017, 1:02 p.m. OK GNU C++14 TESTS 84 155 13312000 3100
36642035 Joker_23 E March 26, 2018, 12:23 p.m. OK GNU C++14 TESTS 84 171 14848000 3100
54648445 yhx-12243 E May 26, 2019, 3:12 a.m. OK GNU C++14 TESTS 84 202 16486400 3100
56546581 Scut82 E July 5, 2019, 7:54 a.m. OK GNU C++14 TESTS 84 218 15462400 3100
52748998 jslijin E April 14, 2019, 1:06 p.m. OK GNU C++14 TESTS 84 233 15462400 3100
52746763 jslijin E April 14, 2019, 12:04 p.m. OK GNU C++14 TESTS 84 233 15872000 3100
57949601 PinkRabbit E July 29, 2019, 3:51 p.m. OK GNU C++14 TESTS 84 234 10547200 3100
57949725 PinkRabbit E July 29, 2019, 3:54 p.m. OK GNU C++14 TESTS 84 249 10649600 3100
52746712 jslijin E April 14, 2019, 12:02 p.m. OK GNU C++14 TESTS 84 249 15872000 3100
33240604 Merln E Dec. 14, 2017, 1:17 p.m. OK GNU C++14 TESTS 84 249 18329600 3100
66012319 vjudge1 E Nov. 30, 2019, 3:20 a.m. OK GNU C++17 TESTS 84 233 17612800 3100
53031587 alonefight E April 20, 2019, 1:20 a.m. OK GNU C++17 TESTS 84 234 15872000 3100
57787477 ruo E July 26, 2019, 8:19 a.m. OK GNU C++17 TESTS 84 264 15462400 3100
68422940 TheGodOfClash E Jan. 9, 2020, 12:22 a.m. OK GNU C++17 TESTS 84 265 29696000 3100
43901156 vjudge2 E Oct. 6, 2018, 12:32 p.m. OK GNU C++17 TESTS 84 280 18124800 3100
56492689 sulvshuo E July 3, 2019, 11:59 p.m. OK GNU C++17 TESTS 84 280 260505600 3100
51415291 Rtn_e E March 17, 2019, 1:44 p.m. OK GNU C++17 TESTS 84 295 34099200 3100
43570732 vjudge3 E Sept. 29, 2018, 12:51 p.m. OK GNU C++17 TESTS 84 312 18124800 3100
63359613 includehdhd E Oct. 25, 2019, 4:51 a.m. OK GNU C++17 TESTS 84 327 17100800 3100
67943237 Lumberjack_44 E Dec. 30, 2019, 3:17 a.m. OK GNU C++17 TESTS 84 327 38809600 3100
6193811 qwerty787788 E March 30, 2014, 10:40 p.m. OK Java 7 TESTS 84 982 36761600 3100
43942605 vjudge2 E Oct. 7, 2018, 12:10 p.m. OK MS C++ TESTS 84 265 15257600 3100
43994319 vjudge3 E Oct. 8, 2018, 10:42 a.m. OK MS C++ TESTS 84 280 15257600 3100
44187286 vjudge4 E Oct. 12, 2018, 1:38 p.m. OK MS C++ TESTS 84 280 18534400 3100
44316598 vjudge5 E Oct. 14, 2018, 12:27 p.m. OK MS C++ TESTS 84 295 15360000 3100
44187493 vjudge3 E Oct. 12, 2018, 1:42 p.m. OK MS C++ TESTS 84 295 15360000 3100
44186314 vjudge2 E Oct. 12, 2018, 1:17 p.m. OK MS C++ TESTS 84 296 18841600 3100
6250267 blueseen E April 3, 2014, 1:21 p.m. OK MS C++ TESTS 84 374 26521600 3100
6250360 blueseen E April 3, 2014, 1:29 p.m. OK MS C++ TESTS 84 405 26521600 3100
15021390 Tokmakov_Markov_Trofimov E Dec. 25, 2015, 6:50 p.m. OK MS C++ TESTS 84 436 36966400 3100
14890718 Tokmakov_Markov_Trofimov E Dec. 19, 2015, 7:25 p.m. OK MS C++ TESTS 84 436 36966400 3100

remove filters

Back to search problems