Codeforces Round 706 (Div. 1)

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
1495 Codeforces Round 706 (Div. 1) FINISHED False 7200 121888463 March 10, 2021, 12:05 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 1354 ) D BFS Trees PROGRAMMING combinatorics dfs and similar graphs math shortest paths trees

B'We define a spanning tree of a graph to be a BFS tree rooted at vertex s if and only if for every node t the shortest distance between s and t in the graph is equal to the shortest distance between s and t in the spanning tree. Given a graph, we define f(x,y) to be the number of spanning trees of that graph that are BFS trees rooted at vertices x and y at the same time. You are given an undirected connected graph with n vertices and m edges. Calculate f(i,j) for all i , j by modulo 998 ,244 ,353 . The first line contains two integers n , m ( 1 <= n <= 400 , 0 <= m <= 600 ) -- the number of vertices and the number of edges in the graph. The i -th of the next m lines contains two integers a_i , b_i ( 1 <= q a_i, b_i <= q n , a_i < b_i ), representing an edge connecting a_i and b_i . It is guaranteed that all edges are distinct and the graph is connected. Print n lines, each consisting of n integers. The integer printed in the row i and the column j should be f(i,j) bmod 998 ,244 ,353 . The following picture describes the first example. The tree with red edges is a BFS tree rooted at both 1 and 2 . Similarly, the BFS tree for other adjacent pairs of vertices can be generated in this way. '...

Tutorials

