Codeforces Round 156 (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
255 Codeforces Round 156 (Div. 2) FINISHED False 7200 376151399 Dec. 16, 2012, 3:30 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 4730 ) C Almost Arithmetical Progression PROGRAMMING brute force dp 1700

B'Gena loves sequences of numbers. Recently, he has discovered a new type of sequences which he called an almost arithmetical progression. A sequence is an almost arithmetical progression, if its elements can be represented as: Right now Gena has a piece of paper with sequence b, consisting of n integers. Help Gena, find there the longest subsequence of integers that is an almost arithmetical progression. Sequence s1, xe2 x80 x89 xe2 x80 x89s2, xe2 x80 x89 xe2 x80 x89..., xe2 x80 x89 xe2 x80 x89sk is a subsequence of sequence b1, xe2 x80 x89 xe2 x80 x89b2, xe2 x80 x89 xe2 x80 x89..., xe2 x80 x89 xe2 x80 x89bn, if there is such increasing sequence of indexes i1, xe2 x80 x89i2, xe2 x80 x89..., xe2 x80 x89ik (1 xe2 x80 x89 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89 xe2 x80 x89i1 xe2 x80 x89 xe2 x80 x89< xe2 x80 x89 xe2 x80 x89i2 xe2 x80 x89 xe2 x80 x89< xe2 x80 x89... xe2 x80 x89 xe2 x80 x89< xe2 x80 x89 xe2 x80 x89ik xe2 x80 x89 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89 xe2 x80 x89n), that bij xe2 x80 x89 xe2 x80 x89= xe2 x80 x89 xe2 x80 x89sj. In other words, sequence s can be obtained from b by crossing out some elements. The first line contains integer n (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x894000). The next line contains n integers b1, xe2 x80 x89b2, xe2 x80 x89..., xe2 x80 x89bn (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89bi xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89106). Print a single integer -- the length of the required longest subsequence. In the first test the sequence actually is the suitable subsequence. In the second test the following subsequence fits: 10, xe2 x80 x8920, xe2 x80 x8910.'...

Tutorials

