Educational Codeforces Round 48 (Rated for 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
1016 Educational Codeforces Round 48 (Rated for Div. 2) FINISHED False 7200 204131687 Aug. 3, 2018, 2:45 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 273 ) G Appropriate Team PROGRAMMING bitmasks math number theory 2800

B"Since next season are coming, you'd like to form a team from two or three participants. There are n candidates, the i -th candidate has rank a_i . But you have weird requirements for your teammates: if you have rank v and have chosen the i -th and j -th candidate, then GCD(v, a_i) = X and LCM(v, a_j) = Y must be met. You are very experienced, so you can change your rank to any non-negative integer but X and Y are tied with your birthdate, so they are fixed. Now you want to know, how many are there pairs (i, j) such that there exists an integer v meeting the following constraints: GCD(v, a_i) = X and LCM(v, a_j) = Y . It's possible that i = j and you form a team of two. GCD is the greatest common divisor of two number, LCM -- the least common multiple. First line contains three integers n , X and Y ( 1 <= n <= 2 cdot 10^5 , 1 <= X <= Y <= 10^{18} ) -- the number of candidates and corresponding constants. Second line contains n space separated integers a_1, a_2, ... , a_n ( 1 <= a_i <= 10^{18} ) -- ranks of candidates. Print the only integer -- the number of pairs (i, j) such that there exists an integer v meeting the following constraints: GCD(v, a_i) = X and LCM(v, a_j) = Y . It's possible that i = j . In the first example next pairs are valid: a_j = 1 and a_i = [2, 4, 6, 8, 10, 12] or a_j = 2 and a_i = [2, 4, 6, 8, 10, 12] . The v in both cases can be equal to 2 . In the second example next pairs are valid: "...

Tutorials