Codeforces Round #706 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
109647348 atoiz D March 10, 2021, 5:44 p.m. OK GNU C11 TESTS 13 1185 1331200
109661616 rainboy D March 10, 2021, 11:22 p.m. OK GNU C11 TESTS 13 1482 1331200
109662431 _ZigZagKmp D March 11, 2021, 12:02 a.m. OK GNU C++11 TESTS 13 421 34099200
109662596 xajd1906 D March 11, 2021, 12:11 a.m. OK GNU C++11 TESTS 13 436 2969600
109637767 Imakf D March 10, 2021, 3:55 p.m. OK GNU C++11 TESTS 13 436 3072000
109674404 Dio D March 11, 2021, 5:41 a.m. OK GNU C++11 TESTS 16 451 6041600
109609203 fanache99 D March 10, 2021, 1:37 p.m. OK GNU C++11 TESTS 13 483 1331200
109672660 flyFeather D March 11, 2021, 5:14 a.m. OK GNU C++11 TESTS 16 483 2969600
109667700 Fairicle D March 11, 2021, 3:19 a.m. OK GNU C++11 TESTS 13 483 2969600
109669866 vandoor D March 11, 2021, 4:17 a.m. OK GNU C++11 TESTS 13 514 3686400
109664680 Hugin D March 11, 2021, 1:41 a.m. OK GNU C++11 TESTS 13 545 1331200
109615588 hs-zzz D March 10, 2021, 1:51 p.m. OK GNU C++11 TESTS 13 546 1945600
109666570 yuzhechuan D March 11, 2021, 2:46 a.m. OK GNU C++14 TESTS 13 483 3072000
109596038 Isonan D March 10, 2021, 1:10 p.m. OK GNU C++14 TESTS 13 546 2252800
109613457 y1s1 D March 10, 2021, 1:46 p.m. OK GNU C++14 TESTS 13 561 3584000
109588822 hehezhou D March 10, 2021, 12:56 p.m. OK GNU C++14 TESTS 13 592 1536000
109621462 al3xstr33t D March 10, 2021, 2:02 p.m. OK GNU C++14 TESTS 13 748 28160000
109616953 Moririn2528 D March 10, 2021, 1:53 p.m. OK GNU C++14 TESTS 13 764 3481600
109664562 topcoder815 D March 11, 2021, 1:37 a.m. OK GNU C++14 TESTS 13 811 1740800
109659671 atomicenergy D March 10, 2021, 9:53 p.m. OK GNU C++14 TESTS 13 904 1024000
109599578 bazsi700 D March 10, 2021, 1:17 p.m. OK GNU C++14 TESTS 13 935 13926400
109597814 KoharuHondomachi D March 10, 2021, 1:13 p.m. OK GNU C++14 TESTS 13 967 2150400
109665583 Ax_Dea D March 11, 2021, 2:17 a.m. OK GNU C++17 TESTS 13 467 7270400
109608737 p_b_p_b D March 10, 2021, 1:36 p.m. OK GNU C++17 TESTS 13 483 7577600
109602603 natsugiri D March 10, 2021, 1:23 p.m. OK GNU C++17 TESTS 13 498 1536000
109591929 antontrygubO_o D March 10, 2021, 1:02 p.m. OK GNU C++17 TESTS 13 577 1536000
109630664 CoderAnshu D March 10, 2021, 2:58 p.m. OK GNU C++17 TESTS 13 639 2150400
109598002 Nachia D March 10, 2021, 1:14 p.m. OK GNU C++17 TESTS 13 639 2764800
109586730 afterall D March 10, 2021, 12:52 p.m. OK GNU C++17 TESTS 13 639 4403200
109630044 cuiaoxiang D March 10, 2021, 2:54 p.m. OK GNU C++17 TESTS 13 654 1433600
109630750 CoderAnshu D March 10, 2021, 2:58 p.m. OK GNU C++17 TESTS 13 654 2150400
109630379 CoderAnshu D March 10, 2021, 2:56 p.m. OK GNU C++17 TESTS 13 654 2150400
109600703 Madball D March 10, 2021, 1:19 p.m. OK GNU C++17 (64) TESTS 13 171 1331200
109605235 hzkmd D March 10, 2021, 1:29 p.m. OK GNU C++17 (64) TESTS 13 187 1433600
109594190 Ra16bit D March 10, 2021, 1:06 p.m. OK GNU C++17 (64) TESTS 13 202 1331200
109585527 Radewoosh D March 10, 2021, 12:50 p.m. OK GNU C++17 (64) TESTS 13 202 12288000
109607157 Sana D March 10, 2021, 1:33 p.m. OK GNU C++17 (64) TESTS 13 233 1536000
109588509 Xellos D March 10, 2021, 12:56 p.m. OK GNU C++17 (64) TESTS 13 233 1843200
109575841 Miracle03 D March 10, 2021, 12:35 p.m. OK GNU C++17 (64) TESTS 13 295 1331200
109676137 19992147 D March 11, 2021, 6:05 a.m. OK GNU C++17 (64) TESTS 16 295 2252800
109672474 playf D March 11, 2021, 5:10 a.m. OK GNU C++17 (64) TESTS 15 296 1433600
109586848 SSRS_ D March 10, 2021, 12:53 p.m. OK GNU C++17 (64) TESTS 13 296 2252800
109648509 0x3F D March 10, 2021, 6 p.m. OK Go TESTS 13 1965 5632000
109648111 0x3F D March 10, 2021, 5:54 p.m. OK Go TESTS 13 1996 5632000
109648580 0x3F D March 10, 2021, 6:01 p.m. OK Go TESTS 13 2480 5632000
109593798 uwi D March 10, 2021, 1:05 p.m. OK Java 11 TESTS 13 1092 0
109624873 dalt D March 10, 2021, 2:29 p.m. OK Java 8 TESTS 13 841 409600
109635233 YahiaSherif D March 10, 2021, 3:32 p.m. OK Java 8 TESTS 13 1466 0
109634985 YahiaSherif D March 10, 2021, 3:30 p.m. OK Java 8 TESTS 13 1497 0
109618368 fetetriste D March 10, 2021, 1:56 p.m. OK Java 8 TESTS 13 1653 0
109635533 YahiaSherif D March 10, 2021, 3:35 p.m. OK Java 8 TESTS 13 2152 0
109659773 at_f D March 10, 2021, 9:57 p.m. OK PyPy 3 TESTS 13 1731 10649600
109626425 shino16 D March 10, 2021, 2:35 p.m. OK Rust TESTS 13 857 36556800
109646194 shino16 D March 10, 2021, 5:29 p.m. OK Rust TESTS 13 858 36454400
109626713 shino16 D March 10, 2021, 2:37 p.m. OK Rust TESTS 13 873 36556800
109631100 sansen D March 10, 2021, 3 p.m. OK Rust TESTS 13 904 2457600
109632995 sansen D March 10, 2021, 3:14 p.m. OK Rust TESTS 13 966 2355200
109594344 ngtkana D March 10, 2021, 1:06 p.m. OK Rust TESTS 13 1372 2252800
109606052 ocamler D March 10, 2021, 1:30 p.m. OK Rust TESTS 13 1637 819200
109622284 shino16 D March 10, 2021, 2:03 p.m. OK Rust TESTS 13 1715 35123200

remove filters

Back to search problems