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 |
---|---|---|---|---|---|---|
501 | Codeforces Round 285 (Div. 2) | FINISHED | False | 7200 | 316472423 | Jan. 12, 2015, 9 a.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 925 ) | E | Misha and Palindrome Degree | PROGRAMMING | binary search combinatorics implementation | 2800 |
B"Misha has an array of n integers indexed by integers from 1 to n. Let's define palindrome degree of array a as the number of such index pairs (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), that the elements from the l-th to the r-th one inclusive can be rearranged in such a way that the whole array will be a palindrome. In other words, pair (l, xe2 x80 x89r) should meet the condition that after some rearranging of numbers on positions from l to r, inclusive (it is allowed not to rearrange the numbers at all), for any 1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89i xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n following condition holds: a[i] xe2 x80 x89= xe2 x80 x89a[n xe2 x80 x89- xe2 x80 x89i xe2 x80 x89+ xe2 x80 x891]. Your task is to find the palindrome degree of Misha's array. The first line contains integer n (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89105). The second line contains n positive integers a[i] (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89a[i] xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n), separated by spaces -- the elements of Misha's array. In a single line print the answer to the problem. In the first sample test any possible pair (l, xe2 x80 x89r) meets the condition. In the third sample test following pairs (1, xe2 x80 x893), xe2 x80 x89(1, xe2 x80 x894), xe2 x80 x89(1, xe2 x80 x895), xe2 x80 x89(2, xe2 x80 x895) meet the condition."... |
Tutorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
13593887 | Astreb | E | Oct. 13, 2015, 2:03 p.m. | OK | FPC | TESTS | 52 | 62 | 1740800 | 2800 | |
9966871 | dashuiren | E | Feb. 23, 2015, 8:31 a.m. | OK | GNU C++ | TESTS | 52 | 15 | 3174400 | 2800 | |
20020068 | vjudge5 | E | Aug. 21, 2016, 6:24 a.m. | OK | GNU C++ | TESTS | 52 | 30 | 3072000 | 2800 | |
9967070 | dashuiren | E | Feb. 23, 2015, 8:50 a.m. | OK | GNU C++ | TESTS | 52 | 30 | 3174400 | 2800 | |
19685421 | vjudge4 | E | Aug. 7, 2016, 11:07 a.m. | OK | GNU C++ | TESTS | 52 | 30 | 3276800 | 2800 | |
9966957 | dashuiren | E | Feb. 23, 2015, 8:38 a.m. | OK | GNU C++ | TESTS | 52 | 30 | 3276800 | 2800 | |
14759273 | vjudge1 | E | Dec. 11, 2015, 2:26 p.m. | OK | GNU C++ | TESTS | 52 | 31 | 614400 | 2800 | |
10422742 | vjudge2 | E | March 24, 2015, 12:46 p.m. | OK | GNU C++ | TESTS | 52 | 31 | 614400 | 2800 | |
27010367 | vjudge3 | E | May 11, 2017, 10:44 a.m. | OK | GNU C++ | TESTS | 52 | 31 | 819200 | 2800 | |
19581418 | vjudge4 | E | Aug. 2, 2016, 2:38 p.m. | OK | GNU C++ | TESTS | 52 | 31 | 819200 | 2800 | |
19580678 | vjudge4 | E | Aug. 2, 2016, 1:56 p.m. | OK | GNU C++ | TESTS | 52 | 31 | 819200 | 2800 | |
9554851 | Mindyou | E | Jan. 26, 2015, 12:05 a.m. | OK | GNU C++0x | TESTS | 52 | 31 | 1433600 | 2800 | |
9666082 | olage | E | Feb. 1, 2015, 1:44 p.m. | OK | GNU C++0x | TESTS | 52 | 31 | 1638400 | 2800 | |
10188470 | SCUTE | E | March 7, 2015, 9:58 a.m. | OK | GNU C++0x | TESTS | 52 | 31 | 2457600 | 2800 | |
9416049 | saketh | E | Jan. 12, 2015, 12:03 p.m. | OK | GNU C++0x | TESTS | 52 | 46 | 1024000 | 2800 | |
9573730 | a00012025 | E | Jan. 27, 2015, 3:37 p.m. | OK | GNU C++0x | TESTS | 52 | 46 | 1228800 | 2800 | |
9416538 | Nero | E | Jan. 12, 2015, 12:45 p.m. | OK | GNU C++0x | TESTS | 52 | 62 | 819200 | 2800 | |
9415314 | Endagorion | E | Jan. 12, 2015, 11:26 a.m. | OK | GNU C++0x | TESTS | 52 | 62 | 2457600 | 2800 | |
9789361 | Nik_Storm_2010 | E | Feb. 10, 2015, 1:17 p.m. | OK | GNU C++0x | TESTS | 52 | 93 | 1638400 | 2800 | |
9426045 | ziemin | E | Jan. 13, 2015, 9 p.m. | OK | GNU C++0x | TESTS | 52 | 108 | 1228800 | 2800 | |
38014060 | vjudge3 | E | May 8, 2018, 7:23 a.m. | OK | GNU C11 | TESTS | 52 | 46 | 5324800 | 2800 | |
17159468 | freebsdx | E | April 4, 2016, 2:47 p.m. | OK | GNU C++11 | TESTS | 52 | 30 | 3276800 | 2800 | |
14935137 | ilyoan | E | Dec. 23, 2015, 8:13 a.m. | OK | GNU C++11 | TESTS | 52 | 31 | 614400 | 2800 | |
14935145 | vjudge4 | E | Dec. 23, 2015, 8:14 a.m. | OK | GNU C++11 | TESTS | 52 | 31 | 614400 | 2800 | |
19473736 | dhuacm6 | E | July 29, 2016, 6:32 a.m. | OK | GNU C++11 | TESTS | 52 | 31 | 819200 | 2800 | |
16080892 | SmallBoy | E | Feb. 17, 2016, 3:05 p.m. | OK | GNU C++11 | TESTS | 52 | 31 | 819200 | 2800 | |
12327187 | Luqman | E | Aug. 3, 2015, 2:48 p.m. | OK | GNU C++11 | TESTS | 52 | 31 | 819200 | 2800 | |
12294038 | wiwitrifai | E | July 31, 2015, 4:14 p.m. | OK | GNU C++11 | TESTS | 52 | 31 | 819200 | 2800 | |
11623405 | tanphatls987 | E | June 17, 2015, 5:47 p.m. | OK | GNU C++11 | TESTS | 52 | 31 | 819200 | 2800 | |
29966551 | McGinn | E | Sept. 1, 2017, 7:59 a.m. | OK | GNU C++11 | TESTS | 52 | 31 | 819200 | 2800 | |
22497044 | ershivasoni | E | Nov. 25, 2016, 8:04 p.m. | OK | GNU C++11 | TESTS | 52 | 31 | 1228800 | 2800 | |
30357191 | 3015218054 | E | Sept. 15, 2017, 5:30 a.m. | OK | GNU C++14 | TESTS | 52 | 31 | 2457600 | 2800 | |
35768591 | rawatds | E | Feb. 27, 2018, 4:14 p.m. | OK | GNU C++14 | TESTS | 52 | 31 | 2662400 | 2800 | |
32999479 | Flash-boy | E | Dec. 7, 2017, 11:52 a.m. | OK | GNU C++14 | TESTS | 52 | 31 | 3072000 | 2800 | |
28818428 | WonderMouse | E | July 24, 2017, 7:59 a.m. | OK | GNU C++14 | TESTS | 52 | 31 | 3174400 | 2800 | |
34100945 | bluefi | E | Jan. 12, 2018, 7:35 a.m. | OK | GNU C++14 | TESTS | 52 | 31 | 3481600 | 2800 | |
28898263 | wrinx | E | July 26, 2017, 8:13 a.m. | OK | GNU C++14 | TESTS | 52 | 31 | 4608000 | 2800 | |
67958206 | mota_haathi | E | Dec. 30, 2019, 10:31 a.m. | OK | GNU C++14 | TESTS | 52 | 46 | 1024000 | 2800 | |
69660924 | yan-zp | E | Jan. 28, 2020, 9:22 a.m. | OK | GNU C++14 | TESTS | 52 | 46 | 1126400 | 2800 | |
39683492 | spj_29 | E | June 26, 2018, 6:19 p.m. | OK | GNU C++14 | TESTS | 52 | 46 | 1228800 | 2800 | |
38605362 | xujiahao | E | May 25, 2018, 9:48 a.m. | OK | GNU C++14 | TESTS | 52 | 46 | 1228800 | 2800 | |
62348511 | ruo | E | Oct. 11, 2019, 8:32 a.m. | OK | GNU C++17 | TESTS | 52 | 46 | 1228800 | 2800 | |
47815326 | vjudge5 | E | Jan. 1, 2019, 2:02 p.m. | OK | GNU C++17 | TESTS | 52 | 46 | 1228800 | 2800 | |
40863425 | vjudge3 | E | July 28, 2018, 1:05 a.m. | OK | GNU C++17 | TESTS | 52 | 46 | 1228800 | 2800 | |
38503136 | FangHao | E | May 21, 2018, 4:03 p.m. | OK | GNU C++17 | TESTS | 52 | 46 | 1228800 | 2800 | |
66642917 | hjk1030 | E | Dec. 11, 2019, 3:28 p.m. | OK | GNU C++17 | TESTS | 52 | 46 | 1228800 | 2800 | |
54848293 | Fulisike | E | May 30, 2019, 3:11 p.m. | OK | GNU C++17 | TESTS | 52 | 46 | 2457600 | 2800 | |
54848228 | Fulisike | E | May 30, 2019, 3:08 p.m. | OK | GNU C++17 | TESTS | 52 | 46 | 2457600 | 2800 | |
69635645 | AM. | E | Jan. 27, 2020, 6:28 p.m. | OK | GNU C++17 | TESTS | 52 | 46 | 2560000 | 2800 | |
45555608 | vjudge1 | E | Nov. 11, 2018, 8:21 a.m. | OK | GNU C++17 | TESTS | 52 | 46 | 3174400 | 2800 | |
54314432 | mihaild | E | May 17, 2019, 5:52 p.m. | OK | GNU C++17 | TESTS | 52 | 61 | 2969600 | 2800 | |
9424481 | Aidos | E | Jan. 13, 2015, 3:36 p.m. | OK | Java 7 | TESTS | 52 | 109 | 0 | 2800 | |
17170191 | DukeOfYork | E | April 5, 2016, 11:14 a.m. | OK | Java 7 | TESTS | 52 | 124 | 39219200 | 2800 | |
9959165 | Mamok | E | Feb. 22, 2015, 12:16 p.m. | OK | Java 7 | TESTS | 52 | 233 | 0 | 2800 | |
9627244 | Asokar | E | Jan. 30, 2015, 1:57 p.m. | OK | Java 8 | TESTS | 52 | 124 | 0 | 2800 | |
9426655 | Strikeskids | E | Jan. 14, 2015, 1:46 a.m. | OK | Java 8 | TESTS | 52 | 124 | 0 | 2800 | |
9426644 | Strikeskids | E | Jan. 14, 2015, 1:39 a.m. | OK | Java 8 | TESTS | 52 | 124 | 0 | 2800 | |
9873617 | passworld | E | Feb. 16, 2015, 4:49 p.m. | OK | Java 8 | TESTS | 52 | 139 | 0 | 2800 | |
12242799 | old_arysson | E | July 27, 2015, 4:21 p.m. | OK | Java 8 | TESTS | 52 | 140 | 0 | 2800 | |
19310767 | AsadoFamiliar | E | July 22, 2016, 12:12 a.m. | OK | Java 8 | TESTS | 52 | 233 | 0 | 2800 | |
9428917 | azukun | E | Jan. 14, 2015, 11:27 a.m. | OK | MS C# | TESTS | 52 | 93 | 20889600 | 2800 | |
9428080 | ReaverSe | E | Jan. 14, 2015, 8:23 a.m. | OK | MS C++ | TESTS | 52 | 31 | 1228800 | 2800 | |
9484401 | Darkmatter | E | Jan. 20, 2015, 12:32 p.m. | OK | MS C++ | TESTS | 52 | 46 | 1228800 | 2800 | |
9439928 | shenqi | E | Jan. 16, 2015, 2:55 a.m. | OK | MS C++ | TESTS | 52 | 46 | 1228800 | 2800 | |
10420448 | SparkOO7 | E | March 24, 2015, 8:37 a.m. | OK | MS C++ | TESTS | 52 | 62 | 4300800 | 2800 | |
9443362 | tangshitao | E | Jan. 16, 2015, 12:42 p.m. | OK | MS C++ | TESTS | 52 | 78 | 1638400 | 2800 | |
9416427 | Determinator | E | Jan. 12, 2015, 12:36 p.m. | OK | MS C++ | TESTS | 52 | 78 | 6041600 | 2800 | |
38426594 | vjudge1 | E | May 19, 2018, 10:12 a.m. | OK | MS C++ | TESTS | 52 | 93 | 2662400 | 2800 | |
9416937 | bigroadaz | E | Jan. 12, 2015, 1:25 p.m. | OK | MS C++ | TESTS | 52 | 108 | 2048000 | 2800 | |
17228198 | DimonK | E | April 8, 2016, 11:49 a.m. | OK | MS C++ | TESTS | 52 | 108 | 3788800 | 2800 | |
9426183 | pacu | E | Jan. 13, 2015, 9:43 p.m. | OK | MS C++ | TESTS | 52 | 124 | 1228800 | 2800 |
Back to search problems