Codeforces Round 738 (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
1559 Codeforces Round 738 (Div. 2) FINISHED False 8100 102785099 Aug. 15, 2021, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 2328 ) E Mocha and Stars PROGRAMMING combinatorics dp fft math number theory 2200

B'Mocha wants to be an astrologer. There are n stars which can be seen in Zhijiang, and the brightness of the i -th star is a_i . Mocha considers that these n stars form a constellation, and she uses (a_1,a_2, ldots,a_n) to show its state. A state is called mathematical if all of the following three conditions are satisfied: Here, gcd(a_1,a_2, ldots,a_n) denotes the greatest common divisor (GCD) of integers a_1,a_2, ldots,a_n . Mocha is wondering how many different mathematical states of this constellation exist. Because the answer may be large, you must find it modulo 998 ,244 ,353 . Two states (a_1,a_2, ldots,a_n) and (b_1,b_2, ldots,b_n) are considered different if there exists i ( 1 <= i <= n ) such that a_i ne b_i . The first line contains two integers n and m ( 2 <= n <= 50 , 1 <= m <= 10^5 ) -- the number of stars and the upper bound of the sum of the brightness of stars. Each of the next n lines contains two integers l_i and r_i ( 1 <= l_i <= r_i <= m ) -- the range of the brightness of the i -th star. Print a single integer -- the number of different mathematical states of this constellation, modulo 998 ,244 ,353 . In the first example, there are 4 different mathematical states of this constellation: '...

Tutorials

