Codeforces Round 502 (in memory of Leopoldo Taravilse, Div. 1 + 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
1017 Codeforces Round 502 (in memory of Leopoldo Taravilse, Div. 1 + Div. 2) FINISHED False 9600 203442863 Aug. 8, 2018, 2:05 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 839 ) F The Neutral Zone PROGRAMMING brute force math 2500

B'Notice: unusual memory limit! After the war, destroyed cities in the neutral zone were restored. And children went back to school. The war changed the world, as well as education. In those hard days, a new math concept was created. As we all know, logarithm function can be described as: log(p_1^{a_1}p_2^{a_2}...p_k^{a_2}) = a_1 log p_1 + a_2 log p_2 + ... + a_k log p_k Where p_1^{a_1}p_2^{a_2}...p_k^{a_2} is the prime factorization of a integer. A problem is that the function uses itself in the definition. That is why it is hard to calculate. So, the mathematicians from the neutral zone invented this: text{exlog}_f(p_1^{a_1}p_2^{a_2}...p_k^{a_2}) = a_1 f(p_1) + a_2 f(p_2) + ... + a_k f(p_k) Notice that text{exlog}_f(1) is always equal to 0 . This concept for any function f was too hard for children. So teachers told them that f can only be a polynomial of degree no more than 3 in daily uses (i.e., f(x) = Ax^3+Bx^2+Cx+D ). "Class is over! Don 't forget to do your homework!" Here it is: sum_{i=1}^n text{exlog}_f(i) Help children to do their homework. Since the value can be very big, you need to find the answer modulo 2^{32} . The only line contains five integers n , A , B , C , and D ( 1 <= n <= 3 cdot 10^8 , 0 <= A,B,C,D <= 10^6 ). Print the answer modulo 2^{32} . In the first sample: text{exlog}_f(1) = 0 text{exlog}_f(2) = 2 text{exlog}_f(3) = 3 text{exlog}_f(4) = 2 + 2 = 4 text{exlog}_f(5) = 5 text{exlog}_f(6) = 2 + 3 = 5 text{exlog}_f(7) = 7 text{exlog}_f(8) = 2 + 2 + 2 = 6 text{exlog}_f(9) = 3 + 3 = 6 text{exlog}_f(10) = 2 + 5 = 7 text{exlog}_f(11) = 11 text{exlog}_f(12) = 2 + 2 + 3 = 7 sum_{i=1}^{12} text{exlog}_f(i)=63 In the second sample: text{exlog}_f(1) = 0 text{exlog}_f(2) = (1 x 2^3 + 2 x 2^2 + 3'...

Tutorials

