Codeforces Round 869 (Div. 1)

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
1817 Codeforces Round 869 (Div. 1) FINISHED False 8100 54487463 April 29, 2023, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 1042 ) C Similar Polynomials PROGRAMMING math

B"A polynomial A(x) of degree d is an expression of the form A(x) = a_0 + a_1 x + a_2 x^2 + ... + a_d x^d , where a_i are integers, and a_d neq 0 . Two polynomials A(x) and B(x) are called similar if there is an integer s such that for any integer x it holds that B(x) equiv A(x+s) pmod{10^9+7}. For two similar polynomials A(x) and B(x) of degree d , you're given their values in the points x=0,1, ... , d modulo 10^9+7 . Find a value s such that B(x) equiv A(x+s) pmod{10^9+7} for all integers x . The first line contains a single integer d ( 1 <= d <= 2 ,500 ,000 ). The second line contains d+1 integers A(0), A(1), ldots, A(d) ( 0 <= A(i) < 10^9+7 ) -- the values of the polynomial A(x) . The third line contains d+1 integers B(0), B(1), ldots, B(d) ( 0 <= B(i) < 10^9+7 ) -- the values of the polynomial B(x) . It is guaranteed that A(x) and B(x) are similar and that the leading coefficients (i.e., the coefficients in front of x^d ) of A(x) and B(x) are not divisible by 10^9+7 . Print a single integer s ( 0 <= q s < 10^9+7 ) such that B(x) equiv A(x+s) pmod{10^9+7} for all integers x . If there are multiple solutions, print any. In the first example, A(x) equiv x-1 pmod{10^9+7} and B(x) equiv x+2 pmod{10^9+7} . They're similar because B(x) equiv A(x+3) pmod{10^9+7}. In the second example, A(x) equiv (x+1)^2 pmod{10^9+7} and B(x) equiv (x+10)^2 pmod{10^9+7} , hence B(x) equiv A(x+9) pmod{10^9+7}. "...

Tutorials

