Educational Codeforces Round 56 (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
1093 Educational Codeforces Round 56 (Rated for Div. 2) FINISHED False 7200 186938699 Dec. 15, 2018, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 9308 ) D Beautiful Graph PROGRAMMING dfs and similar graphs 1600

B'You are given an undirected unweighted graph consisting of n vertices and m edges. You have to write a number on each vertex of the graph. Each number should be 1 , 2 or 3 . The graph becomes beautiful if for each edge the sum of numbers on vertices connected by this edge is odd. Calculate the number of possible ways to write numbers 1 , 2 and 3 on vertices so the graph becomes beautiful. Since this number may be large, print it modulo 998244353 . Note that you have to write exactly one number on each vertex. The graph does not have any self-loops or multiple edges. The first line contains one integer t ( 1 <= t <= 3 cdot 10^5 ) -- the number of tests in the input. The first line of each test contains two integers n and m ( 1 <= n <= 3 cdot 10^5, 0 <= m <= 3 cdot 10^5 ) -- the number of vertices and the number of edges, respectively. Next m lines describe edges: i -th line contains two integers u_i , v_i ( 1 <= u_i, v_i <= n; u_i neq v_i ) -- indices of vertices connected by i -th edge. It is guaranteed that sum limits_{i=1}^{t} n <= 3 cdot 10^5 and sum limits_{i=1}^{t} m <= 3 cdot 10^5 . For each test print one line, containing one integer -- the number of possible ways to write numbers 1 , 2 , 3 on the vertices of given graph so it becomes beautiful. Since answers may be large, print them modulo 998244353 . Possible ways to distribute numbers in the first test: In the second test there is no way to distribute numbers. '...

Tutorials

