Codecraft-17 and Codeforces Round 391 (Div. 1 + Div. 2, combined)

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
757 Codecraft-17 and Codeforces Round 391 (Div. 1 + Div. 2, combined) FINISHED False 10800 247587899 Jan. 12, 2017, 3:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 1337 ) E Bash Plays with Functions PROGRAMMING brute force combinatorics dp number theory 2400

B'Bash got tired on his journey to become the greatest Pokemon master. So he decides to take a break and play with functions. Bash defines a function f0(n), which denotes the number of ways of factoring n into two factors p and q such that gcd(p, xe2 x80 x89q) xe2 x80 x89= xe2 x80 x891. In other words, f0(n) is the number of ordered pairs of positive integers (p, xe2 x80 x89q) such that p xc2 xb7q xe2 x80 x89= xe2 x80 x89n and gcd(p, xe2 x80 x89q) xe2 x80 x89= xe2 x80 x891. But Bash felt that it was too easy to calculate this function. So he defined a series of functions, where fr xe2 x80 x89+ xe2 x80 x891 is defined as: Where (u, xe2 x80 x89v) is any ordered pair of positive integers, they need not to be co-prime. Now Bash wants to know the value of fr(n) for different r and n. Since the value could be huge, he would like to know the value modulo 109 xe2 x80 x89+ xe2 x80 x897. Help him! The first line contains an integer q (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89q xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89106) -- the number of values Bash wants to know. Each of the next q lines contain two integers r and n (0 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89r xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89106, 1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89106), which denote Bash wants to know the value fr(n). Print q integers. For each pair of r and n given, print fr(n) modulo 109 xe2 x80 x89+ xe2 x80 x897 on a separate line. '...

Tutorials