Codeforces Round #869 (Div.1, Div.2) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
203991161 cdxcdxcdxcdx C April 30, 2023, 1:24 a.m. OK Clang++17 Diagnostics TESTS 21 2886 63488000
203991177 cdxcdxcdxcdx C April 30, 2023, 1:24 a.m. OK Clang++20 Diagnostics TESTS 21 2932 63488000
203972294 rainboy C April 29, 2023, 7:07 p.m. OK GNU C11 TESTS 21 1122 50073600
203943410 chro4896 C April 29, 2023, 3:57 p.m. OK GNU C11 TESTS 20 1372 79974400
203992067 cdxcdxcdxcdx C April 30, 2023, 1:46 a.m. OK GNU C++14 TESTS 21 483 63180800
203925390 qiliangzhe C April 29, 2023, 3:04 p.m. OK GNU C++14 TESTS 20 499 44339200
203941180 Pompeii C April 29, 2023, 3:49 p.m. OK GNU C++14 TESTS 20 577 41164800
203963311 natsugiri C April 29, 2023, 5:42 p.m. OK GNU C++14 TESTS 21 1060 50073600
203989260 dongyc666 C April 30, 2023, 12:36 a.m. OK GNU C++14 TESTS 21 1435 30105600
203949547 peiwenjun C April 29, 2023, 4:19 p.m. OK GNU C++14 TESTS 20 1450 40038400
203963342 natsugiri C April 29, 2023, 5:42 p.m. OK GNU C++14 TESTS 21 1466 50073600
203954475 grass8sheep C April 29, 2023, 4:37 p.m. OK GNU C++14 TESTS 20 1466 52121600
203991134 cdxcdxcdxcdx C April 30, 2023, 1:23 a.m. OK GNU C++14 TESTS 21 1466 62156800
203992529 skytyf C April 30, 2023, 1:58 a.m. OK GNU C++14 TESTS 21 1497 40038400
203963234 natsugiri C April 29, 2023, 5:41 p.m. OK GNU C++17 TESTS 21 1060 50073600
203926222 Um_nik C April 29, 2023, 3:06 p.m. OK GNU C++17 TESTS 20 1497 40448000
203991248 Jerry20110434 C April 30, 2023, 1:26 a.m. OK GNU C++17 TESTS 21 1528 40140800
203953654 GeorgesStPierre C April 29, 2023, 4:34 p.m. OK GNU C++17 TESTS 20 1528 50073600
203968899 Omer223 C April 29, 2023, 6:33 p.m. OK GNU C++17 TESTS 21 1528 50073600
203990953 cdxcdxcdxcdx C April 30, 2023, 1:18 a.m. OK GNU C++17 TESTS 21 1559 62156800
203991000 Jerry20110434 C April 30, 2023, 1:20 a.m. OK GNU C++17 TESTS 21 1575 40140800
203968257 sysulby C April 29, 2023, 6:27 p.m. OK GNU C++17 TESTS 21 1575 40448000
203929250 nishkarsh C April 29, 2023, 3:14 p.m. OK GNU C++17 TESTS 20 1590 40140800
203961842 hos.lyric C April 29, 2023, 5:31 p.m. OK GNU C++17 TESTS 20 1590 80486400
203964583 natsugiri C April 29, 2023, 5:52 p.m. OK GNU C++17 (64) TESTS 21 218 51200000
203962404 xyl1234 C April 29, 2023, 5:35 p.m. OK GNU C++17 (64) TESTS 21 280 48128000
203938956 kotatsugame C April 29, 2023, 3:42 p.m. OK GNU C++17 (64) TESTS 20 311 42188800
203928212 QAQAutoMaton C April 29, 2023, 3:12 p.m. OK GNU C++17 (64) TESTS 20 327 74342400
203980600 kotatsugame C April 29, 2023, 9:06 p.m. OK GNU C++17 (64) TESTS 21 888 40140800
203953741 Kude C April 29, 2023, 4:35 p.m. OK GNU C++17 (64) TESTS 20 919 44134400
203955444 natsugiri C April 29, 2023, 4:40 p.m. OK GNU C++17 (64) TESTS 20 920 50073600
203961516 Zeardoe C April 29, 2023, 5:29 p.m. OK GNU C++17 (64) TESTS 20 935 80179200
203932201 lqx2005 C April 29, 2023, 3:22 p.m. OK GNU C++17 (64) TESTS 20 936 40038400
203951056 chinerist C April 29, 2023, 4:25 p.m. OK GNU C++17 (64) TESTS 20 951 10035200
203946737 Rainybunny C April 29, 2023, 4:09 p.m. OK GNU C++20 (64) TESTS 20 171 50176000
203995525 Cxny C April 30, 2023, 3:09 a.m. OK GNU C++20 (64) TESTS 21 202 40140800
203999114 cmk666 C April 30, 2023, 4:33 a.m. OK GNU C++20 (64) TESTS 21 217 40345600
203964773 natsugiri C April 29, 2023, 5:54 p.m. OK GNU C++20 (64) TESTS 21 218 51097600
203995337 Cxny C April 30, 2023, 3:06 a.m. OK GNU C++20 (64) TESTS 21 218 120627200
203944972 le0n C April 29, 2023, 4:02 p.m. OK GNU C++20 (64) TESTS 20 218 121139200
203920650 hos.lyric C April 29, 2023, 2:54 p.m. OK GNU C++20 (64) TESTS 20 233 50176000
203961155 hos.lyric C April 29, 2023, 5:27 p.m. OK GNU C++20 (64) TESTS 20 233 50176000
203997344 psoet C April 30, 2023, 3:48 a.m. OK GNU C++20 (64) TESTS 21 234 90214400
203992080 cdxcdxcdxcdx C April 30, 2023, 1:46 a.m. OK GNU C++20 (64) TESTS 21 249 63180800
203967475 IanISam C April 29, 2023, 6:19 p.m. OK Java 8 TESTS 21 1902 258764800
203931936 FastFreeTask C April 29, 2023, 3:21 p.m. OK Kotlin 1.6 TESTS 20 1200 74547200
203933198 sansen C April 29, 2023, 3:25 p.m. OK Rust 2021 TESTS 20 374 118374400
203955909 WaterColor2037 C April 29, 2023, 4:42 p.m. OK Rust 2021 TESTS 20 904 110387200

remove filters

Back to search problems