Codeforces Round #156 tutorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
27514243 cpy C June 2, 2017, 3:26 a.m. OK D TESTS 76 30 4198400 1700
2779227 pashakovalenko C Dec. 16, 2012, 4:38 p.m. OK Delphi TESTS 76 125 35020800 1700
2779569 SirCodeLight C Dec. 16, 2012, 4:42 p.m. OK Delphi TESTS 76 171 102400 1700
2782867 Progerr C Dec. 16, 2012, 7:24 p.m. OK Delphi TESTS 76 171 88268800 1700
2779449 egor-belikov C Dec. 16, 2012, 4:41 p.m. OK Delphi TESTS 76 250 201523200 1700
2787128 Misha100896 C Dec. 17, 2012, 12:46 p.m. OK Delphi TESTS 76 265 3993600 1700
2864561 AleksanderBalobanov C Jan. 1, 2013, 7:06 p.m. OK Delphi TESTS 76 296 100352000 1700
2778842 Shaykhutdinov-T-I C Dec. 16, 2012, 4:32 p.m. OK Delphi TESTS 76 421 128409600 1700
3654377 AHTuTTuTyX C April 30, 2013, 11:32 a.m. OK Delphi TESTS 76 640 132403200 1700
2804254 ruban C Dec. 21, 2012, 4:21 p.m. OK Delphi TESTS 76 734 205619200 1700
22918153 Jicote C Dec. 13, 2016, 1:48 a.m. OK FPC TESTS 76 61 12492800 1700
13930660 Gray_58 C Oct. 29, 2015, 9:48 a.m. OK FPC TESTS 76 93 64307200 1700
18775899 water235 C June 29, 2016, 1:18 a.m. OK FPC TESTS 76 108 64512000 1700
2783145 freedomofkeima C Dec. 16, 2012, 7:43 p.m. OK FPC TESTS 76 109 72192000 1700
3001532 Felytic C Jan. 24, 2013, 10:53 a.m. OK FPC TESTS 76 125 64512000 1700
2983108 egorova_plus_plus C Jan. 22, 2013, 10:40 a.m. OK FPC TESTS 76 140 35123200 1700
3002233 egorova_plus_plus C Jan. 24, 2013, 12:42 p.m. OK FPC TESTS 76 140 64512000 1700
2790261 T0RRES C Dec. 18, 2012, 9:31 a.m. OK FPC TESTS 76 140 72908800 1700
3148178 vanruch C Feb. 19, 2013, 7:24 p.m. OK FPC TESTS 76 156 12083200 1700
3326775 SoulSilver C March 16, 2013, 4:56 p.m. OK FPC TESTS 76 156 64307200 1700
2788698 binom C Dec. 17, 2012, 7:18 p.m. OK GNU C TESTS 76 140 0 1700
2910682 gxnncrx1993 C Jan. 13, 2013, 10 a.m. OK GNU C TESTS 76 203 68198400 1700
3000795 ddyyxx C Jan. 24, 2013, 7:46 a.m. OK GNU C++ TESTS 76 15 307200 1700
23838196 vjudge2 C Jan. 15, 2017, 1:34 p.m. OK GNU C++ TESTS 76 30 2252800 1700
4783253 alex_mat C Oct. 14, 2013, 11:26 a.m. OK GNU C++ TESTS 76 30 3993600 1700
2805437 3111006139 C Dec. 22, 2012, 5:45 a.m. OK GNU C++ TESTS 76 31 204800 1700
11943890 janugagrani C July 6, 2015, 7:47 a.m. OK GNU C++ TESTS 76 31 3891200 1700
2784703 504905803 C Dec. 17, 2012, 4:44 a.m. OK GNU C++ TESTS 76 31 3993600 1700
13952353 vjudge3 C Oct. 30, 2015, 12:41 p.m. OK GNU C++ TESTS 76 31 4198400 1700
2784522 have C Dec. 17, 2012, 3:54 a.m. OK GNU C++ TESTS 76 31 4198400 1700
2781811 Wsl_F C Dec. 16, 2012, 5:21 p.m. OK GNU C++ TESTS 76 31 4198400 1700
2784906 tony810430 C Dec. 17, 2012, 5:33 a.m. OK GNU C++ TESTS 76 31 4300800 1700
7565306 delta_4d C Aug. 24, 2014, 8:13 a.m. OK GNU C++0x TESTS 76 31 409600 1700
2780796 T.T.Chopper C Dec. 16, 2012, 5:03 p.m. OK GNU C++0x TESTS 76 46 307200 1700
2793202 DDDDDDDDDDDDDDDDDDDDDDDD C Dec. 19, 2012, 5:41 a.m. OK GNU C++0x TESTS 76 62 307200 1700
2785799 shirouto C Dec. 17, 2012, 8:19 a.m. OK GNU C++0x TESTS 76 93 409600 1700
9958838 Baby_Steps C Feb. 22, 2015, 11:35 a.m. OK GNU C++0x TESTS 76 93 4096000 1700
3234708 EarlOfDitches C March 3, 2013, 1:38 p.m. OK GNU C++0x TESTS 76 93 8294400 1700
10097766 Henko C March 1, 2015, 3:12 p.m. OK GNU C++0x TESTS 76 93 64204800 1700
2783946 UESTCJHU C Dec. 16, 2012, 11 p.m. OK GNU C++0x TESTS 76 109 4198400 1700
2784263 gonewithsin C Dec. 17, 2012, 2:34 a.m. OK GNU C++0x TESTS 76 109 5222400 1700
7243895 satashun C July 25, 2014, 4:17 p.m. OK GNU C++0x TESTS 76 109 32563200 1700
39173283 alexey.orlov C June 11, 2018, 7:11 p.m. OK GNU C11 TESTS 76 202 4096000 1700
16330946 yongwhan C Feb. 25, 2016, 1:19 p.m. OK GNU C++11 TESTS 76 15 307200 1700
18846760 NewAcount C July 1, 2016, 10:38 p.m. OK GNU C++11 TESTS 76 15 4096000 1700
23838896 jony_cse C Jan. 15, 2017, 2:19 p.m. OK GNU C++11 TESTS 76 30 2252800 1700
33827547 n_dao107 C Dec. 31, 2017, 8:27 a.m. OK GNU C++11 TESTS 76 30 6144000 1700
40990382 ReaLNero1 C July 30, 2018, 11:52 p.m. OK GNU C++11 TESTS 76 31 307200 1700
36197882 _iconer_ C March 11, 2018, 11:47 a.m. OK GNU C++11 TESTS 76 31 2252800 1700
28379197 901001 C July 9, 2017, 2:40 a.m. OK GNU C++11 TESTS 76 31 2457600 1700
19756920 vjudge5 C Aug. 10, 2016, 2:14 a.m. OK GNU C++11 TESTS 76 31 70348800 1700
19138100 OmarHashim C July 15, 2016, 12:03 a.m. OK GNU C++11 TESTS 76 46 102400 1700
41547775 iShibly C Aug. 13, 2018, 6:25 a.m. OK GNU C++11 TESTS 76 46 204800 1700
31181019 MGalc C Oct. 10, 2017, 4:45 a.m. OK GNU C++14 TESTS 76 15 512000 1700
34397316 corba C Jan. 21, 2018, 2:11 a.m. OK GNU C++14 TESTS 76 30 2150400 1700
53707025 OnlyLatinLetters C May 3, 2019, 1:43 p.m. OK GNU C++14 TESTS 76 31 512000 1700
61740707 sagsango C Oct. 2, 2019, 8:06 p.m. OK GNU C++14 TESTS 76 31 716800 1700
61740810 sagsango C Oct. 2, 2019, 8:09 p.m. OK GNU C++14 TESTS 76 31 716800 1700
21838298 Amores C Oct. 28, 2016, 3:37 a.m. OK GNU C++14 TESTS 76 31 2867200 1700
22933885 aminebhs C Dec. 13, 2016, 7:21 p.m. OK GNU C++14 TESTS 76 46 409600 1700
60149790 kgcurry59 C Sept. 6, 2019, 3:09 a.m. OK GNU C++14 TESTS 76 46 409600 1700
43681574 natha C Oct. 2, 2018, 10:28 a.m. OK GNU C++14 TESTS 76 46 1024000 1700
43681758 natha C Oct. 2, 2018, 10:34 a.m. OK GNU C++14 TESTS 76 46 1024000 1700
54849273 ish.ranga11 C May 30, 2019, 3:41 p.m. OK GNU C++17 TESTS 76 31 512000 1700
38451065 madhur4127 C May 20, 2018, 7:36 a.m. OK GNU C++17 TESTS 76 46 512000 1700
47855288 brackets C Jan. 2, 2019, 9:15 p.m. OK GNU C++17 TESTS 76 46 512000 1700
44419240 CodeBreaker_6 C Oct. 16, 2018, 8:58 p.m. OK GNU C++17 TESTS 76 46 4300800 1700
49334932 tryhard C Feb. 1, 2019, 5:59 p.m. OK GNU C++17 TESTS 76 46 8704000 1700
51343400 ruo C March 15, 2019, 5:14 p.m. OK GNU C++17 TESTS 76 46 18432000 1700
37705432 _Muhammad C April 29, 2018, 9:57 a.m. OK GNU C++17 TESTS 76 46 24473600 1700
54164414 codeict C May 15, 2019, 8:02 a.m. OK GNU C++17 TESTS 76 61 512000 1700
48555295 Harolinch C Jan. 19, 2019, 5:01 a.m. OK GNU C++17 TESTS 76 61 12492800 1700
69892177 kaisergod1 C Jan. 31, 2020, 10:25 a.m. OK GNU C++17 TESTS 76 61 68300800 1700
8064394 Lesha C Oct. 3, 2014, 2:48 a.m. OK Haskell TESTS 76 78 1126400 1700
8064453 Lesha C Oct. 3, 2014, 3:04 a.m. OK Haskell TESTS 76 108 1126400 1700
2788428 cojna C Dec. 17, 2012, 5:46 p.m. OK Haskell TESTS 76 390 69324800 1700
5362332 alibaba C Dec. 6, 2013, 6:28 p.m. OK Java 6 TESTS 76 156 307200 1700
2786263 uwi C Dec. 17, 2012, 9:57 a.m. OK Java 6 TESTS 76 218 0 1700
3035390 foumani C Jan. 30, 2013, 12:45 a.m. OK Java 6 TESTS 76 218 2457600 1700
7241622 shashank201101193 C July 25, 2014, 11:19 a.m. OK Java 6 TESTS 76 264 53350400 1700
2794540 apollo C Dec. 19, 2012, 12:25 p.m. OK Java 6 TESTS 76 328 55398400 1700
2790819 MiroO C Dec. 18, 2012, 12:59 p.m. OK Java 6 TESTS 76 328 55500800 1700
2782888 gh_ost C Dec. 16, 2012, 7:25 p.m. OK Java 6 TESTS 76 328 57651200 1700
2877526 gosia C Jan. 6, 2013, 9:52 a.m. OK Java 6 TESTS 76 343 55193600 1700
2804549 xamxam23 C Dec. 21, 2012, 6:19 p.m. OK Java 6 TESTS 76 359 139059200 1700
2781467 devilofaboy C Dec. 16, 2012, 5:15 p.m. OK Java 6 TESTS 76 375 2355200 1700
2788434 di_halt C Dec. 17, 2012, 5:48 p.m. OK Java 7 TESTS 76 203 204800 1700
2788383 di_halt C Dec. 17, 2012, 5:35 p.m. OK Java 7 TESTS 76 234 102400 1700
2788422 di_halt C Dec. 17, 2012, 5:44 p.m. OK Java 7 TESTS 76 250 204800 1700
18952849 aladdin3 C July 7, 2016, 1:58 p.m. OK Java 7 TESTS 76 265 0 1700
2782672 pine C Dec. 16, 2012, 7:17 p.m. OK Java 7 TESTS 76 265 204800 1700
2784348 nitegazer C Dec. 17, 2012, 2:59 a.m. OK Java 7 TESTS 76 281 102400 1700
9282341 upsolving C Dec. 27, 2014, 9:03 a.m. OK Java 7 TESTS 76 296 52633600 1700
13954176 vjudge5 C Oct. 30, 2015, 2:23 p.m. OK Java 7 TESTS 76 327 142233600 1700
2778214 HAPKOMAH C Dec. 16, 2012, 4:24 p.m. OK Java 7 TESTS 76 343 139468800 1700
10312503 mohamednabil00000 C March 17, 2015, 4:12 p.m. OK Java 7 TESTS 76 358 153292800 1700
26989893 jwozniak C May 10, 2017, 5 a.m. OK Java 8 TESTS 76 124 0 1700
65134381 dtsarun C Nov. 16, 2019, 5:26 a.m. OK Java 8 TESTS 76 156 0 1700
40754122 Vaibhav96 C July 25, 2018, 8:13 p.m. OK Java 8 TESTS 76 202 2662400 1700
54862973 alphacarrot C May 31, 2019, 4 a.m. OK Java 8 TESTS 76 218 76185600 1700
28959309 vaibhav28 C July 28, 2017, 5:40 p.m. OK Java 8 TESTS 76 233 25395200 1700
69540551 sunnycarlos C Jan. 25, 2020, 9:12 p.m. OK Java 8 TESTS 76 233 75980800 1700
54862864 alphacarrot C May 31, 2019, 3:55 a.m. OK Java 8 TESTS 76 233 76083200 1700
67700747 adarsh000321 C Dec. 27, 2019, 2:32 p.m. OK Java 8 TESTS 76 233 77414400 1700
38939368 Golmol C June 4, 2018, 9 a.m. OK Java 8 TESTS 76 233 98611200 1700
27290712 Kammola C May 22, 2017, 8:06 p.m. OK Java 8 TESTS 76 234 0 1700
2874374 mukel C Jan. 4, 2013, 10:02 p.m. OK Mono C# TESTS 76 218 10547200 1700
2949690 jonyrock C Jan. 17, 2013, 7:59 a.m. OK Mono C# TESTS 76 1312 2560000 1700
2788574 Guliash C Dec. 17, 2012, 6:31 p.m. OK Mono C# TESTS 76 1937 8192000 1700
2798975 dannsk C Dec. 20, 2012, 2:15 p.m. OK Mono C# TESTS 76 2000 11161600 1700
15555575 og.kostya C Jan. 24, 2016, 12:50 p.m. OK MS C# TESTS 76 92 4300800 1700
2785229 ztimin C Dec. 17, 2012, 6:37 a.m. OK MS C++ TESTS 76 31 68300800 1700
2792077 tomas.svab C Dec. 18, 2012, 6:56 p.m. OK MS C++ TESTS 76 31 68812800 1700
26499237 scorpiowf C April 19, 2017, 3:32 p.m. OK MS C++ TESTS 76 46 8089600 1700
9772659 AU.Bahosain C Feb. 8, 2015, 3:30 p.m. OK MS C++ TESTS 76 46 16179200 1700
9772597 AU.Bahosain C Feb. 8, 2015, 3:22 p.m. OK MS C++ TESTS 76 46 64409600 1700
2977914 CtrlAlt C Jan. 21, 2013, 11:16 a.m. OK MS C++ TESTS 76 46 64716800 1700
2796721 guowentian C Dec. 20, 2012, 4:21 a.m. OK MS C++ TESTS 76 46 85196800 1700
33872814 philologist C Jan. 2, 2018, 7:47 p.m. OK MS C++ TESTS 76 61 2252800 1700
6484137 veziev C April 27, 2014, 12:31 p.m. OK MS C++ TESTS 76 92 307200 1700
45479097 vjudge4 C Nov. 9, 2018, 1:52 p.m. OK MS C++ TESTS 76 93 64204800 1700
61048271 vjudge5 C Sept. 22, 2019, 5:29 a.m. OK MS C++ 2017 TESTS 76 93 64512000 1700
2807052 Darooha C Dec. 22, 2012, 1:54 p.m. OK Ocaml TESTS 76 718 66969600 1700
64704184 nosy C Nov. 11, 2019, 3:51 p.m. OK PyPy 2 TESTS 76 202 5222400 1700
56825453 anshuman16423 C July 11, 2019, 3:51 a.m. OK PyPy 2 TESTS 76 389 64921600 1700
38964341 pavankatta C June 5, 2018, 9:03 a.m. OK PyPy 2 TESTS 76 405 87859200 1700
24575052 Trunks C Feb. 10, 2017, 5:46 p.m. OK PyPy 2 TESTS 76 420 86732800 1700
67584424 r57shell C Dec. 25, 2019, 7:40 a.m. OK PyPy 3 TESTS 76 326 4198400 1700
51153496 munakoiso C March 11, 2019, 9:18 a.m. OK PyPy 3 TESTS 76 404 2355200 1700
36875082 nakulh C April 2, 2018, 10:26 a.m. OK PyPy 3 TESTS 76 436 92364800 1700
37589533 nowyyz C April 25, 2018, 7:05 a.m. OK PyPy 3 TESTS 76 467 92364800 1700
51003527 homoeconomicus C March 8, 2019, 8:02 a.m. OK PyPy 3 TESTS 76 701 65536000 1700
5591627 yugle7 C Dec. 31, 2013, 11 a.m. OK Python 2 TESTS 76 592 409600 1700
2786910 KBRCH C Dec. 17, 2012, 12:06 p.m. OK Python 2 TESTS 76 748 174080000 1700
54192542 wrong_lemma C May 15, 2019, 3:19 p.m. OK Python 3 TESTS 76 311 512000 1700
7900334 WARenie C Sept. 21, 2014, 7:22 p.m. OK Python 3 TESTS 76 374 512000 1700
42134943 Mk_Python_v1 C Aug. 26, 2018, 10:27 p.m. OK Python 3 TESTS 76 421 204800 1700
5591613 yugle7 C Dec. 31, 2013, 10:58 a.m. OK Python 3 TESTS 76 716 512000 1700
3145439 peking2 C Feb. 19, 2013, 3:21 a.m. OK Scala TESTS 76 796 68096000 1700

remove filters

Back to search problems