COMPFEST 13 - Finals Online Mirror (Unrated, ICPC Rules, Teams Preferred)

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
1575 COMPFEST 13 - Finals Online Mirror (Unrated, ICPC Rules, Teams Preferred) FINISHED False 18000 104084663 Oct. 2, 2021, 1:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 167 ) C Cyclic Sum PROGRAMMING data structures

B'Denote a cyclic sequence of size n as an array s such that s_n is adjacent to s_1 . The segment s[r, l] where l < r is the concatenation of s[r, n] and s[1, l] . You are given an array a consisting of n integers. Define b as the cyclic sequence obtained from concatenating m copies of a . Note that b has size n cdot m . You are given an integer k where k = 1 or k is a prime number. Find the number of different segments in b where the sum of elements in the segment is divisible by k . Two segments are considered different if the set of indices of the segments are different. For example, when n = 3 and m = 2 , the set of indices for segment s[2, 5] is {2, 3, 4, 5 } , and for segment s[5, 2] is {5, 6, 1, 2 } . In particular, the segments s[1, 6], s[2,1], ldots, s[6, 5] are considered as the same segment. Output the answer modulo 10^9 + 7 . The first line contains three integers n , m , and k ( 1 <= q n, m, k <= q 2 cdot 10^5 , k = 1 or k is a prime number). The second line contains n integers a_1, a_2, ldots, a_n ( 0 <= q a_i <= q 2 cdot 10^5 ). Output an integer denoting the number of different segments in b where the sum of elements in the segment is divisible by k , modulo 10^9 + 7 . In the first example, all valid segments are [1,4] , [2, 3] , [3, 5] , and [4, 2] . In the second example, one of the valid segments is [1, 5] . '...

Tutorials

COMPFEST 13 — Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
130609767 ttee C Oct. 3, 2021, 2:53 a.m. OK GNU C++14 TESTS 26 140 22220800
130599057 fr200110217102 C Oct. 2, 2021, 8:47 p.m. OK GNU C++14 TESTS 26 374 52633600
130599095 fr200110217102 C Oct. 2, 2021, 8:48 p.m. OK GNU C++14 TESTS 26 389 52633600
130603344 old_player C Oct. 2, 2021, 10:41 p.m. OK GNU C++17 TESTS 26 156 83865600
130586269 gisp_zjz C Oct. 2, 2021, 5:14 p.m. OK GNU C++17 TESTS 26 280 22220800
130586100 CloudKit crescent_yhw ooooxxxx C Oct. 2, 2021, 5:12 p.m. OK GNU C++17 TESTS 26 312 35737600
130576718 Retired_MiFaFaOvO TLE Miracle03 C Oct. 2, 2021, 3:17 p.m. OK GNU C++17 TESTS 26 889 265728000
130604416 cookiedoth rqi Egor.Lifar C Oct. 2, 2021, 11:24 p.m. OK GNU C++17 TESTS 26 997 24371200
130587745 dario2994 C Oct. 2, 2021, 5:34 p.m. OK GNU C++17 (64) TESTS 26 109 41779200
130585144 tute7627 noimi C Oct. 2, 2021, 4:59 p.m. OK GNU C++17 (64) TESTS 26 139 11776000
130587481 yatuba rniya Rubikun C Oct. 2, 2021, 5:30 p.m. OK GNU C++17 (64) TESTS 26 140 25600000
130582358 riantkb nuip mtsd C Oct. 2, 2021, 4:22 p.m. OK GNU C++17 (64) TESTS 26 170 49152000
130587098 tabr C Oct. 2, 2021, 5:25 p.m. OK GNU C++17 (64) TESTS 26 171 28262400
130595163 errorgorn C Oct. 2, 2021, 7:28 p.m. OK GNU C++17 (64) TESTS 26 374 63795200
130585059 heno239 C Oct. 2, 2021, 4:58 p.m. OK GNU C++17 (64) TESTS 26 1185 46284800

remove filters

Back to search problems