Educational Codeforces Round 143 (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
1795 Educational Codeforces Round 143 (Rated for Div. 2) FINISHED False 7200 55265099 Feb. 16, 2023, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 9303 ) D Triangle Coloring PROGRAMMING combinatorics math

B'You are given an undirected graph consisting of n vertices and n edges, where n is divisible by 6 . Each edge has a weight, which is a positive (greater than zero) integer. The graph has the following structure: it is split into frac{n}{3} triples of vertices, the first triple consisting of vertices 1, 2, 3 , the second triple consisting of vertices 4, 5, 6 , and so on. Every pair of vertices from the same triple is connected by an edge. There are no edges between vertices from different triples. You have to paint the vertices of this graph into two colors, red and blue. Each vertex should have exactly one color, there should be exactly frac{n}{2} red vertices and frac{n}{2} blue vertices. The coloring is called valid if it meets these constraints. The weight of the coloring is the sum of weights of edges connecting two vertices with different colors. Let W be the maximum possible weight of a valid coloring. Calculate the number of valid colorings with weight W , and print it modulo 998244353 . The first line contains one integer n ( 6 <= n <= 3 cdot 10^5 , n is divisible by 6 ). The second line contains n integers w_1, w_2, ... , w_n ( 1 <= w_i <= 1000 ) -- the weights of the edges. Edge 1 connects vertices 1 and 2 , edge 2 connects vertices 1 and 3 , edge 3 connects vertices 2 and 3 , edge 4 connects vertices 4 and 5 , edge 5 connects vertices 4 and 6 , edge 6 connects vertices 5 and 6 , and so on. Print one integer -- the number of valid colorings with maximum possible weight, taken modulo 998244353 . The following picture describes the graph from the first example test. The maximum possible weight of a valid coloring of this graph is 31 . '...

Tutorials