63877

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
47074451 AHTOH._. D Dec. 15, 2018, 4:48 p.m. OK FPC TESTS 29 1014 17305600 1600
47440420 sansen D Dec. 23, 2018, 11:50 p.m. OK GNU C11 TESTS 29 327 8396800 1600
47686605 rainboy D Dec. 29, 2018, 3:09 p.m. OK GNU C11 TESTS 29 997 11264000 1600
48049268 Potassium_ D Jan. 7, 2019, 7:30 a.m. OK GNU C11 TESTS 29 998 14540800 1600
47619490 raja_123 D Dec. 28, 2018, 12:09 p.m. OK GNU C11 TESTS 29 1013 18329600 1600
48049289 Potassium_ D Jan. 7, 2019, 7:31 a.m. OK GNU C11 TESTS 29 1029 14233600 1600
47440391 sansen D Dec. 23, 2018, 11:47 p.m. OK GNU C11 TESTS 29 1107 9830400 1600
48654475 ReaLNero1 D Jan. 21, 2019, 1:34 a.m. OK GNU C++11 TESTS 29 61 7372800 1600
47099041 zjf_juruo D Dec. 16, 2018, 9:49 a.m. OK GNU C++11 TESTS 29 61 7577600 1600
47194506 _zay D Dec. 18, 2018, 1:53 p.m. OK GNU C++11 TESTS 29 61 7782400 1600
47332755 hangyesheng D Dec. 21, 2018, 1:41 p.m. OK GNU C++11 TESTS 29 61 9728000 1600
48028892 litble D Jan. 6, 2019, 11:02 a.m. OK GNU C++11 TESTS 29 61 10956800 1600
47169452 Zechariah_2001 D Dec. 17, 2018, 2:10 p.m. OK GNU C++11 TESTS 29 61 14438400 1600
47184782 yinwuxiao D Dec. 18, 2018, 2:58 a.m. OK GNU C++11 TESTS 29 61 58880000 1600
47108054 C20180602 D Dec. 16, 2018, 2:01 p.m. OK GNU C++11 TESTS 29 62 7475200 1600
47148086 zjf_juruo D Dec. 17, 2018, 4:40 a.m. OK GNU C++11 TESTS 29 62 7577600 1600
47815200 luogu_bot5 D Jan. 1, 2019, 1:58 p.m. OK GNU C++11 TESTS 29 62 8499200 1600
47297600 Nostalgically D Dec. 20, 2018, 12:44 p.m. OK GNU C++14 TESTS 29 77 15564800 1600
47086706 Robin_Lo D Dec. 16, 2018, 3:36 a.m. OK GNU C++14 TESTS 29 186 10547200 1600
47703564 ..vince D Dec. 29, 2018, 6:28 p.m. OK GNU C++14 TESTS 29 187 16588800 1600
47075768 aoxue D Dec. 15, 2018, 5:07 p.m. OK GNU C++14 TESTS 29 202 9625600 1600
66309588 vjudge1 D Dec. 5, 2019, 10:53 a.m. OK GNU C++14 TESTS 29 202 9728000 1600
47551289 Zayin D Dec. 27, 2018, 1:08 p.m. OK GNU C++14 TESTS 29 202 9728000 1600
52748147 Rabbittank D April 14, 2019, 12:42 p.m. OK GNU C++14 TESTS 29 202 10956800 1600
47074719 water_mi D Dec. 15, 2018, 4:51 p.m. OK GNU C++14 TESTS 29 202 10956800 1600
57804589 guanhuai04 D July 26, 2019, 2:38 p.m. OK GNU C++14 TESTS 29 202 12083200 1600
47535200 Isaiasprepa9 D Dec. 27, 2018, 12:13 a.m. OK GNU C++14 TESTS 29 202 13107200 1600
47167583 ZZHzzh0_0 D Dec. 17, 2018, 1:17 p.m. OK GNU C++17 TESTS 29 155 66969600 1600
66438405 vjudge2 D Dec. 7, 2019, 7:05 a.m. OK GNU C++17 TESTS 29 156 9728000 1600
47334168 ivan100sic D Dec. 21, 2018, 2:20 p.m. OK GNU C++17 TESTS 29 186 14643200 1600
47086432 EsTer D Dec. 16, 2018, 3:17 a.m. OK GNU C++17 TESTS 29 187 12185600 1600
47390711 Pepcy_Ch D Dec. 23, 2018, 7:55 a.m. OK GNU C++17 TESTS 29 187 14848000 1600
47305454 vjudge5 D Dec. 20, 2018, 4:26 p.m. OK GNU C++17 TESTS 29 187 45158400 1600
47103249 PopescuMihai D Dec. 16, 2018, 11:44 a.m. OK GNU C++17 TESTS 29 202 10649600 1600
47130786 lXTobiXl D Dec. 16, 2018, 4:19 p.m. OK GNU C++17 TESTS 29 202 10956800 1600
56979377 vjudge4 D July 13, 2019, 1:21 p.m. OK GNU C++17 TESTS 29 202 10956800 1600
51786511 chenhongta0 D March 24, 2019, 10:52 a.m. OK GNU C++17 TESTS 29 202 12083200 1600
47312088 qb2008 D Dec. 20, 2018, 8:47 p.m. OK Go TESTS 29 1528 23244800 1600
67450831 bleh0.5 D Dec. 23, 2019, 4:04 a.m. OK Java 11 TESTS 29 717 74547200 1600
66238031 shubh_jha98 D Dec. 3, 2019, 4:56 p.m. OK Java 11 TESTS 29 1294 149299200 1600
67049601 CodAR D Dec. 17, 2019, 2:52 a.m. OK Java 11 TESTS 29 1419 124313600 1600
47085427 xodiac D Dec. 16, 2018, 1:53 a.m. OK Java 8 TESTS 29 217 25395200 1600
69731519 lansergecs D Jan. 29, 2020, 1:38 p.m. OK Java 8 TESTS 29 311 7168000 1600
47295101 SevenDeadlySins D Dec. 20, 2018, 11:34 a.m. OK Java 8 TESTS 29 358 9830400 1600
47083264 _notpalindrome_ D Dec. 15, 2018, 9:54 p.m. OK Java 8 TESTS 29 452 38912000 1600
47101603 weird_penguin D Dec. 16, 2018, 11 a.m. OK Java 8 TESTS 29 467 47923200 1600
54247975 Xylenox D May 16, 2019, 3:43 p.m. OK Java 8 TESTS 29 467 49254400 1600
47093791 poikniok D Dec. 16, 2018, 7:28 a.m. OK Java 8 TESTS 29 468 45260800 1600
47543920 prakhar897 D Dec. 27, 2018, 8:50 a.m. OK Java 8 TESTS 29 483 45977600 1600
47093676 poikniok D Dec. 16, 2018, 7:25 a.m. OK Java 8 TESTS 29 498 46387200 1600
47257245 Jeel_Vaishnav D Dec. 19, 2018, 10:56 a.m. OK Java 8 TESTS 29 499 47820800 1600
47897525 bubnov D Jan. 4, 2019, 11:44 a.m. OK Kotlin TESTS 29 701 59084800 1600
47082823 elizarov D Dec. 15, 2018, 9:28 p.m. OK Kotlin TESTS 29 1138 42803200 1600
47100695 elizarov D Dec. 16, 2018, 10:34 a.m. OK Kotlin TESTS 29 1216 108236800 1600
47099222 elizarov D Dec. 16, 2018, 9:54 a.m. OK Kotlin TESTS 29 1232 96460800 1600
47100454 elizarov D Dec. 16, 2018, 10:28 a.m. OK Kotlin TESTS 29 1263 108236800 1600
47100107 elizarov D Dec. 16, 2018, 10:20 a.m. OK Kotlin TESTS 29 1263 108236800 1600
47882851 spookywooky D Jan. 3, 2019, 7:30 p.m. OK Kotlin TESTS 29 1668 52633600 1600
58559812 og.kostya D Aug. 11, 2019, 5:06 a.m. OK Mono C# TESTS 29 217 24064000 1600
48201126 eki D Jan. 11, 2019, 5:44 a.m. OK Mono C# TESTS 29 529 26419200 1600
47099890 Coder_D D Dec. 16, 2018, 10:13 a.m. OK Mono C# TESTS 29 717 62771200 1600
47099953 Coder_D D Dec. 16, 2018, 10:15 a.m. OK Mono C# TESTS 29 732 62771200 1600
47100897 Coder_D D Dec. 16, 2018, 10:40 a.m. OK Mono C# TESTS 29 748 62873600 1600
47939983 bati06 D Jan. 4, 2019, 5:13 p.m. OK Mono C# TESTS 29 888 66355200 1600
47930925 bati06 D Jan. 4, 2019, 4:07 p.m. OK Mono C# TESTS 29 997 65740800 1600
47944646 bati06 D Jan. 4, 2019, 6:54 p.m. OK Mono C# TESTS 29 1028 88371200 1600
47947384 bati06 D Jan. 4, 2019, 8:20 p.m. OK Mono C# TESTS 29 1044 88473600 1600
48993255 vjudge3 D Jan. 26, 2019, 3:23 p.m. OK MS C++ TESTS 29 139 17408000 1600
48987271 vjudge1 D Jan. 26, 2019, 12:52 p.m. OK MS C++ TESTS 29 155 11161600 1600
48992735 XDKalia D Jan. 26, 2019, 3:08 p.m. OK MS C++ TESTS 29 155 17408000 1600
48992851 XDKalia D Jan. 26, 2019, 3:12 p.m. OK MS C++ TESTS 29 156 17408000 1600
48993237 XDKalia D Jan. 26, 2019, 3:22 p.m. OK MS C++ TESTS 29 171 17408000 1600
48829746 vjudge5 D Jan. 23, 2019, 3:29 p.m. OK MS C++ TESTS 29 171 42905600 1600
49759209 scorpiowf D Feb. 11, 2019, 8:02 a.m. OK MS C++ TESTS 29 186 13926400 1600
47297501 vjudge3 D Dec. 20, 2018, 12:41 p.m. OK MS C++ TESTS 29 186 17305600 1600
47145795 Houbunsha D Dec. 17, 2018, 2:09 a.m. OK MS C++ TESTS 29 187 12083200 1600
48992896 XDKalia D Jan. 26, 2019, 3:13 p.m. OK MS C++ TESTS 29 187 17408000 1600
51082220 work_hard. D March 9, 2019, 11:44 a.m. OK MS C++ 2017 TESTS 29 280 14336000 1600
58414850 ZSTU-2018329621261 D Aug. 7, 2019, 4:10 a.m. OK MS C++ 2017 TESTS 29 312 10649600 1600
57855241 pmitkov D July 27, 2019, 2:46 p.m. OK MS C++ 2017 TESTS 29 358 14540800 1600
53732364 LinusTorvaldsFan D May 4, 2019, 7:50 a.m. OK MS C++ 2017 TESTS 29 779 12390400 1600
50752101 Still_Theory D March 3, 2019, 4:40 p.m. OK MS C++ 2017 TESTS 29 982 36556800 1600
53732327 LinusTorvaldsFan D May 4, 2019, 7:49 a.m. OK MS C++ 2017 TESTS 29 1762 12390400 1600
59777066 siwei D Aug. 31, 2019, 12:18 a.m. OK MS C++ 2017 TESTS 29 1840 13312000 1600
53732291 LinusTorvaldsFan D May 4, 2019, 7:48 a.m. OK MS C++ 2017 TESTS 29 1855 16793600 1600
47104836 pajenegod D Dec. 16, 2018, 12:26 p.m. OK PyPy 2 TESTS 29 499 41369600 1600
47076098 c1729 D Dec. 15, 2018, 5:12 p.m. OK PyPy 2 TESTS 29 763 30617600 1600
47075826 c1729 D Dec. 15, 2018, 5:08 p.m. OK PyPy 2 TESTS 29 841 36249600 1600
61021222 ashok123 D Sept. 21, 2019, 2:38 p.m. OK PyPy 2 TESTS 29 1372 34099200 1600
47252132 tiantian5 D Dec. 19, 2018, 8:46 a.m. OK PyPy 3 TESTS 29 826 29593600 1600
47100550 Evil__Coder D Dec. 16, 2018, 10:31 a.m. OK PyPy 3 TESTS 29 982 47206400 1600
47093729 satyamcse D Dec. 16, 2018, 7:27 a.m. OK PyPy 3 TESTS 29 1044 34099200 1600
47885808 whatshisbucket D Jan. 3, 2019, 10:42 p.m. OK Python 2 TESTS 29 1294 32153600 1600
47494494 supachai_pay D Dec. 25, 2018, 2:12 p.m. OK Python 2 TESTS 29 1949 30924800 1600
48570914 Ex0d1a shriamrut D Jan. 19, 2019, 11:56 a.m. OK Python 2 TESTS 29 1949 34099200 1600
55079318 shubhankarsharma00 D June 4, 2019, 10:04 a.m. OK Python 2 TESTS 29 1965 34304000 1600
47252157 tiantian5 D Dec. 19, 2018, 8:47 a.m. OK Python 3 TESTS 29 1575 30310400 1600
56291285 maxtelll D June 30, 2019, 1:16 a.m. OK Python 3 TESTS 29 1668 30515200 1600
54258279 vjudge2 D May 16, 2019, 9:58 p.m. OK Python 3 TESTS 29 1668 30924800 1600
56444965 vjudge1 D July 2, 2019, 6:22 p.m. OK Python 3 TESTS 29 1684 30515200 1600
63744549 deadguy D Oct. 29, 2019, 6:04 p.m. OK Python 3 TESTS 29 1699 30515200 1600
56444830 maxtelll D July 2, 2019, 6:18 p.m. OK Python 3 TESTS 29 1700 30515200 1600
47251317 tiantian5 D Dec. 19, 2018, 8:24 a.m. OK Python 3 TESTS 29 1949 30310400 1600
48890666 Its_Me0 D Jan. 24, 2019, 1:56 p.m. OK Python 3 TESTS 29 1949 43110400 1600
47145739 wangzpeng D Dec. 17, 2018, 2:03 a.m. OK Python 3 TESTS 29 1965 106905600 1600
47101783 pa.n.ik D Dec. 16, 2018, 11:06 a.m. OK Python 3 TESTS 29 1981 106905600 1600
47170154 yakamoto D Dec. 17, 2018, 2:31 p.m. OK Scala TESTS 29 1045 41164800 1600

remove filters

Back to search problems