Codeforces Round 958 (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
1988 Codeforces Round 958 (Div. 2) FINISHED False 7200 16125863 July 15, 2024, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 1504 ) E Range Minimum Sum PROGRAMMING binary search brute force data structures implementation

B'For an array [a_1,a_2, ldots,a_n] of length n , define f(a) as the sum of the minimum element over all subsegments. That is, f(a)= sum_{l=1}^n sum_{r=l}^n min_{l <= i <= r}a_i. A permutation is a sequence of integers from 1 to n of length n containing each number exactly once. You are given a permutation [a_1,a_2, ldots,a_n] . For each i , solve the following problem independently: Each test contains multiple test cases. The first line contains the number of test cases t ( 1 <= t <= 10^5 ). Description of the test cases follows. The first line of each test case contains an integer n ( 1 <= n <= 5 cdot 10^5 ). The second line of each test case contains n distinct integers a_1, ldots,a_n ( 1 <= a_i <= n ). It is guaranteed that the sum of n over all test cases does not exceed 10^6 . For each test case, print one line containing n integers. The i -th integer should be the answer when erasing a_i . In the second test case, a=[3,1,2] . '...

Tutorials

Editorial of Codeforces Round 958 (Div. 2)

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
270793812 luogu_bot2 E July 16, 2024, 2:14 a.m. OK C++14 (GCC 6-32) TESTS 33 905 110796800
270753598 zoinkssss E July 15, 2024, 6:11 p.m. OK C++14 (GCC 6-32) TESTS 33 906 60108800
270753857 zoinkssss E July 15, 2024, 6:13 p.m. OK C++14 (GCC 6-32) TESTS 33 983 60108800
270792118 Guitar_Jasmine E July 16, 2024, 1:57 a.m. OK C++14 (GCC 6-32) TESTS 33 1093 49254400
270800496 lishiao3405 E July 16, 2024, 3:21 a.m. OK C++14 (GCC 6-32) TESTS 33 1108 59904000
270785754 seanlsy E July 16, 2024, 12:47 a.m. OK C++14 (GCC 6-32) TESTS 33 1140 62156800
270757812 Darko1 E July 15, 2024, 6:41 p.m. OK C++14 (GCC 6-32) TESTS 33 1234 22016000
270789529 hqmm E July 16, 2024, 1:29 a.m. OK C++14 (GCC 6-32) TESTS 33 1249 96256000
270783862 TLE_Automaton E July 16, 2024, 12:20 a.m. OK C++14 (GCC 6-32) TESTS 33 1312 71680000
270793720 luogu_bot5 E July 16, 2024, 2:13 a.m. OK C++14 (GCC 6-32) TESTS 33 1749 110899200
270760327 berr E July 15, 2024, 7:02 p.m. OK C++17 (GCC 7-32) TESTS 33 703 20377600
270779980 smiley E July 15, 2024, 11:10 p.m. OK C++17 (GCC 7-32) TESTS 33 718 21708800
270760613 berr E July 15, 2024, 7:05 p.m. OK C++17 (GCC 7-32) TESTS 33 718 24371200
270786851 Grice E July 16, 2024, 1:02 a.m. OK C++17 (GCC 7-32) TESTS 33 749 92467200
270744306 Mkswll E July 15, 2024, 5:21 p.m. OK C++17 (GCC 7-32) TESTS 33 796 20377600
270768893 zzhrwww E July 15, 2024, 8:27 p.m. OK C++17 (GCC 7-32) TESTS 33 827 34816000
270782191 _cly_ E July 15, 2024, 11:53 p.m. OK C++17 (GCC 7-32) TESTS 33 843 182579200
270774897 raghdaanihad2030 E July 15, 2024, 9:41 p.m. OK C++17 (GCC 7-32) TESTS 33 874 45568000
270801883 2022hanscome E July 16, 2024, 3:35 a.m. OK C++17 (GCC 7-32) TESTS 33 953 109158400
270803503 im.priyansh E July 16, 2024, 3:51 a.m. OK C++17 (GCC 7-32) TESTS 33 968 48537600
270766748 kaiboy E July 15, 2024, 8:04 p.m. OK C++20 (GCC 13-64) TESTS 33 343 16076800
270799772 dcchendada E July 16, 2024, 3:14 a.m. OK C++20 (GCC 13-64) TESTS 33 405 57241600
270799729 dcchendada E July 16, 2024, 3:14 a.m. OK C++20 (GCC 13-64) TESTS 33 405 57241600
270760720 berr E July 15, 2024, 7:06 p.m. OK C++20 (GCC 13-64) TESTS 33 436 24473600
270760269 berr E July 15, 2024, 7:02 p.m. OK C++20 (GCC 13-64) TESTS 33 437 20377600
270759838 berr E July 15, 2024, 6:58 p.m. OK C++20 (GCC 13-64) TESTS 33 437 24371200
270759749 berr E July 15, 2024, 6:57 p.m. OK C++20 (GCC 13-64) TESTS 33 437 24473600
270765244 Yzm007 E July 15, 2024, 7:50 p.m. OK C++20 (GCC 13-64) TESTS 33 437 26112000
270790921 Duck_sajin E July 16, 2024, 1:44 a.m. OK C++20 (GCC 13-64) TESTS 33 452 12083200
270760642 berr E July 15, 2024, 7:05 p.m. OK C++20 (GCC 13-64) TESTS 33 452 24473600
270744682 Dukkha E July 15, 2024, 5:22 p.m. OK Java 21 TESTS 33 687 16691200
270769586 dzhi E July 15, 2024, 8:35 p.m. OK Java 21 TESTS 33 3030 170598400
270783661 profchi E July 16, 2024, 12:17 a.m. OK Java 8 TESTS 33 2171 237875200
270783526 profchi E July 16, 2024, 12:15 a.m. OK Java 8 TESTS 33 2717 463155200
270745570 BlackSpectre E July 15, 2024, 5:26 p.m. OK PyPy 3-64 TESTS 33 1827 245862400
270751278 misorin E July 15, 2024, 5:56 p.m. OK PyPy 3-64 TESTS 33 2140 189747200
270814139 xxh1999 E July 16, 2024, 5:44 a.m. OK PyPy 3-64 TESTS 33 2265 308428800
270748264 TheAbbie E July 15, 2024, 5:39 p.m. OK PyPy 3-64 TESTS 33 3359 274739200

remove filters

Back to search problems