Educational Codeforces Round 85 (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
1334 Educational Codeforces Round 85 (Rated for Div. 2) FINISHED False 7200 150823511 April 10, 2020, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 2884 ) E Divisor Paths PROGRAMMING combinatorics graphs greedy math number theory

B"You are given a positive integer D . Let's build the following graph from it: For example, here is the graph for D=12 : Edge (4,12) has weight 3 because 12 has divisors [1,2,3,4,6,12] and 4 has divisors [1,2,4] . Thus, there are 3 divisors of 12 that are not divisors of 4 -- [3,6,12] . There is no edge between 3 and 2 because 3 is not divisible by 2 . There is no edge between 12 and 3 because frac{12}{3}=4 is not a prime. Let the length of the path between some vertices v and u in the graph be the total weight of edges on it. For example, path [(1, 2), (2, 6), (6, 12), (12, 4), (4, 2), (2, 6)] has length 1+2+2+3+1+2=11 . The empty path has length 0 . So the shortest path between two vertices v and u is the path that has the minimal possible length. Two paths a and b are different if there is either a different number of edges in them or there is a position i such that a_i and b_i are different edges. You are given q queries of the following form: The answer for each query might be large so print it modulo 998244353 . The first line contains a single integer D ( 1 <= D <= 10^{15} ) -- the number the graph is built from. The second line contains a single integer q ( 1 <= q <= 3 cdot 10^5 ) -- the number of queries. Each of the next q lines contains two integers v and u ( 1 <= v, u <= D ). It is guaranteed that D is divisible by both v and u (both v and u are divisors of D ). Print q integers -- for each query output the number of the shortest paths between the two given vertices modulo 998244353 . In the first example: "...

Tutorials