Tutorial (en)

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
126241856 xwp E Aug. 18, 2021, 7:46 a.m. OK GNU C++14 TESTS 52 62 11776000 2200
126524809 munaiyimm E Aug. 20, 2021, 10:07 a.m. OK GNU C++14 TESTS 53 124 4505600 2200
126451601 xjq E Aug. 19, 2021, 1:51 p.m. OK GNU C++14 TESTS 53 124 5427200 2200
126601000 CunFu_ZhuGe E Aug. 21, 2021, 8:17 a.m. OK GNU C++14 TESTS 53 140 5734400 2200
126383560 YashAryan E Aug. 18, 2021, 7:54 p.m. OK GNU C++14 TESTS 53 155 5734400 2200
126543298 nagisa-kun E Aug. 20, 2021, 2:01 p.m. OK GNU C++14 TESTS 53 171 6246400 2200
126672207 cunzai_zsy0531 E Aug. 22, 2021, 7:29 a.m. OK GNU C++14 TESTS 53 187 5427200 2200
126795235 cuixiao E Aug. 24, 2021, 12:05 a.m. OK GNU C++14 TESTS 53 187 29798400 2200
126580860 1234567892 E Aug. 21, 2021, 2:31 a.m. OK GNU C++14 TESTS 53 202 27443200 2200
126689525 Valters07 E Aug. 22, 2021, 12:43 p.m. OK GNU C++14 TESTS 53 202 48537600 2200
127003736 krijgertje E Aug. 25, 2021, 9:34 p.m. OK GNU C++17 TESTS 53 46 6144000 2200
126427383 cjnwq E Aug. 19, 2021, 9:27 a.m. OK GNU C++17 TESTS 53 77 7782400 2200
126453411 izlyforever E Aug. 19, 2021, 2:08 p.m. OK GNU C++17 TESTS 53 93 4505600 2200
126193207 HBPlayer E Aug. 17, 2021, 3:31 p.m. OK GNU C++17 TESTS 52 93 5734400 2200
126401601 ntfx E Aug. 19, 2021, 3:33 a.m. OK GNU C++17 TESTS 53 93 24780800 2200
126476950 purinliang E Aug. 19, 2021, 6:21 p.m. OK GNU C++17 TESTS 53 93 46284800 2200
126585202 TkFox_wa E Aug. 21, 2021, 4:18 a.m. OK GNU C++17 TESTS 53 109 6246400 2200
126476825 purinliang E Aug. 19, 2021, 6:20 p.m. OK GNU C++17 TESTS 53 109 46284800 2200
126954332 ljx140328 E Aug. 25, 2021, 9:15 a.m. OK GNU C++17 TESTS 53 124 6553600 2200
126633865 gabrielwu E Aug. 21, 2021, 3:23 p.m. OK GNU C++17 TESTS 53 140 5120000 2200
126451895 _overrated_ E Aug. 19, 2021, 1:54 p.m. OK GNU C++17 (64) TESTS 53 93 5529600 2200
126378622 neal E Aug. 18, 2021, 6:37 p.m. OK GNU C++17 (64) TESTS 52 109 5939200 2200
126266418 dannyboy20031204 E Aug. 18, 2021, 12:42 p.m. OK GNU C++17 (64) TESTS 52 124 5529600 2200
126215881 keijak E Aug. 17, 2021, 10:34 p.m. OK GNU C++17 (64) TESTS 52 124 5939200 2200
126372334 neal E Aug. 18, 2021, 5:22 p.m. OK GNU C++17 (64) TESTS 52 124 6246400 2200
126191778 dawud E Aug. 17, 2021, 3:13 p.m. OK GNU C++17 (64) TESTS 52 124 6246400 2200
126189862 dawud E Aug. 17, 2021, 2:49 p.m. OK GNU C++17 (64) TESTS 52 124 6348800 2200
126242261 Kodaman E Aug. 18, 2021, 7:51 a.m. OK GNU C++17 (64) TESTS 52 140 5324800 2200
126378587 neal E Aug. 18, 2021, 6:36 p.m. OK GNU C++17 (64) TESTS 52 140 5836800 2200
126703207 Joaquin144 E Aug. 22, 2021, 4:05 p.m. OK GNU C++17 (64) TESTS 53 140 6246400 2200
126662695 Pneuis E Aug. 22, 2021, 3:41 a.m. OK Go TESTS 53 561 11878400 2200
126507228 mphillotry E Aug. 20, 2021, 6:30 a.m. OK Java 11 TESTS 53 857 23859200 2200
126940409 yiuyuho E Aug. 25, 2021, 6:27 a.m. OK Java 11 TESTS 53 1231 25395200 2200
126212022 dunkingdonuts E Aug. 17, 2021, 8:31 p.m. OK Java 11 TESTS 52 1309 28364800 2200
126776557 dilemma E Aug. 23, 2021, 4:22 p.m. OK Java 8 TESTS 53 1123 155648000 2200
126644986 yaoct E Aug. 21, 2021, 6:02 p.m. OK Java 8 TESTS 53 1653 21196800 2200
126252325 Spheniscine E Aug. 18, 2021, 9:54 a.m. OK Kotlin TESTS 52 764 21811200 2200
126251068 Spheniscine E Aug. 18, 2021, 9:36 a.m. OK Kotlin TESTS 52 810 21913600 2200
126261170 Azurestar E Aug. 18, 2021, 11:42 a.m. OK MS C++ 2017 TESTS 52 139 31027200 2200
126265276 ZKZ_123 E Aug. 18, 2021, 12:29 p.m. OK MS C++ 2017 TESTS 52 1169 10137600 2200
126195562 dimasidorenko E Aug. 17, 2021, 3:59 p.m. OK MS C++ 2017 TESTS 52 1700 13312000 2200
126214122 hxu10 E Aug. 17, 2021, 9:34 p.m. OK PyPy 3 TESTS 52 405 37273600 2200
126966997 taiga0629 E Aug. 25, 2021, 12:13 p.m. OK PyPy 3 TESTS 53 1060 44441600 2200
126833766 taiga0629 E Aug. 24, 2021, 11:39 a.m. OK PyPy 3 TESTS 53 1996 43929600 2200
126190911 artsin666 E Aug. 17, 2021, 3:02 p.m. OK Rust TESTS 52 78 4710400 2200
126189808 artsin666 E Aug. 17, 2021, 2:48 p.m. OK Rust TESTS 52 140 5529600 2200
126187830 artsin666 E Aug. 17, 2021, 2:26 p.m. OK Rust TESTS 52 312 5529600 2200
126182711 artsin666 E Aug. 17, 2021, 1:31 p.m. OK Rust TESTS 52 327 5529600 2200
126179879 artsin666 E Aug. 17, 2021, 1 p.m. OK Rust TESTS 52 483 5529600 2200

remove filters

Back to search problems