112963

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
193912763 W_Szymanski D Feb. 16, 2023, 5:15 p.m. OK C# 10 TESTS 10 140 42291200
193908470 mdshadesh D Feb. 16, 2023, 4:48 p.m. OK Clang++17 Diagnostics TESTS 10 888 5632000
193941095 SakurakoujiRuna D Feb. 17, 2023, 12:13 a.m. OK D TESTS 10 124 6246400
193918231 ruban D Feb. 16, 2023, 6:04 p.m. OK FPC TESTS 10 77 262758400
193897969 1435730 D Feb. 16, 2023, 4:16 p.m. OK GNU C11 TESTS 10 93 0
193900654 FatOldEight D Feb. 16, 2023, 4:23 p.m. OK GNU C++14 TESTS 10 46 0
193911187 Ayrus2000 D Feb. 16, 2023, 5:04 p.m. OK GNU C++14 TESTS 10 46 0
193942815 bkifhr7 D Feb. 17, 2023, 1:04 a.m. OK GNU C++14 TESTS 10 46 1228800
193945714 qmh20061363 D Feb. 17, 2023, 2:25 a.m. OK GNU C++14 TESTS 10 61 0
193913618 ande D Feb. 16, 2023, 5:22 p.m. OK GNU C++14 TESTS 10 61 72192000
193900114 MrLinYin D Feb. 16, 2023, 4:22 p.m. OK GNU C++14 TESTS 10 62 0
193947547 six-floor-slip-liu D Feb. 17, 2023, 3:11 a.m. OK GNU C++14 TESTS 10 62 819200
193900814 __Pof D Feb. 16, 2023, 4:24 p.m. OK GNU C++14 TESTS 10 62 819200
193951103 NEERAJ2003 D Feb. 17, 2023, 4:29 a.m. OK GNU C++14 TESTS 10 62 819200
193943870 JoesSR D Feb. 17, 2023, 1:34 a.m. OK GNU C++14 TESTS 10 62 1228800
193918529 chomotngayloihuanohoa D Feb. 16, 2023, 6:08 p.m. OK GNU C++17 TESTS 10 46 0
193947824 Astral_Rider D Feb. 17, 2023, 3:17 a.m. OK GNU C++17 TESTS 10 46 4198400
193901683 ahhde D Feb. 16, 2023, 4:26 p.m. OK GNU C++17 TESTS 10 61 1228800
193902280 rkrohit D Feb. 16, 2023, 4:27 p.m. OK GNU C++17 TESTS 10 61 3174400
193914229 101degrees D Feb. 16, 2023, 5:28 p.m. OK GNU C++17 TESTS 10 62 0
193903145 cse210001061 D Feb. 16, 2023, 4:29 p.m. OK GNU C++17 TESTS 10 62 0
193902469 Sabbir1807070 D Feb. 16, 2023, 4:28 p.m. OK GNU C++17 TESTS 10 62 0
193929541 Aasneh D Feb. 16, 2023, 8:20 p.m. OK GNU C++17 TESTS 10 62 0
193900647 andyseve D Feb. 16, 2023, 4:23 p.m. OK GNU C++17 TESTS 10 62 0
193901074 haha020 D Feb. 16, 2023, 4:24 p.m. OK GNU C++17 TESTS 10 62 0
193944701 tredsused70 D Feb. 17, 2023, 1:57 a.m. OK GNU C++17 (64) TESTS 10 0 0
193944653 tredsused70 D Feb. 17, 2023, 1:56 a.m. OK GNU C++17 (64) TESTS 10 0 102400
193944490 tredsused70 D Feb. 17, 2023, 1:51 a.m. OK GNU C++17 (64) TESTS 10 0 4710400
193912334 xyl1234 D Feb. 16, 2023, 5:12 p.m. OK GNU C++17 (64) TESTS 10 15 0
193944689 tredsused70 D Feb. 17, 2023, 1:57 a.m. OK GNU C++17 (64) TESTS 10 15 0
193944583 tredsused70 D Feb. 17, 2023, 1:54 a.m. OK GNU C++17 (64) TESTS 10 15 4710400
193914443 clam D Feb. 16, 2023, 5:29 p.m. OK GNU C++17 (64) TESTS 10 31 2457600
193912010 korokseeds D Feb. 16, 2023, 5:10 p.m. OK GNU C++17 (64) TESTS 10 31 2662400
193943232 nitinbisht.291 D Feb. 17, 2023, 1:17 a.m. OK GNU C++17 (64) TESTS 10 31 4812800
193956580 Masquerade- D Feb. 17, 2023, 5:57 a.m. OK GNU C++17 (64) TESTS 10 31 7270400
193944568 tredsused70 D Feb. 17, 2023, 1:53 a.m. OK GNU C++20 (64) TESTS 10 15 4710400
193944543 tredsused70 D Feb. 17, 2023, 1:53 a.m. OK GNU C++20 (64) TESTS 10 15 4710400
193910241 Iliya D Feb. 16, 2023, 4:58 p.m. OK GNU C++20 (64) TESTS 10 31 0
193953006 KhiNaoTotNghiep D Feb. 17, 2023, 5:02 a.m. OK GNU C++20 (64) TESTS 10 31 0
193946636 Weiqt D Feb. 17, 2023, 2:48 a.m. OK GNU C++20 (64) TESTS 10 31 0
193913251 cn_ryh D Feb. 16, 2023, 5:19 p.m. OK GNU C++20 (64) TESTS 10 31 0
193912485 mishgun D Feb. 16, 2023, 5:13 p.m. OK GNU C++20 (64) TESTS 10 31 0
193907344 utshab1618 D Feb. 16, 2023, 4:42 p.m. OK GNU C++20 (64) TESTS 10 31 0
193897991 _KuroNeko_ D Feb. 16, 2023, 4:16 p.m. OK GNU C++20 (64) TESTS 10 31 0
193952108 HOLlC D Feb. 17, 2023, 4:46 a.m. OK GNU C++20 (64) TESTS 10 31 819200
193927982 NewbiePupil D Feb. 16, 2023, 7:58 p.m. OK Java 11 TESTS 10 187 2355200
193902126 goudezhao D Feb. 16, 2023, 4:27 p.m. OK Java 11 TESTS 10 202 0
193897124 dzhi D Feb. 16, 2023, 4:14 p.m. OK Java 11 TESTS 10 202 0
193928372 NewbiePupil D Feb. 16, 2023, 8:03 p.m. OK Java 11 TESTS 10 202 2355200
193914367 KIRA_p01 D Feb. 16, 2023, 5:29 p.m. OK Java 11 TESTS 10 217 0
193914444 kribri D Feb. 16, 2023, 5:29 p.m. OK Java 11 TESTS 10 218 0
193896648 asdfghjkl_12345 D Feb. 16, 2023, 4:13 p.m. OK Java 11 TESTS 10 218 0
193902439 Ramez__ D Feb. 16, 2023, 4:28 p.m. OK Java 11 TESTS 10 218 2048000
193903858 ETHANHUNTMI5 D Feb. 16, 2023, 4:31 p.m. OK Java 11 TESTS 10 248 2048000
193937798 creativegiant D Feb. 16, 2023, 10:42 p.m. OK Java 11 TESTS 10 280 20684800
193908664 Balasubramaniyan.D D Feb. 16, 2023, 4:49 p.m. OK Java 17 TESTS 10 217 921600
193947477 kkz666 D Feb. 17, 2023, 3:10 a.m. OK Java 17 TESTS 10 218 6144000
193954739 Mamimi D Feb. 17, 2023, 5:28 a.m. OK Java 17 TESTS 10 233 921600
193905163 Eslam_Ahmed D Feb. 16, 2023, 4:34 p.m. OK Java 17 TESTS 10 233 6451200
193906947 Hiranmoy D Feb. 16, 2023, 4:40 p.m. OK Java 17 TESTS 10 234 1740800
193946440 Mustela_Erminea D Feb. 17, 2023, 2:43 a.m. OK Java 17 TESTS 10 234 2969600
193900078 Belal_Abouraya D Feb. 16, 2023, 4:22 p.m. OK Java 17 TESTS 10 249 716800
193953333 not_just_rr D Feb. 17, 2023, 5:07 a.m. OK Java 17 TESTS 10 280 3379200
193948644 kit.24.20bec096 D Feb. 17, 2023, 3:38 a.m. OK Java 17 TESTS 10 280 3993600
193896966 nnaf D Feb. 16, 2023, 4:14 p.m. OK Java 17 TESTS 10 311 1024000
193949135 tong96 D Feb. 17, 2023, 3:49 a.m. OK Java 8 TESTS 10 108 0
193907830 vaibhav_1710 D Feb. 16, 2023, 4:45 p.m. OK Java 8 TESTS 10 124 6656000
193909433 GR1ZLER D Feb. 16, 2023, 4:54 p.m. OK Java 8 TESTS 10 139 0
193923371 lpychemistry D Feb. 16, 2023, 7:01 p.m. OK Java 8 TESTS 10 140 2457600
193949914 Mohamed_Ahmed D Feb. 17, 2023, 4:05 a.m. OK Java 8 TESTS 10 140 4505600
193955767 vkukretiwork D Feb. 17, 2023, 5:45 a.m. OK Java 8 TESTS 10 155 7065600
193911308 Ahmad_Hoseiny D Feb. 16, 2023, 5:05 p.m. OK Java 8 TESTS 10 186 3379200
193915668 IanISam D Feb. 16, 2023, 5:40 p.m. OK Java 8 TESTS 10 202 4812800
193928082 __Clouds D Feb. 16, 2023, 7:59 p.m. OK Java 8 TESTS 10 202 64000000
193908315 invincible777 D Feb. 16, 2023, 4:47 p.m. OK Java 8 TESTS 10 248 0
193925440 Kirja_ES D Feb. 16, 2023, 7:25 p.m. OK MS C++ 2017 TESTS 10 187 2457600
193899570 aadrito D Feb. 16, 2023, 4:20 p.m. OK MS C++ 2017 TESTS 10 202 819200
193927552 margothequeen D Feb. 16, 2023, 7:52 p.m. OK PyPy 3 TESTS 10 218 20480000
193904047 hxu10 D Feb. 16, 2023, 4:31 p.m. OK PyPy 3 TESTS 10 249 31232000
193941970 bpdolson D Feb. 17, 2023, 12:39 a.m. OK PyPy 3 TESTS 10 265 23040000
193927725 wkoo D Feb. 16, 2023, 7:55 p.m. OK PyPy 3 TESTS 10 296 28876800
193897317 mdrm D Feb. 16, 2023, 4:15 p.m. OK PyPy 3 TESTS 10 311 20582400
193910081 shehebe D Feb. 16, 2023, 4:57 p.m. OK PyPy 3 TESTS 10 421 46796800
193917840 Dp_pratyaksh D Feb. 16, 2023, 6 p.m. OK PyPy 3 TESTS 10 2308 23756800
193907868 rigvedinho D Feb. 16, 2023, 4:45 p.m. OK PyPy 3 TESTS 10 2542 23859200
193951675 harshvora64 D Feb. 17, 2023, 4:39 a.m. OK PyPy 3-64 TESTS 10 109 36454400
193952492 AnkMon1 D Feb. 17, 2023, 4:53 a.m. OK PyPy 3-64 TESTS 10 140 26828800
193956176 hkwu6013 D Feb. 17, 2023, 5:51 a.m. OK PyPy 3-64 TESTS 10 140 29491200
193902414 00zijian D Feb. 16, 2023, 4:28 p.m. OK PyPy 3-64 TESTS 10 140 37478400
193906075 bronze_coder D Feb. 16, 2023, 4:37 p.m. OK PyPy 3-64 TESTS 10 140 37683200
193952765 gardengnome D Feb. 17, 2023, 4:58 a.m. OK PyPy 3-64 TESTS 10 140 38092800
193912235 wincss D Feb. 16, 2023, 5:11 p.m. OK PyPy 3-64 TESTS 10 155 26624000
193900589 ossau_guildo D Feb. 16, 2023, 4:23 p.m. OK PyPy 3-64 TESTS 10 155 37273600
193902619 utkarshshukla7 D Feb. 16, 2023, 4:28 p.m. OK PyPy 3-64 TESTS 10 155 37683200
193903027 ajayreddy12123 D Feb. 16, 2023, 4:29 p.m. OK PyPy 3-64 TESTS 10 155 37888000
193952051 Frexto D Feb. 17, 2023, 4:45 a.m. OK Python 3 TESTS 10 249 18534400
193912314 anamikaaca0306 D Feb. 16, 2023, 5:12 p.m. OK Python 3 TESTS 10 655 19456000
193896433 alex391a D Feb. 16, 2023, 4:12 p.m. OK Python 3 TESTS 10 685 18329600
193908407 saluev D Feb. 16, 2023, 4:48 p.m. OK Python 3 TESTS 10 686 18636800
193902771 happy_zig_user D Feb. 16, 2023, 4:29 p.m. OK Python 3 TESTS 10 1528 19148800
193954409 rathiaditya131 D Feb. 17, 2023, 5:23 a.m. OK Python 3 TESTS 10 2636 14233600
193930542 tandonjiii D Feb. 16, 2023, 8:33 p.m. OK Python 3 TESTS 10 2714 18329600
193914024 powergee D Feb. 16, 2023, 5:26 p.m. OK Rust 2021 TESTS 10 15 8806400
193936601 PugachAG D Feb. 16, 2023, 10:13 p.m. OK Rust 2021 TESTS 10 30 9830400
193939695 liut D Feb. 16, 2023, 11:31 p.m. OK Rust 2021 TESTS 10 46 4812800
193900368 cottoncotton D Feb. 16, 2023, 4:22 p.m. OK Rust 2021 TESTS 10 78 69222400

remove filters

Back to search problems