Разбор (англ.)

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
69191741 hos.lyric F Jan. 20, 2020, 1:42 p.m. OK D TESTS 18 62 4198400 2500
69280598 hos.lyric F Jan. 22, 2020, 5:42 a.m. OK D TESTS 18 93 4198400 2500
41369698 Gassa F Aug. 8, 2018, 4:40 p.m. OK D TESTS 18 1419 4300800 2500
41363982 alex_china F Aug. 8, 2018, 3:52 p.m. OK GNU C++ TESTS 18 31 1024000 2500
41463105 test616.cpp F Aug. 11, 2018, 9:29 a.m. OK GNU C++ TESTS 18 576 204800 2500
41591914 vjudge5 F Aug. 14, 2018, 2:32 p.m. OK GNU C++ TESTS 18 1138 12492800 2500
41604731 vjudge5 F Aug. 15, 2018, 1:08 a.m. OK GNU C++ TESTS 18 1154 12492800 2500
41605926 sumoon F Aug. 15, 2018, 2:23 a.m. OK GNU C++ TESTS 18 1231 12492800 2500
41605182 sumoon F Aug. 15, 2018, 1:37 a.m. OK GNU C++ TESTS 18 1231 12492800 2500
41365316 lezdzh F Aug. 8, 2018, 4:01 p.m. OK GNU C++ TESTS 18 1247 307200 2500
41417984 X_o_r F Aug. 10, 2018, 5:41 a.m. OK GNU C++ TESTS 18 1248 12390400 2500
41369756 Hazyknight F Aug. 8, 2018, 4:40 p.m. OK GNU C++ TESTS 18 1372 0 2500
42245766 Lugar F Aug. 29, 2018, 3:12 p.m. OK GNU C++ TESTS 18 1481 12492800 2500
57751012 sansen F July 25, 2019, 2:47 p.m. OK GNU C11 TESTS 18 1014 0 2500
42203378 krijgertje F Aug. 28, 2018, 10:05 a.m. OK GNU C++11 TESTS 18 31 614400 2500
42187472 krijgertje F Aug. 27, 2018, 10:56 p.m. OK GNU C++11 TESTS 18 31 716800 2500
42784258 Anson529 F Sept. 12, 2018, 2:10 a.m. OK GNU C++11 TESTS 18 31 1024000 2500
42757353 Anson529 F Sept. 11, 2018, 8:13 a.m. OK GNU C++11 TESTS 18 31 1331200 2500
42784814 goldgenius F Sept. 12, 2018, 2:55 a.m. OK GNU C++11 TESTS 18 31 2764800 2500
43522198 xsc F Sept. 28, 2018, 9:13 a.m. OK GNU C++11 TESTS 18 46 512000 2500
42721555 ReaLNero1 F Sept. 10, 2018, 2:10 a.m. OK GNU C++11 TESTS 18 46 614400 2500
48517113 mmmod_lqs F Jan. 18, 2019, 5:04 a.m. OK GNU C++11 TESTS 18 46 921600 2500
41404042 zlc1114 F Aug. 9, 2018, 3:29 p.m. OK GNU C++11 TESTS 18 46 1024000 2500
42204588 krijgertje F Aug. 28, 2018, 10:50 a.m. OK GNU C++11 TESTS 18 46 1331200 2500
41363928 consecutivelimit F Aug. 8, 2018, 3:51 p.m. OK GNU C++14 TESTS 18 31 921600 2500
41368784 cz_xuyixuan F Aug. 8, 2018, 4:31 p.m. OK GNU C++14 TESTS 18 31 4812800 2500
41381695 cz_xuyixuan F Aug. 9, 2018, 2:44 a.m. OK GNU C++14 TESTS 18 31 4812800 2500
41365723 jtnydv25 F Aug. 8, 2018, 4:04 p.m. OK GNU C++14 TESTS 18 31 4915200 2500
41358950 Jayce132 F Aug. 8, 2018, 3:27 p.m. OK GNU C++14 TESTS 18 31 7270400 2500
41369226 1152147486 F Aug. 8, 2018, 4:35 p.m. OK GNU C++14 TESTS 18 46 512000 2500
41375190 underkarma F Aug. 8, 2018, 8:08 p.m. OK GNU C++14 TESTS 18 46 614400 2500
46837880 newbiegcz F Dec. 10, 2018, 4:54 a.m. OK GNU C++14 TESTS 18 46 2764800 2500
41395857 abeker F Aug. 9, 2018, 11:07 a.m. OK GNU C++14 TESTS 18 46 2764800 2500
41362357 Aidos F Aug. 8, 2018, 3:42 p.m. OK GNU C++14 TESTS 18 46 16179200 2500
41404449 reverse_macro F Aug. 9, 2018, 3:45 p.m. OK GNU C++17 TESTS 18 30 0 2500
41425635 vilim_l F Aug. 10, 2018, 9:08 a.m. OK GNU C++17 TESTS 18 31 307200 2500
69243168 maroonrk F Jan. 21, 2020, 12:06 p.m. OK GNU C++17 TESTS 18 31 1126400 2500
41382897 Roundgod F Aug. 9, 2018, 3:30 a.m. OK GNU C++17 TESTS 18 31 1433600 2500
41385052 EDGsheryl F Aug. 9, 2018, 5:16 a.m. OK GNU C++17 TESTS 18 61 614400 2500
41369238 lucyanna2018 F Aug. 8, 2018, 4:35 p.m. OK GNU C++17 TESTS 18 124 1126400 2500
41366534 tlwpdus F Aug. 8, 2018, 4:10 p.m. OK GNU C++17 TESTS 18 608 102400 2500
41632063 Valiors F Aug. 15, 2018, 6:59 p.m. OK GNU C++17 TESTS 18 717 307200 2500
41633585 Valiors F Aug. 15, 2018, 8:27 p.m. OK GNU C++17 TESTS 18 733 307200 2500
41363246 Shik F Aug. 8, 2018, 3:47 p.m. OK GNU C++17 TESTS 18 748 204800 2500
41413989 tri F Aug. 10, 2018, 12:25 a.m. OK Java 8 TESTS 18 2402 3174400 2500
41370874 vadimmm F Aug. 8, 2018, 5:37 p.m. OK Java 8 TESTS 18 2464 3276800 2500
41446432 yatin F Aug. 11, 2018, 12:47 a.m. OK Java 8 TESTS 18 3478 3379200 2500
41394449 xodiac F Aug. 9, 2018, 10:13 a.m. OK Java 8 TESTS 18 3603 3276800 2500
41636419 AbdelRahmanEmara F Aug. 16, 2018, 12:45 a.m. OK Java 8 TESTS 18 3727 3481600 2500
69645934 gouh9qn F Jan. 28, 2020, 1:13 a.m. OK Java 8 TESTS 18 3821 3174400 2500
41446752 yatin F Aug. 11, 2018, 1:10 a.m. OK Java 8 TESTS 18 3884 3481600 2500
41405953 vovacomua F Aug. 9, 2018, 4:44 p.m. OK Java 8 TESTS 18 4414 10240000 2500
41446820 yatin F Aug. 11, 2018, 1:13 a.m. OK Java 8 TESTS 18 4741 3481600 2500
41378521 lxn F Aug. 9, 2018, 12:10 a.m. OK MS C++ TESTS 18 1996 12595200 2500
52145463 vjudge5 F April 1, 2019, 9:05 a.m. OK MS C++ TESTS 18 2058 12492800 2500
52145251 vjudge5 F April 1, 2019, 8:58 a.m. OK MS C++ TESTS 18 2199 12492800 2500
52145542 vjudge2 F April 1, 2019, 9:07 a.m. OK MS C++ TESTS 18 2496 12492800 2500
42135749 _mactep F Aug. 26, 2018, 11:36 p.m. OK MS C++ TESTS 18 3135 12492800 2500
42135582 _mactep F Aug. 26, 2018, 11:24 p.m. OK MS C++ TESTS 18 3181 12492800 2500
41389177 absi2011 F Aug. 9, 2018, 7:35 a.m. OK MS C++ TESTS 18 3556 10035200 2500
52124645 vjudge2 F March 31, 2019, 5:01 p.m. OK MS C++ TESTS 18 3993 12492800 2500
51276898 pajenegod F March 13, 2019, 10:26 p.m. OK PyPy 2 TESTS 18 1856 12800000 2500
51277285 pajenegod F March 13, 2019, 10:56 p.m. OK PyPy 2 TESTS 18 1856 12902400 2500
51276943 c1729 F March 13, 2019, 10:29 p.m. OK PyPy 2 TESTS 18 1871 13107200 2500
51277247 pajenegod F March 13, 2019, 10:54 p.m. OK PyPy 2 TESTS 18 1886 12902400 2500
51276370 c1729 F March 13, 2019, 9:48 p.m. OK PyPy 2 TESTS 18 1887 13107200 2500
51277311 pajenegod F March 13, 2019, 10:59 p.m. OK PyPy 2 TESTS 18 1949 12902400 2500
51276434 pajenegod F March 13, 2019, 9:52 p.m. OK PyPy 2 TESTS 18 1981 12902400 2500
51277232 pajenegod F March 13, 2019, 10:52 p.m. OK PyPy 2 TESTS 18 2043 12800000 2500
51277026 pajenegod F March 13, 2019, 10:36 p.m. OK PyPy 2 TESTS 18 2105 12800000 2500
51276087 c1729 F March 13, 2019, 9:29 p.m. OK PyPy 2 TESTS 18 2137 13107200 2500
46201616 c1729 F Nov. 25, 2018, 11:47 a.m. OK Python 2 TESTS 18 3946 4096000 2500
46200993 c1729 F Nov. 25, 2018, 11:22 a.m. OK Python 2 TESTS 18 4383 4300800 2500
63663857 sansen F Oct. 28, 2019, 2:40 p.m. OK Rust TESTS 18 1716 0 2500
63654489 vjudge2 F Oct. 28, 2019, 12:19 p.m. OK Rust TESTS 18 1716 0 2500

remove filters

Back to search problems