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 |
---|---|---|---|---|---|---|
1098 | Codeforces Round 530 (Div. 1) | FINISHED | False | 9000 | 185117099 | Jan. 5, 2019, 4:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 224 ) | E | Fedya the Potter | PROGRAMMING | binary search implementation math number theory | 3400 |
B"Fedya loves problems involving data structures. Especially ones about different queries on subsegments. Fedya had a nice array a_1, a_2, ldots a_n and a beautiful data structure. This data structure, given l and r , 1 <= l <= r <= n , could find the greatest integer d , such that d divides each of a_l , a_{l+1} , ..., a_{r} . Fedya really likes this data structure, so he applied it to every non-empty contiguous subarray of array a , put all answers into the array and sorted it. He called this array b . It's easy to see that array b contains n(n+1)/2 elements. After that, Fedya implemented another cool data structure, that allowed him to find sum b_l + b_{l+1} + ldots + b_r for given l and r , 1 <= l <= r <= n(n+1)/2 . Surely, Fedya applied this data structure to every contiguous subarray of array b , called the result c and sorted it. Help Fedya find the lower median of array c . Recall that for a sorted array of length k the lower median is an element at position lfloor frac{k + 1}{2} rfloor , if elements of the array are enumerated starting from 1 . For example, the lower median of array (1, 1, 2, 3, 6) is 2 , and the lower median of (0, 17, 23, 96) is 17 . First line contains a single integer n -- number of elements in array a ( 1 <= n <= 50 ,000 ). Second line contains n integers a_1, a_2, ldots, a_n -- elements of the array ( 1 <= a_i <= 100 ,000 ). Print a single integer -- the lower median of array c . In the first sample array b is equal to {3, 3, 6} , then array c is equal to {3, 3, 6, 6, 9, 12} , so the lower median is 6 . In the second sample b is {8, 8, 8} , c is {8, 8, 8, 16, 16, 24} , so the lower median is 8 . "... |
64331 |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
48099460 | hos.lyric | E | Jan. 8, 2019, 7:18 p.m. | OK | D | TESTS | 45 | 701 | 25497600 | 3400 | |
48272366 | samjia2000 | E | Jan. 12, 2019, 3:19 a.m. | OK | GNU C++11 | TESTS | 45 | 156 | 3686400 | 3400 | |
61920330 | cocotea | E | Oct. 5, 2019, 1:11 p.m. | OK | GNU C++11 | TESTS | 45 | 171 | 56115200 | 3400 | |
48017538 | adkroxx | E | Jan. 6, 2019, 1:18 a.m. | OK | GNU C++11 | TESTS | 45 | 202 | 13312000 | 3400 | |
60006485 | HyscereXD | E | Sept. 4, 2019, 10:40 a.m. | OK | GNU C++11 | TESTS | 45 | 218 | 48947200 | 3400 | |
53268041 | dragonslayerintraining | E | April 25, 2019, 3:43 a.m. | OK | GNU C++11 | TESTS | 45 | 234 | 12902400 | 3400 | |
53267987 | dragonslayerintraining | E | April 25, 2019, 3:40 a.m. | OK | GNU C++11 | TESTS | 45 | 234 | 12902400 | 3400 | |
60018166 | HyscereXD | E | Sept. 4, 2019, 12:31 p.m. | OK | GNU C++11 | TESTS | 45 | 234 | 48947200 | 3400 | |
60018062 | HyscereXD | E | Sept. 4, 2019, 12:30 p.m. | OK | GNU C++11 | TESTS | 45 | 234 | 48947200 | 3400 | |
59996587 | luogu_bot4 | E | Sept. 4, 2019, 9:53 a.m. | OK | GNU C++11 | TESTS | 45 | 249 | 19251200 | 3400 | |
50519724 | Iuogu_bot2 | E | Feb. 26, 2019, 8:44 a.m. | OK | GNU C++11 | TESTS | 45 | 249 | 19251200 | 3400 | |
60325894 | Scut82 | E | Sept. 10, 2019, 1:22 a.m. | OK | GNU C++14 | TESTS | 45 | 202 | 6246400 | 3400 | |
50519784 | yzyyyIx | E | Feb. 26, 2019, 8:45 a.m. | OK | GNU C++14 | TESTS | 45 | 202 | 7065600 | 3400 | |
48011091 | Um_nik | E | Jan. 5, 2019, 7:03 p.m. | OK | GNU C++14 | TESTS | 45 | 217 | 5632000 | 3400 | |
50519764 | Iuogu_bot2 | E | Feb. 26, 2019, 8:45 a.m. | OK | GNU C++14 | TESTS | 45 | 218 | 5632000 | 3400 | |
48047914 | Shievera | E | Jan. 7, 2019, 5:57 a.m. | OK | GNU C++14 | TESTS | 45 | 218 | 5632000 | 3400 | |
56602988 | zsyzsy | E | July 6, 2019, 2:19 a.m. | OK | GNU C++14 | TESTS | 45 | 234 | 3174400 | 3400 | |
48045606 | apiadu | E | Jan. 7, 2019, 2:23 a.m. | OK | GNU C++14 | TESTS | 45 | 249 | 1945600 | 3400 | |
47996318 | kiwikiwi | E | Jan. 5, 2019, 5:42 p.m. | OK | GNU C++14 | TESTS | 45 | 249 | 13824000 | 3400 | |
48014740 | neal | E | Jan. 5, 2019, 9:29 p.m. | OK | GNU C++14 | TESTS | 45 | 265 | 3993600 | 3400 | |
55933223 | gtrhetr | E | June 22, 2019, 12:35 p.m. | OK | GNU C++14 | TESTS | 45 | 265 | 4812800 | 3400 | |
48654344 | ReaLNero1 | E | Jan. 21, 2019, 1:29 a.m. | OK | GNU C++17 | TESTS | 45 | 186 | 7065600 | 3400 | |
48319272 | bmerry | E | Jan. 13, 2019, 8:20 a.m. | OK | GNU C++17 | TESTS | 45 | 186 | 7065600 | 3400 | |
48055629 | Egor.Lifar | E | Jan. 7, 2019, 12:08 p.m. | OK | GNU C++17 | TESTS | 45 | 187 | 4710400 | 3400 | |
51775559 | Radewoosh | E | March 23, 2019, 9:22 p.m. | OK | GNU C++17 | TESTS | 45 | 202 | 3788800 | 3400 | |
48775987 | Nakagawa.Kanon | E | Jan. 23, 2019, 4:01 a.m. | OK | GNU C++17 | TESTS | 45 | 202 | 27648000 | 3400 | |
49133304 | maroonrk | E | Jan. 29, 2019, 6:09 a.m. | OK | GNU C++17 | TESTS | 45 | 218 | 16588800 | 3400 | |
69610493 | gongsuidashen | E | Jan. 27, 2020, 11:19 a.m. | OK | GNU C++17 | TESTS | 45 | 234 | 3174400 | 3400 | |
48075246 | saketh | E | Jan. 8, 2019, 4:05 a.m. | OK | GNU C++17 | TESTS | 45 | 234 | 4710400 | 3400 | |
48311035 | maximumSHOT | E | Jan. 13, 2019, 1:46 a.m. | OK | GNU C++17 | TESTS | 45 | 234 | 11571200 | 3400 | |
48311055 | maximumSHOT | E | Jan. 13, 2019, 1:47 a.m. | OK | GNU C++17 | TESTS | 45 | 249 | 11673600 | 3400 | |
48009170 | Petr | E | Jan. 5, 2019, 6:53 p.m. | OK | Java 8 | TESTS | 45 | 405 | 10547200 | 3400 |
Back to search problems