Разбор Educational Codeforces Round 48

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
41203650 Drin_E G Aug. 4, 2018, 6:45 a.m. OK GNU C++ TESTS 150 108 7475200 2800
41268314 zhtzht G Aug. 6, 2018, 8:31 a.m. OK GNU C++ TESTS 150 124 2150400 2800
41276837 vjudge3 G Aug. 6, 2018, 1:40 p.m. OK GNU C++ TESTS 150 202 7270400 2800
41288905 zhouzhendongYa G Aug. 7, 2018, 12:19 a.m. OK GNU C++ TESTS 150 218 5017600 2800
41278686 zhouzhendong G Aug. 6, 2018, 2:43 p.m. OK GNU C++ TESTS 150 218 5017600 2800
41278648 zhouzhendong G Aug. 6, 2018, 2:42 p.m. OK GNU C++ TESTS 150 218 13209600 2800
41468648 samjia2000 G Aug. 11, 2018, 12:23 p.m. OK GNU C++ TESTS 150 234 2048000 2800
41251987 vjudge3 G Aug. 5, 2018, 4:52 p.m. OK GNU C++ TESTS 150 234 7884800 2800
41278595 zhouzhendong G Aug. 6, 2018, 2:39 p.m. OK GNU C++ TESTS 150 234 13209600 2800
41236896 61615601 G Aug. 5, 2018, 7:48 a.m. OK GNU C++ TESTS 150 264 7884800 2800
58535204 luogu_bot4 G Aug. 10, 2019, 11:32 a.m. OK GNU C++11 TESTS 150 124 10547200 2800
41382126 tkysss G Aug. 9, 2018, 3:01 a.m. OK GNU C++11 TESTS 150 156 27648000 2800
43909156 petrescu G Oct. 6, 2018, 3:22 p.m. OK GNU C++11 TESTS 150 171 7270400 2800
41252094 danya090699 G Aug. 5, 2018, 4:55 p.m. OK GNU C++11 TESTS 150 186 2150400 2800
57350077 XuYipei G July 20, 2019, 2:53 a.m. OK GNU C++11 TESTS 150 187 41676800 2800
52664357 dushaolong G April 13, 2019, 3:26 a.m. OK GNU C++11 TESTS 150 202 1740800 2800
50550698 wangju G Feb. 27, 2019, 3:54 a.m. OK GNU C++11 TESTS 150 202 6451200 2800
50550684 wangju G Feb. 27, 2019, 3:53 a.m. OK GNU C++11 TESTS 150 202 6451200 2800
42236505 emoairx G Aug. 29, 2018, 10:02 a.m. OK GNU C++11 TESTS 150 202 131379200 2800
41686232 zsyzsy G Aug. 17, 2018, 2:20 p.m. OK GNU C++11 TESTS 150 217 1536000 2800
41317586 already_last G Aug. 7, 2018, 8:51 p.m. OK GNU C++14 TESTS 150 140 4710400 2800
47549523 JSZX11556 G Dec. 27, 2018, 12:15 p.m. OK GNU C++14 TESTS 150 171 1024000 2800
42323696 beginend G Sept. 1, 2018, 2:06 a.m. OK GNU C++14 TESTS 150 202 21606400 2800
41439121 hiep622032001 G Aug. 10, 2018, 5:02 p.m. OK GNU C++14 TESTS 150 217 2252800 2800
41290769 RUSH_D_CAT G Aug. 7, 2018, 2:46 a.m. OK GNU C++14 TESTS 150 234 16384000 2800
41436713 stas_sl G Aug. 10, 2018, 3:34 p.m. OK GNU C++14 TESTS 150 249 819200 2800
68070832 problem-solved G Jan. 2, 2020, 10:12 a.m. OK GNU C++14 TESTS 150 249 5836800 2800
48441784 DeletedAccount90083864 G Jan. 16, 2019, 4:18 a.m. OK GNU C++14 TESTS 150 249 34406400 2800
41574704 fooractal G Aug. 14, 2018, 3:07 a.m. OK GNU C++14 TESTS 150 264 6963200 2800
41436902 stas_sl G Aug. 10, 2018, 3:40 p.m. OK GNU C++14 TESTS 150 280 512000 2800
64353361 EDawn G Nov. 6, 2019, 9:16 a.m. OK GNU C++17 TESTS 150 171 9830400 2800
64342692 tanao030801 G Nov. 6, 2019, 4:03 a.m. OK GNU C++17 TESTS 150 171 21708800 2800
42127289 SheepRanger G Aug. 26, 2018, 4:05 p.m. OK GNU C++17 TESTS 150 186 176332800 2800
60238354 teapotd G Sept. 7, 2019, 7:38 p.m. OK GNU C++17 TESTS 150 187 3584000 2800
42127351 SheepRanger G Aug. 26, 2018, 4:08 p.m. OK GNU C++17 TESTS 150 187 16691200 2800
69285579 hjk1030 G Jan. 22, 2020, 8:01 a.m. OK GNU C++17 TESTS 150 187 21606400 2800
41203808 M.Ibrahim_Khalil G Aug. 4, 2018, 6:49 a.m. OK GNU C++17 TESTS 150 202 7475200 2800
58535119 hapeqyl G Aug. 10, 2019, 11:30 a.m. OK GNU C++17 TESTS 150 202 10547200 2800
49551536 happy_ G Feb. 7, 2019, 6:23 a.m. OK GNU C++17 TESTS 150 202 21913600 2800
41667041 teapotd G Aug. 17, 2018, 12:55 a.m. OK GNU C++17 TESTS 150 218 3788800 2800
41312456 vadimmm G Aug. 7, 2018, 5:04 p.m. OK Java 8 TESTS 150 358 13516800 2800
43165060 tri G Sept. 21, 2018, 4:25 a.m. OK Java 8 TESTS 150 404 12492800 2800
41243521 kobae964 G Aug. 5, 2018, 11:48 a.m. OK Rust TESTS 150 311 111923200 2800
41243448 kobae964 G Aug. 5, 2018, 11:45 a.m. OK Rust TESTS 150 327 111923200 2800

remove filters

Back to search problems