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 |
---|---|---|---|---|---|---|
1083 | Codeforces Round 526 (Div. 1) | FINISHED | False | 7200 | 187363499 | Dec. 10, 2018, 4:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 239 ) | D | The Fair Nut's getting crazy | PROGRAMMING | data structures implementation | 3400 |
B'The Fair Nut has found an array a of n integers. We call subarray l ldots r a sequence of consecutive elements of an array with indexes from l to r , i.e. a_l, a_{l+1}, a_{l+2}, ldots, a_{r-1}, a_{r} . No one knows the reason, but he calls a pair of subsegments good if and only if the following conditions are satisfied: For example a=[1, 2, 3, 5, 5] . Pairs (1 ldots 3; 2 ldots 5) and (1 ldots 2; 2 ldots 3) ) -- are good, but (1 ... 3; 2 ldots 3) and (3 ldots 4; 4 ldots 5) -- are not (subsegment 1 ldots 3 contains subsegment 2 ldots 3 , integer 5 belongs both segments, but occurs twice in subsegment 4 ldots 5 ). Help the Fair Nut to find out the number of pairs of good subsegments! The answer can be rather big so print it modulo 10^9+7 . The first line contains a single integer n ( 1 <= n <= 10^5 ) -- the length of array a . The second line contains n integers a_1, a_2, ldots, a_n ( -10^9 <= a_i <= 10^9 ) -- the array elements. Print single integer -- the number of pairs of good subsegments modulo 10^9+7 . In the first example, there is only one pair of good subsegments: (1 ldots 2, 2 ldots 3) . In the second example, there are four pairs of good subsegments: '... |
63753 |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
51221860 | Iscream2001 | D | March 12, 2019, 12:44 p.m. | OK | GNU C++11 | TESTS | 76 | 218 | 15872000 | 3400 | |
48655245 | ReaLNero1 | D | Jan. 21, 2019, 2:09 a.m. | OK | GNU C++11 | TESTS | 76 | 218 | 15872000 | 3400 | |
47725868 | orzwaz | D | Dec. 30, 2018, 2:12 p.m. | OK | GNU C++11 | TESTS | 76 | 218 | 15872000 | 3400 | |
47725972 | orzwaz | D | Dec. 30, 2018, 2:15 p.m. | OK | GNU C++11 | TESTS | 76 | 233 | 15872000 | 3400 | |
64567270 | luogu_bot2 | D | Nov. 9, 2019, 8:03 a.m. | OK | GNU C++11 | TESTS | 76 | 233 | 20889600 | 3400 | |
61405704 | zxyoi | D | Sept. 28, 2019, 6:57 a.m. | OK | GNU C++11 | TESTS | 76 | 234 | 16588800 | 3400 | |
54747960 | cppascalinux | D | May 28, 2019, 11:30 a.m. | OK | GNU C++11 | TESTS | 76 | 264 | 12083200 | 3400 | |
47546095 | george_0152 | D | Dec. 27, 2018, 10:14 a.m. | OK | GNU C++11 | TESTS | 76 | 264 | 25395200 | 3400 | |
46902042 | zhouyuyang | D | Dec. 11, 2018, 12:26 p.m. | OK | GNU C++11 | TESTS | 76 | 265 | 25395200 | 3400 | |
60471605 | lzoilxy | D | Sept. 13, 2019, 5:52 a.m. | OK | GNU C++11 | TESTS | 76 | 295 | 124108800 | 3400 | |
46881860 | Motarack | D | Dec. 10, 2018, 7:50 p.m. | OK | GNU C++14 | TESTS | 76 | 140 | 13209600 | 3400 | |
51922829 | jerome_wei | D | March 28, 2019, 5:43 a.m. | OK | GNU C++14 | TESTS | 76 | 234 | 14233600 | 3400 | |
60054991 | Scut82 | D | Sept. 5, 2019, 3:29 a.m. | OK | GNU C++14 | TESTS | 76 | 264 | 19251200 | 3400 | |
46961798 | qiqi20021026 | D | Dec. 13, 2018, 8:42 a.m. | OK | GNU C++14 | TESTS | 76 | 264 | 60620800 | 3400 | |
49643221 | Toxel | D | Feb. 9, 2019, 1 a.m. | OK | GNU C++14 | TESTS | 76 | 280 | 15462400 | 3400 | |
64559770 | Zory | D | Nov. 9, 2019, 5:34 a.m. | OK | GNU C++14 | TESTS | 76 | 280 | 20992000 | 3400 | |
51562763 | gtrhetr | D | March 20, 2019, 8:35 a.m. | OK | GNU C++14 | TESTS | 76 | 280 | 26009600 | 3400 | |
47392213 | EDAYOUB | D | Dec. 23, 2018, 8:48 a.m. | OK | GNU C++14 | TESTS | 76 | 358 | 18534400 | 3400 | |
46994123 | tmwilliamlin168 | D | Dec. 14, 2018, 7:11 a.m. | OK | GNU C++14 | TESTS | 76 | 358 | 18534400 | 3400 | |
53013718 | rainy_season | D | April 19, 2019, 1:14 p.m. | OK | GNU C++14 | TESTS | 76 | 373 | 12800000 | 3400 | |
69610940 | gongsuidashen | D | Jan. 27, 2020, 11:28 a.m. | OK | GNU C++17 | TESTS | 76 | 140 | 13209600 | 3400 | |
57935830 | nickluo | D | July 29, 2019, 10:39 a.m. | OK | GNU C++17 | TESTS | 76 | 202 | 30822400 | 3400 | |
63386289 | Shayan.P | D | Oct. 25, 2019, 1:52 p.m. | OK | GNU C++17 | TESTS | 76 | 374 | 43110400 | 3400 | |
65955584 | ngfam | D | Nov. 29, 2019, 12:41 p.m. | OK | GNU C++17 | TESTS | 76 | 452 | 27545600 | 3400 | |
47090108 | NoShowerToday | D | Dec. 16, 2018, 5:04 a.m. | OK | GNU C++17 | TESTS | 76 | 467 | 27545600 | 3400 | |
52326807 | vjudge3 | D | April 5, 2019, 1:36 a.m. | OK | GNU C++17 | TESTS | 76 | 514 | 28774400 | 3400 | |
47034041 | TsotneNatroshvili | D | Dec. 15, 2018, 11:22 a.m. | OK | GNU C++17 | TESTS | 76 | 655 | 257536000 | 3400 | |
46904835 | Benq | D | Dec. 11, 2018, 1:43 p.m. | OK | GNU C++17 | TESTS | 76 | 717 | 18124800 | 3400 | |
46883372 | Anadi | D | Dec. 10, 2018, 8:48 p.m. | OK | GNU C++17 | TESTS | 76 | 1747 | 15974400 | 3400 | |
56503156 | maroonrk | D | July 4, 2019, 7:15 a.m. | OK | GNU C++17 | TESTS | 76 | 1872 | 19251200 | 3400 | |
52739639 | AleksanderBalobanov | D | April 14, 2019, 8:16 a.m. | OK | MS C++ 2017 | TESTS | 76 | 405 | 215756800 | 3400 |
Back to search problems