CodeCraft-17 and Codeforces Round #391 (Div. 1 + Div. 2, combined) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
34194479 yasugongshang E Jan. 15, 2018, 10:44 a.m. OK GNU C++ TESTS 103 561 166502400 2400
34194485 yasugongshang E Jan. 15, 2018, 10:45 a.m. OK GNU C++ TESTS 103 576 166400000 2400
25283873 KaykAykaY E March 6, 2017, 7:25 a.m. OK GNU C++ TESTS 103 608 86323200 2400
25320913 xzyxzy E March 7, 2017, 12:32 p.m. OK GNU C++ TESTS 103 638 90316800 2400
26974713 jiyutian E May 9, 2017, 1:31 p.m. OK GNU C++ TESTS 103 639 20275200 2400
25231766 lzy_wlamj E March 5, 2017, 3:32 a.m. OK GNU C++ TESTS 103 670 94310400 2400
23773385 Dylans E Jan. 13, 2017, 12:41 a.m. OK GNU C++ TESTS 103 702 98304000 2400
29508603 vjudge5 E Aug. 16, 2017, 3:13 p.m. OK GNU C++ TESTS 103 732 92979200 2400
23795617 Scarlet_Climax E Jan. 14, 2017, 1:11 a.m. OK GNU C++ TESTS 103 748 98304000 2400
25472494 lichang E March 14, 2017, 12:16 p.m. OK GNU C++ TESTS 103 810 91238400 2400
59503239 xay5421 E Aug. 26, 2019, 4:24 a.m. OK GNU C++11 TESTS 103 467 92979200 2400
31290100 RockyB E Oct. 14, 2017, 5:27 a.m. OK GNU C++11 TESTS 103 514 84172800 2400
40982701 ReaLNero1 E July 30, 2018, 6:32 p.m. OK GNU C++11 TESTS 103 514 88166400 2400
23793507 Verstand E Jan. 13, 2017, 8:34 p.m. OK GNU C++11 TESTS 103 514 90214400 2400
23793370 Verstand E Jan. 13, 2017, 8:23 p.m. OK GNU C++11 TESTS 103 514 90214400 2400
23793359 Verstand E Jan. 13, 2017, 8:23 p.m. OK GNU C++11 TESTS 103 514 90214400 2400
23793495 Verstand E Jan. 13, 2017, 8:33 p.m. OK GNU C++11 TESTS 103 530 90214400 2400
23793338 Verstand E Jan. 13, 2017, 8:21 p.m. OK GNU C++11 TESTS 103 530 90214400 2400
23793143 Verstand E Jan. 13, 2017, 8:08 p.m. OK GNU C++11 TESTS 103 561 90214400 2400
24091433 FizzyDavid E Jan. 24, 2017, 12:52 p.m. OK GNU C++11 TESTS 103 561 91648000 2400
54707722 bhargav_0085 E May 27, 2019, 6:07 a.m. OK GNU C++14 TESTS 103 904 84172800 2400
23771734 Egor.Lifar E Jan. 12, 2017, 9:17 p.m. OK GNU C++14 TESTS 103 935 126361600 2400
30796102 bonfire E Sept. 28, 2017, 6:07 a.m. OK GNU C++14 TESTS 103 951 88166400 2400
29613086 vjudge2 E Aug. 20, 2017, 5:01 a.m. OK GNU C++14 TESTS 103 951 96153600 2400
25021943 halin.george E Feb. 25, 2017, 7:33 p.m. OK GNU C++14 TESTS 103 951 174284800 2400
23775975 cchao E Jan. 13, 2017, 4:06 a.m. OK GNU C++14 TESTS 103 966 86118400 2400
34938904 BlasterArthas E Feb. 5, 2018, 9:02 a.m. OK GNU C++14 TESTS 103 966 106086400 2400
25234398 xehoth E March 5, 2017, 6:37 a.m. OK GNU C++14 TESTS 103 982 86118400 2400
24289195 xuanquang1999 E Jan. 31, 2017, 12:08 p.m. OK GNU C++14 TESTS 103 982 86118400 2400
28429659 AkiraArcher E July 11, 2017, 3:19 p.m. OK GNU C++14 TESTS 103 982 90112000 2400
43789948 Zhang_RQ E Oct. 4, 2018, 1:29 p.m. OK GNU C++17 TESTS 103 904 178688000 2400
55741887 ArshiaDadras E June 19, 2019, 7:54 a.m. OK GNU C++17 TESTS 103 919 84172800 2400
61269500 Lower_Rating E Sept. 25, 2019, 1:40 p.m. OK GNU C++17 TESTS 103 967 84172800 2400
68036451 Yuki726 E Jan. 1, 2020, 12:18 p.m. OK GNU C++17 TESTS 103 982 88166400 2400
60387906 FlowerOfSorrow E Sept. 11, 2019, 12:13 p.m. OK GNU C++17 TESTS 103 1106 113049600 2400
58556607 Mai-sanBestWaifu E Aug. 11, 2019, 2:21 a.m. OK GNU C++17 TESTS 103 1107 104243200 2400
48709076 yuhaw E Jan. 22, 2019, 7:30 a.m. OK GNU C++17 TESTS 103 1107 209612800 2400
62413949 Anachor E Oct. 12, 2019, 11:05 a.m. OK GNU C++17 TESTS 103 1122 85299200 2400
51427413 Shayan.P E March 17, 2019, 8:12 p.m. OK GNU C++17 TESTS 103 1138 96256000 2400
61296450 Leafy_ E Sept. 26, 2019, 1:34 a.m. OK GNU C++17 TESTS 103 1169 92160000 2400
24093307 IgorKoval E Jan. 24, 2017, 2:21 p.m. OK Java 8 TESTS 103 1200 245862400 2400
23792198 AlexFetisov E Jan. 13, 2017, 7:06 p.m. OK Java 8 TESTS 103 1325 245964800 2400
36425900 happybelly E March 20, 2018, 6:33 a.m. OK Java 8 TESTS 103 1356 167116800 2400
36425693 happybelly E March 20, 2018, 6:20 a.m. OK Java 8 TESTS 103 1450 167116800 2400
60946857 Dukkha E Sept. 20, 2019, 7:21 p.m. OK Java 8 TESTS 103 1496 258867200 2400
23769096 Lewin E Jan. 12, 2017, 7:50 p.m. OK Java 8 TESTS 103 1497 281600000 2400
29933329 mualanhlung017 E Aug. 31, 2017, 1:27 a.m. OK Java 8 TESTS 103 1543 143667200 2400
23793039 MostafaAbdullah E Jan. 13, 2017, 8 p.m. OK Java 8 TESTS 103 1809 255385600 2400
23941681 donli E Jan. 19, 2017, 9:58 a.m. OK Java 8 TESTS 103 1840 249651200 2400
36731927 aman28rwt E March 29, 2018, 7:45 p.m. OK Java 8 TESTS 103 1949 268390400 2400
42732065 MiEcoku E Sept. 10, 2018, 12:06 p.m. OK MS C++ TESTS 103 951 96153600 2400
23785418 risu E Jan. 13, 2017, 1:30 p.m. OK MS C++ TESTS 103 1138 90214400 2400
23915079 ZYF1024 E Jan. 18, 2017, 5:51 a.m. OK MS C++ TESTS 103 1169 86220800 2400
23765855 Milanin E Jan. 12, 2017, 6:07 p.m. OK MS C++ TESTS 103 1231 94310400 2400
23874368 TonySnark E Jan. 16, 2017, 6:01 a.m. OK MS C++ TESTS 103 1263 91136000 2400
42819176 vjudge4 E Sept. 13, 2018, 4:43 a.m. OK MS C++ TESTS 103 1357 145510400 2400
24411208 wp32pw E Feb. 3, 2017, 1:16 p.m. OK MS C++ TESTS 103 1357 171520000 2400
23764728 bayleef E Jan. 12, 2017, 5:54 p.m. OK MS C++ TESTS 103 1418 86220800 2400
24534193 UminchuR E Feb. 8, 2017, 6:32 p.m. OK MS C++ TESTS 103 1606 186470400 2400
25230103 zhuzihan2000 E March 5, 2017, 1:11 a.m. OK MS C++ TESTS 103 1793 88064000 2400
23771760 alexey.shchepin E Jan. 12, 2017, 9:18 p.m. OK Ocaml TESTS 103 2916 47411200 2400
51891264 CountZero E March 27, 2019, 9:15 a.m. OK Rust TESTS 103 1138 147763200 2400
51891048 CountZero E March 27, 2019, 9:08 a.m. OK Rust TESTS 103 1309 161689600 2400

remove filters

Back to search problems