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 |
601
|
Codeforces Round 333 (Div. 1) |
FINISHED |
False |
7200 |
283440299 |
Nov. 24, 2015, 4:35 p.m. |
Problems
B"A function is called Lipschitz continuous if there is a real constant K such that the inequality |f(x) xe2 x80 x89- xe2 x80 x89f(y)| xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89K xc2 xb7|x xe2 x80 x89- xe2 x80 x89y| holds for all . We'll deal with a more... discrete version of this term. For an array , we define it's Lipschitz constant as follows: In other words, is the smallest non-negative integer such that |h[i] xe2 x80 x89- xe2 x80 x89h[j]| xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89L xc2 xb7|i xe2 x80 x89- xe2 x80 x89j| holds for all 1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89i, xe2 x80 x89j xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n. You are given an array of size n and q queries of the form [l, xe2 x80 x89r]. For each query, consider the subarray ; determine the sum of Lipschitz constants of all subarrays of . The first line of the input contains two space-separated integers n and q (2 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89100 xe2 x80 x89000 and 1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89q xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89100) -- the number of elements in array and the number of queries respectively. The second line contains n space-separated integers (). The following q lines describe queries. The i-th of those lines contains two space-separated integers li and ri (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89li xe2 x80 x89< xe2 x80 x89ri xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n). Print the answers to all queries in the order in which they are given in the input. For the i-th query, print one line containing a single integer -- the sum of Lipschitz constants of all subarrays of . In the first query of the first sample, the Lipschitz constants of subarrays of with length at least 2 are: The answer to the query is their sum."... |
Tutorials
Submissions
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
14452650 |
Gassa |
B |
Nov. 24, 2015, 5:48 p.m. |
OK |
D |
TESTS |
67 |
202 |
11059200 |
|
2200 |
14578854 |
abcxyz1 |
B |
Dec. 1, 2015, 1:31 a.m. |
OK |
FPC |
TESTS |
67 |
124 |
1740800 |
|
2200 |
15144318 |
HappyNewYearMike |
B |
Jan. 1, 2016, 12:47 a.m. |
OK |
FPC |
TESTS |
67 |
139 |
1740800 |
|
2200 |
14508282 |
ThereIsNoSalvationForMe |
B |
Nov. 27, 2015, 9:09 a.m. |
OK |
FPC |
TESTS |
67 |
156 |
2150400 |
|
2200 |
14556599 |
ez_zkj |
B |
Nov. 29, 2015, 10:48 a.m. |
OK |
FPC |
TESTS |
67 |
171 |
1638400 |
|
2200 |
15896945 |
Int2k |
B |
Feb. 8, 2016, 2:16 p.m. |
OK |
FPC |
TESTS |
67 |
249 |
1638400 |
|
2200 |
14579059 |
hakunokishinami |
B |
Dec. 1, 2015, 2:33 a.m. |
OK |
FPC |
TESTS |
67 |
312 |
2457600 |
|
2200 |
14570973 |
FrostStar |
B |
Nov. 30, 2015, 1:26 p.m. |
OK |
FPC |
TESTS |
67 |
312 |
3993600 |
|
2200 |
40985635 |
ReaLNero1 |
B |
July 30, 2018, 8:03 p.m. |
OK |
GNU C |
TESTS |
67 |
61 |
2662400 |
|
2200 |
27476397 |
dwjshift |
B |
June 1, 2017, 2:24 a.m. |
OK |
GNU C++ |
TESTS |
67 |
31 |
6348800 |
|
2200 |
14454551 |
KrK |
B |
Nov. 24, 2015, 6:08 p.m. |
OK |
GNU C++ |
TESTS |
67 |
46 |
1433600 |
|
2200 |
14460849 |
shdut |
B |
Nov. 25, 2015, 12:18 a.m. |
OK |
GNU C++ |
TESTS |
67 |
46 |
1638400 |
|
2200 |
41388557 |
Scut82 |
B |
Aug. 9, 2018, 7:16 a.m. |
OK |
GNU C++ |
TESTS |
67 |
46 |
1638400 |
|
2200 |
20383131 |
XuYipei |
B |
Sept. 4, 2016, 1:25 p.m. |
OK |
GNU C++ |
TESTS |
67 |
46 |
1638400 |
|
2200 |
14476208 |
boomshine |
B |
Nov. 25, 2015, 5 p.m. |
OK |
GNU C++ |
TESTS |
67 |
46 |
2150400 |
|
2200 |
14697870 |
cctt |
B |
Dec. 8, 2015, 12:35 p.m. |
OK |
GNU C++ |
TESTS |
67 |
46 |
2457600 |
|
2200 |
32091822 |
Blue233333 |
B |
Nov. 6, 2017, 10:52 a.m. |
OK |
GNU C++ |
TESTS |
67 |
46 |
3993600 |
|
2200 |
18072591 |
Gintoki |
B |
May 25, 2016, 2:02 p.m. |
OK |
GNU C++ |
TESTS |
67 |
46 |
5836800 |
|
2200 |
14450992 |
19891101 |
B |
Nov. 24, 2015, 5:32 p.m. |
OK |
GNU C++ |
TESTS |
67 |
61 |
1638400 |
|
2200 |
59634366 |
rainboy |
B |
Aug. 28, 2019, 7:49 p.m. |
OK |
GNU C11 |
TESTS |
67 |
171 |
1740800 |
|
2200 |
59633828 |
rainboy |
B |
Aug. 28, 2019, 7:32 p.m. |
OK |
GNU C11 |
TESTS |
67 |
670 |
2150400 |
|
2200 |
59634145 |
rainboy |
B |
Aug. 28, 2019, 7:41 p.m. |
OK |
GNU C11 |
TESTS |
67 |
686 |
1740800 |
|
2200 |
21980626 |
lzr010506 |
B |
Nov. 2, 2016, 2:09 a.m. |
OK |
GNU C++11 |
TESTS |
67 |
46 |
1331200 |
|
2200 |
57883569 |
lopare |
B |
July 28, 2019, 8:52 a.m. |
OK |
GNU C++11 |
TESTS |
67 |
46 |
1638400 |
|
2200 |
16727430 |
abcdeedcba |
B |
March 15, 2016, 1:03 p.m. |
OK |
GNU C++11 |
TESTS |
67 |
46 |
1945600 |
|
2200 |
27300456 |
Manchery |
B |
May 23, 2017, 11:51 a.m. |
OK |
GNU C++11 |
TESTS |
67 |
46 |
1945600 |
|
2200 |
20559185 |
rxdoi |
B |
Sept. 13, 2016, 2:43 a.m. |
OK |
GNU C++11 |
TESTS |
67 |
46 |
2048000 |
|
2200 |
49939521 |
vjudge5 |
B |
Feb. 15, 2019, 8:55 a.m. |
OK |
GNU C++11 |
TESTS |
67 |
46 |
2048000 |
|
2200 |
14470106 |
PPFish |
B |
Nov. 25, 2015, 1:34 p.m. |
OK |
GNU C++11 |
TESTS |
67 |
46 |
2048000 |
|
2200 |
52606645 |
vjudge3 |
B |
April 11, 2019, 2:09 p.m. |
OK |
GNU C++11 |
TESTS |
67 |
46 |
16076800 |
|
2200 |
14449327 |
tanphatls987 |
B |
Nov. 24, 2015, 5:17 p.m. |
OK |
GNU C++11 |
TESTS |
67 |
61 |
1638400 |
|
2200 |
49939598 |
IDDFS |
B |
Feb. 15, 2019, 8:57 a.m. |
OK |
GNU C++11 |
TESTS |
67 |
61 |
2048000 |
|
2200 |
27557834 |
Tooc0ld |
B |
June 4, 2017, 7:30 a.m. |
OK |
GNU C++14 |
TESTS |
67 |
62 |
1843200 |
|
2200 |
67311557 |
thantrongtri3 |
B |
Dec. 21, 2019, 3:16 a.m. |
OK |
GNU C++14 |
TESTS |
67 |
62 |
2252800 |
|
2200 |
58678696 |
Thanhxuanlahoitiec |
B |
Aug. 12, 2019, 5:48 p.m. |
OK |
GNU C++14 |
TESTS |
67 |
62 |
2560000 |
|
2200 |
23621055 |
xiaoxiaobaozi |
B |
Jan. 7, 2017, 9:43 a.m. |
OK |
GNU C++14 |
TESTS |
67 |
62 |
3891200 |
|
2200 |
65686858 |
marcOS |
B |
Nov. 25, 2019, 12:45 a.m. |
OK |
GNU C++14 |
TESTS |
67 |
77 |
2150400 |
|
2200 |
27844798 |
islamtaha |
B |
June 17, 2017, 11:33 a.m. |
OK |
GNU C++14 |
TESTS |
67 |
77 |
2252800 |
|
2200 |
23386113 |
Ali.Pi |
B |
Dec. 28, 2016, 8:03 p.m. |
OK |
GNU C++14 |
TESTS |
67 |
77 |
3481600 |
|
2200 |
29494033 |
NiroBC |
B |
Aug. 16, 2017, 1:27 a.m. |
OK |
GNU C++14 |
TESTS |
67 |
77 |
3481600 |
|
2200 |
61791044 |
AS.82 |
B |
Oct. 3, 2019, 3:54 p.m. |
OK |
GNU C++14 |
TESTS |
67 |
77 |
3788800 |
|
2200 |
63785040 |
boatinw99 |
B |
Oct. 30, 2019, 12:05 p.m. |
OK |
GNU C++14 |
TESTS |
67 |
77 |
4300800 |
|
2200 |
49899032 |
vjudge4 |
B |
Feb. 14, 2019, 8:23 a.m. |
OK |
GNU C++17 |
TESTS |
67 |
62 |
1638400 |
|
2200 |
67998291 |
ruo |
B |
Dec. 31, 2019, 9:23 a.m. |
OK |
GNU C++17 |
TESTS |
67 |
62 |
1638400 |
|
2200 |
50153870 |
vjudge3 |
B |
Feb. 19, 2019, 8:56 a.m. |
OK |
GNU C++17 |
TESTS |
67 |
62 |
1740800 |
|
2200 |
63634684 |
LeiviniaBirdway |
B |
Oct. 28, 2019, 7:46 a.m. |
OK |
GNU C++17 |
TESTS |
67 |
62 |
2662400 |
|
2200 |
42062421 |
staffik |
B |
Aug. 24, 2018, 5:45 p.m. |
OK |
GNU C++17 |
TESTS |
67 |
77 |
3788800 |
|
2200 |
44153642 |
Ging_ |
B |
Oct. 11, 2018, 5:21 p.m. |
OK |
GNU C++17 |
TESTS |
67 |
78 |
2048000 |
|
2200 |
57769283 |
Phortox |
B |
July 25, 2019, 11:03 p.m. |
OK |
GNU C++17 |
TESTS |
67 |
78 |
2150400 |
|
2200 |
62908201 |
luogu_bot3 |
B |
Oct. 19, 2019, 6:30 a.m. |
OK |
GNU C++17 |
TESTS |
67 |
78 |
2662400 |
|
2200 |
42008415 |
maras |
B |
Aug. 23, 2018, 8:23 p.m. |
OK |
GNU C++17 |
TESTS |
67 |
78 |
13107200 |
|
2200 |
41395265 |
GJC |
B |
Aug. 9, 2018, 10:44 a.m. |
OK |
GNU C++17 |
TESTS |
67 |
93 |
2355200 |
|
2200 |
14474996 |
edorundo |
B |
Nov. 25, 2015, 3:46 p.m. |
OK |
Java 7 |
TESTS |
67 |
217 |
0 |
|
2200 |
14463149 |
KNIGHT0X300 |
B |
Nov. 25, 2015, 5:33 a.m. |
OK |
Java 7 |
TESTS |
67 |
826 |
0 |
|
2200 |
14485660 |
gpita |
B |
Nov. 25, 2015, 9:55 p.m. |
OK |
Java 7 |
TESTS |
67 |
998 |
0 |
|
2200 |
14460073 |
AlexFetisov |
B |
Nov. 24, 2015, 10:12 p.m. |
OK |
Java 8 |
TESTS |
67 |
187 |
0 |
|
2200 |
14454554 |
Azat_Yusupov |
B |
Nov. 24, 2015, 6:08 p.m. |
OK |
Java 8 |
TESTS |
67 |
187 |
0 |
|
2200 |
14646718 |
Code.coding |
B |
Dec. 4, 2015, 11:33 a.m. |
OK |
Java 8 |
TESTS |
67 |
202 |
0 |
|
2200 |
14451920 |
uwi |
B |
Nov. 24, 2015, 5:40 p.m. |
OK |
Java 8 |
TESTS |
67 |
202 |
0 |
|
2200 |
14466015 |
mashinist |
B |
Nov. 25, 2015, 9:10 a.m. |
OK |
Java 8 |
TESTS |
67 |
217 |
0 |
|
2200 |
14464413 |
Ruins |
B |
Nov. 25, 2015, 7:30 a.m. |
OK |
Java 8 |
TESTS |
67 |
217 |
0 |
|
2200 |
27565724 |
Kammola |
B |
June 4, 2017, 2:16 p.m. |
OK |
Java 8 |
TESTS |
67 |
218 |
0 |
|
2200 |
22027373 |
EmThoDau |
B |
Nov. 4, 2016, 5:32 a.m. |
OK |
Java 8 |
TESTS |
67 |
218 |
0 |
|
2200 |
14632640 |
Yury_Bandarchuk |
B |
Dec. 3, 2015, 11:08 a.m. |
OK |
Java 8 |
TESTS |
67 |
218 |
0 |
|
2200 |
27570894 |
AhmedSoliman |
B |
June 4, 2017, 9:28 p.m. |
OK |
Java 8 |
TESTS |
67 |
218 |
204800 |
|
2200 |
14463293 |
og.kostya |
B |
Nov. 25, 2015, 5:48 a.m. |
OK |
MS C# |
TESTS |
67 |
93 |
1638400 |
|
2200 |
14537950 |
camypaper |
B |
Nov. 28, 2015, 9:17 a.m. |
OK |
MS C# |
TESTS |
67 |
296 |
6246400 |
|
2200 |
14469652 |
azukun |
B |
Nov. 25, 2015, 1:05 p.m. |
OK |
MS C# |
TESTS |
67 |
296 |
23552000 |
|
2200 |
14460280 |
Neverauskas |
B |
Nov. 24, 2015, 10:45 p.m. |
OK |
MS C# |
TESTS |
67 |
342 |
34201600 |
|
2200 |
50275649 |
vjudge1 |
B |
Feb. 21, 2019, 9:50 a.m. |
OK |
MS C++ |
TESTS |
67 |
62 |
1228800 |
|
2200 |
50211495 |
vjudge2 |
B |
Feb. 20, 2019, 12:22 a.m. |
OK |
MS C++ |
TESTS |
67 |
62 |
2048000 |
|
2200 |
14454640 |
TonySnark |
B |
Nov. 24, 2015, 6:09 p.m. |
OK |
MS C++ |
TESTS |
67 |
62 |
2457600 |
|
2200 |
58316107 |
vjudge3 |
B |
Aug. 5, 2019, 2:59 a.m. |
OK |
MS C++ |
TESTS |
67 |
62 |
3993600 |
|
2200 |
14451701 |
AleksanderBalobanov |
B |
Nov. 24, 2015, 5:38 p.m. |
OK |
MS C++ |
TESTS |
67 |
62 |
4812800 |
|
2200 |
49944184 |
vjudge2 |
B |
Feb. 15, 2019, 11:17 a.m. |
OK |
MS C++ |
TESTS |
67 |
77 |
2048000 |
|
2200 |
49895993 |
vjudge2 |
B |
Feb. 14, 2019, 6:57 a.m. |
OK |
MS C++ |
TESTS |
67 |
77 |
2048000 |
|
2200 |
14452758 |
Death_Knight_DK |
B |
Nov. 24, 2015, 5:49 p.m. |
OK |
MS C++ |
TESTS |
67 |
77 |
2457600 |
|
2200 |
49895634 |
vjudge1 |
B |
Feb. 14, 2019, 6:46 a.m. |
OK |
MS C++ |
TESTS |
67 |
78 |
2048000 |
|
2200 |
14462576 |
ZJZNKU |
B |
Nov. 25, 2015, 4:31 a.m. |
OK |
MS C++ |
TESTS |
67 |
78 |
2457600 |
|
2200 |
14475240 |
ikatanic |
B |
Nov. 25, 2015, 4 p.m. |
OK |
Ocaml |
TESTS |
67 |
920 |
5632000 |
|
2200 |
14462243 |
rpy3cpp |
B |
Nov. 25, 2015, 3:50 a.m. |
OK |
PyPy 3 |
TESTS |
67 |
514 |
11980800 |
|
2200 |
35895769 |
_____k_____ |
B |
March 3, 2018, 4:52 p.m. |
OK |
PyPy 3 |
TESTS |
67 |
608 |
33382400 |
|
2200 |
35895169 |
______n______ |
B |
March 3, 2018, 4:36 p.m. |
OK |
PyPy 3 |
TESTS |
67 |
608 |
33382400 |
|
2200 |
35895084 |
______u______ |
B |
March 3, 2018, 4:35 p.m. |
OK |
PyPy 3 |
TESTS |
67 |
608 |
33382400 |
|
2200 |
35894844 |
_____i_____ |
B |
March 3, 2018, 4:30 p.m. |
OK |
PyPy 3 |
TESTS |
67 |
608 |
33382400 |
|
2200 |
35886633 |
______h______ |
B |
March 3, 2018, 1:50 p.m. |
OK |
PyPy 3 |
TESTS |
67 |
608 |
33382400 |
|
2200 |
35885994 |
______k______ |
B |
March 3, 2018, 1:38 p.m. |
OK |
PyPy 3 |
TESTS |
67 |
608 |
33382400 |
|
2200 |
35885126 |
______i______ |
B |
March 3, 2018, 1:22 p.m. |
OK |
PyPy 3 |
TESTS |
67 |
608 |
33382400 |
|
2200 |
35883243 |
______M______ |
B |
March 3, 2018, 12:50 p.m. |
OK |
PyPy 3 |
TESTS |
67 |
608 |
33382400 |
|
2200 |
33139747 |
yugle7 |
B |
Dec. 11, 2017, 9:41 p.m. |
OK |
PyPy 3 |
TESTS |
67 |
733 |
35123200 |
|
2200 |
remove filters
Back to search problems