Educational Codeforces Round 85 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
76178001 Gassa E April 10, 2020, 4:18 p.m. OK D TESTS 45 498 13721600
76286589 luogu_bot5 E April 12, 2020, 5:03 a.m. OK GNU C++11 TESTS 45 233 1126400
76307019 Frame233 E April 12, 2020, 8:49 a.m. OK GNU C++11 TESTS 45 234 2764800
76284203 dysyn1314 E April 12, 2020, 4:21 a.m. OK GNU C++11 TESTS 45 280 2150400
76177323 Phinney E April 10, 2020, 4:17 p.m. OK GNU C++11 TESTS 45 280 17203200
76440518 TheShadow_DC E April 13, 2020, 1:38 a.m. OK GNU C++11 TESTS 45 312 1638400
76223846 gyh20 E April 11, 2020, 1:22 a.m. OK GNU C++11 TESTS 45 312 3584000
76435868 djurajaksic E April 12, 2020, 11:19 p.m. OK GNU C++11 TESTS 45 327 1331200
76223875 gyh20 E April 11, 2020, 1:23 a.m. OK GNU C++11 TESTS 45 327 1945600
76435764 mikoo E April 12, 2020, 11:16 p.m. OK GNU C++11 TESTS 45 342 102400
76295119 wygz E April 12, 2020, 6:44 a.m. OK GNU C++11 TESTS 45 343 3276800
76278968 fa_555 E April 12, 2020, 2:29 a.m. OK GNU C++14 TESTS 45 327 3379200
76225716 yaoR E April 11, 2020, 2:22 a.m. OK GNU C++14 TESTS 45 343 409600
76277338 dump_fly E April 12, 2020, 1:45 a.m. OK GNU C++14 TESTS 45 358 1331200
76169265 QAQAutoMaton E April 10, 2020, 4:01 p.m. OK GNU C++14 TESTS 45 358 4198400
76169809 willingox E April 10, 2020, 4:02 p.m. OK GNU C++14 TESTS 45 374 1331200
76299385 LeoPro E April 12, 2020, 7:27 a.m. OK GNU C++14 TESTS 45 389 1331200
76279002 fa_555 E April 12, 2020, 2:30 a.m. OK GNU C++14 TESTS 45 389 3379200
76192570 BakaC1rno E April 10, 2020, 5:01 p.m. OK GNU C++14 TESTS 45 389 3686400
76182525 mr_d E April 10, 2020, 4:27 p.m. OK GNU C++14 TESTS 45 420 1228800
76412235 amokrousov E April 12, 2020, 5:33 p.m. OK GNU C++14 TESTS 45 421 1331200
76201912 okwedook E April 10, 2020, 6:16 p.m. OK GNU C++17 TESTS 45 202 1126400
76201685 okwedook E April 10, 2020, 6:14 p.m. OK GNU C++17 TESTS 45 202 1126400
76221348 cugel E April 11, 2020, 12:04 a.m. OK GNU C++17 TESTS 45 343 25292800
76232529 nickluo E April 11, 2020, 4:56 a.m. OK GNU C++17 TESTS 45 358 512000
76260907 cugel E April 11, 2020, 7:36 p.m. OK GNU C++17 TESTS 45 358 25292800
76201566 okwedook E April 10, 2020, 6:13 p.m. OK GNU C++17 TESTS 45 389 1228800
76296694 amankrsingh E April 12, 2020, 7 a.m. OK GNU C++17 TESTS 45 389 1331200
76197397 MelonMeow_ylh E April 10, 2020, 5:36 p.m. OK GNU C++17 TESTS 45 389 1331200
76174234 shahidul_bruh E April 10, 2020, 4:11 p.m. OK GNU C++17 TESTS 45 389 1331200
76284821 _andyli E April 12, 2020, 4:33 a.m. OK GNU C++17 TESTS 45 389 4403200
76322351 fractal E April 12, 2020, 12:06 p.m. OK GNU C++17 (64) TESTS 45 296 6656000
76323733 fractal E April 12, 2020, 12:21 p.m. OK GNU C++17 (64) TESTS 45 296 7372800
76319318 erray E April 12, 2020, 11:12 a.m. OK GNU C++17 (64) TESTS 45 358 1843200
76308264 huzaifa242 E April 12, 2020, 9:03 a.m. OK GNU C++17 (64) TESTS 45 390 0
76173422 johannesk E April 10, 2020, 4:09 p.m. OK GNU C++17 (64) TESTS 45 421 0
76200122 neal E April 10, 2020, 6:01 p.m. OK GNU C++17 (64) TESTS 45 467 0
76187435 madhav_1999 E April 10, 2020, 4:34 p.m. OK GNU C++17 (64) TESTS 45 467 1740800
76186749 timf1089 E April 10, 2020, 4:33 p.m. OK GNU C++17 (64) TESTS 45 468 1843200
76186801 madhav_1999 E April 10, 2020, 4:34 p.m. OK GNU C++17 (64) TESTS 45 468 3481600
76324584 Milan_ E April 12, 2020, 12:31 p.m. OK GNU C++17 (64) TESTS 45 499 0
76277031 avijit_agarwal E April 12, 2020, 1:36 a.m. OK Java 11 TESTS 45 623 4608000
76277058 avijit_agarwal E April 12, 2020, 1:36 a.m. OK Java 11 TESTS 45 639 4608000
76277129 avijit_agarwal E April 12, 2020, 1:38 a.m. OK Java 11 TESTS 45 655 4608000
76277332 avijit_agarwal E April 12, 2020, 1:45 a.m. OK Java 11 TESTS 45 701 4608000
76269332 Anonymous E April 11, 2020, 9:55 p.m. OK Java 11 TESTS 45 702 0
76264271 TheSawan E April 11, 2020, 8:22 p.m. OK Java 11 TESTS 45 826 0
76190324 Musin E April 10, 2020, 4:48 p.m. OK Java 11 TESTS 45 1138 0
76299559 sajith E April 12, 2020, 7:29 a.m. OK Java 11 TESTS 45 1793 0
76189586 SecondThread E April 10, 2020, 4:45 p.m. OK Java 8 TESTS 45 514 15872000
76195648 aman28rwt E April 10, 2020, 5:22 p.m. OK Java 8 TESTS 45 592 0
76299782 cwise E April 12, 2020, 7:31 a.m. OK Java 8 TESTS 45 716 46284800
76188178 tomerun E April 10, 2020, 4:39 p.m. OK Java 8 TESTS 45 748 0
76219905 polyakoff E April 10, 2020, 11:16 p.m. OK Java 8 TESTS 45 826 5222400
76263722 KharYusuf E April 11, 2020, 8:14 p.m. OK Java 8 TESTS 45 857 0
76194253 aman28rwt E April 10, 2020, 5:12 p.m. OK Java 8 TESTS 45 951 0
76263424 KharYusuf E April 11, 2020, 8:10 p.m. OK Java 8 TESTS 45 1060 0
76194856 aman28rwt E April 10, 2020, 5:16 p.m. OK Java 8 TESTS 45 1122 0
76199185 Agnimandur E April 10, 2020, 5:52 p.m. OK Java 8 TESTS 45 1169 0
76230903 koboshi E April 11, 2020, 4:27 a.m. OK Kotlin TESTS 45 920 0
76189819 eSeF_ E April 10, 2020, 4:46 p.m. OK Mono C# TESTS 45 1294 11673600
76180084 mban259 E April 10, 2020, 4:22 p.m. OK Mono C# TESTS 45 1497 20172800
76196777 Yupiteru E April 10, 2020, 5:31 p.m. OK Mono C# TESTS 45 2947 157491200
76198322 extremum E April 10, 2020, 5:44 p.m. OK MS C++ 2017 TESTS 45 1076 7884800
76196079 CrashMaster E April 10, 2020, 5:25 p.m. OK MS C++ 2017 TESTS 45 1216 0
76204930 4eT_llpuyHblJl E April 10, 2020, 6:47 p.m. OK MS C++ 2017 TESTS 45 1887 41676800
76258669 kupriyanov E April 11, 2020, 7:08 p.m. OK MS C++ 2017 TESTS 45 1918 819200
76352653 Ivan_Dunko E April 12, 2020, 2:28 p.m. OK MS C++ 2017 TESTS 45 2371 0
76171649 pajenegod E April 10, 2020, 4:06 p.m. OK PyPy 2 TESTS 45 1263 61952000
76273722 dubey233310 E April 11, 2020, 11:52 p.m. OK PyPy 3 TESTS 45 2308 24985600
76197324 nagiss E April 10, 2020, 5:35 p.m. OK PyPy 3 TESTS 45 2354 62361600
76181589 Danish_love E April 10, 2020, 4:25 p.m. OK PyPy 3 TESTS 45 2401 24985600
76215565 pineriver E April 10, 2020, 9:22 p.m. OK PyPy 3 TESTS 45 2464 221081600
76195298 titia E April 10, 2020, 5:20 p.m. OK PyPy 3 TESTS 45 2495 96358400
76194241 RaDaDiYaMoHiT E April 10, 2020, 5:12 p.m. OK PyPy 3 TESTS 45 2667 24985600
76195740 nagiss E April 10, 2020, 5:23 p.m. OK PyPy 3 TESTS 45 2854 68300800
76195173 nagiss E April 10, 2020, 5:19 p.m. OK PyPy 3 TESTS 45 2901 67993600
76194662 nagiss E April 10, 2020, 5:15 p.m. OK PyPy 3 TESTS 45 2963 70860800
76185866 titia E April 10, 2020, 4:32 p.m. OK PyPy 3 TESTS 45 2978 124108800
76180844 kobae964 E April 10, 2020, 4:23 p.m. OK Rust TESTS 45 795 5120000
76198287 yoshrc E April 10, 2020, 5:44 p.m. OK Rust TESTS 45 873 0
76192628 yoshrc E April 10, 2020, 5:01 p.m. OK Rust TESTS 45 1169 0

remove filters

Back to search problems