COMPFEST 15 - Preliminary Online Mirror (Unrated, ICPC Rules, Teams Preferred)

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
1866 COMPFEST 15 - Preliminary Online Mirror (Unrated, ICPC Rules, Teams Preferred) FINISHED False 18000 43437263 Sept. 3, 2023, 12:05 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 3111 ) C Completely Searching for Inversions PROGRAMMING dfs and similar dp graphs

B"Pak Chanek has a directed acyclic graph (a directed graph that does not have any cycles) containing N vertices. Vertex i has S_i edges directed away from that vertex. The j -th edge of vertex i that is directed away from it, is directed towards vertex L_{i,j} and has an integer W_{i,j} ( 0 <= q W_{i,j} <= q1 ). Another information about the graph is that the graph is shaped in such a way such that each vertex can be reached from vertex 1 via zero or more directed edges. Pak Chanek has an array Z that is initially empty. Pak Chanek defines the function dfs as follows: Note that the function does not keep track of which vertices have been visited, so each vertex can be processed more than once. Let's say Pak Chanek does dfs(1) once. After that, Pak Chanek will get an array Z containing some elements 0 or 1 . Define an inversion in array Z as a pair of indices (x, y) ( x < y ) such that Z_x > Z_y . How many different inversions in Z are there if Pak Chanek does dfs(1) once? Since the answer can be very big, output the answer modulo 998 ,244 ,353 . The first line contains a single integer N ( 2 <= q N <= q 10^5 ) -- the number of vertices in the graph. The following lines contain the description of each vertex from vertex 1 to vertex N . The first line of each vertex i contains a single integer S_i ( 0 <= q S_i <= q N-1 ) -- the number of edges directed away from vertex i . The j -th of the next S_i lines of each vertex i contains two integers L_{i,j} and W_{i,j} ( 1 <= q L_{i,j} <= q N ; 0 <= q W_{i,j} <= q 1 ) -- an edge directed away from vertex i that is directed towards vertex L_{i,j} and has an integer W_{i,j} . For each i , the values of L_{i,1} , L_{i,2} , ..., L_{i,S_i} are pairwise distinct. It is guaranteed that the sum of S"...

Tutorials

COMPFEST 15 Preliminary — Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
221693978 Wegz C Sept. 3, 2023, 1:37 p.m. OK GNU C++14 TESTS 12 108 13824000
221712275 jielosc C Sept. 3, 2023, 3:22 p.m. OK GNU C++14 TESTS 12 108 15974400
221760293 stoWhaleAtcolaorz C Sept. 4, 2023, 1:10 a.m. OK GNU C++14 TESTS 12 109 6451200
221697392 hhoangcp C Sept. 3, 2023, 1:55 p.m. OK GNU C++14 TESTS 12 109 12288000
221692139 yaser.harba Ahmad7_7 Ismail_Alrifai C Sept. 3, 2023, 1:28 p.m. OK GNU C++14 TESTS 12 109 12288000
221739096 Cmndr_Salamander pedro.racchetti C Sept. 3, 2023, 6:55 p.m. OK GNU C++14 TESTS 12 109 15769600
221763380 jielosc C Sept. 4, 2023, 2:27 a.m. OK GNU C++14 TESTS 12 109 15974400
221706988 oursaco omeganot cry C Sept. 3, 2023, 2:48 p.m. OK GNU C++14 TESTS 12 124 10649600
221734005 Ramprosad C Sept. 3, 2023, 6:13 p.m. OK GNU C++14 TESTS 12 124 11059200
221725331 SpadeA261 dayux C Sept. 3, 2023, 4:55 p.m. OK GNU C++14 TESTS 12 124 12288000
221767043 OobugoO C Sept. 4, 2023, 3:37 a.m. OK GNU C++17 TESTS 12 108 11366400
221703892 Kither C Sept. 3, 2023, 2:30 p.m. OK GNU C++17 TESTS 12 108 12595200
221725514 Jene1ht _KuroNeko_ GK_Leo0 C Sept. 3, 2023, 4:57 p.m. OK GNU C++17 TESTS 12 108 16588800
221758640 suibian_xiaozhao C Sept. 4, 2023, 12:26 a.m. OK GNU C++17 TESTS 12 109 8601600
221696261 AhmedEzzatG Ahmed-Yasser C Sept. 3, 2023, 1:49 p.m. OK GNU C++17 TESTS 12 109 10547200
221721430 yunipoke C Sept. 3, 2023, 4:27 p.m. OK GNU C++17 TESTS 12 109 11878400
221753877 JuanFPTam C Sept. 3, 2023, 10:09 p.m. OK GNU C++17 TESTS 12 109 12185600
221703094 duybinh_cbl memaybeovai retardlord C Sept. 3, 2023, 2:25 p.m. OK GNU C++17 TESTS 12 109 12185600
221698844 Chelovek9 C Sept. 3, 2023, 2:03 p.m. OK GNU C++17 TESTS 12 109 13414400
221696977 conexposys C Sept. 3, 2023, 1:53 p.m. OK GNU C++17 TESTS 12 109 13824000
221709968 XH_v lxllxs C Sept. 3, 2023, 3:07 p.m. OK GNU C++17 (64) TESTS 12 78 18944000
221696032 piyush_pransukhka koderkushy sv1shan C Sept. 3, 2023, 1:48 p.m. OK GNU C++17 (64) TESTS 12 93 14336000
221760893 Capps C Sept. 4, 2023, 1:26 a.m. OK GNU C++17 (64) TESTS 12 93 15257600
221727042 TrendBattles C Sept. 3, 2023, 5:07 p.m. OK GNU C++17 (64) TESTS 12 93 19660800
221707170 LLZZKK C Sept. 3, 2023, 2:49 p.m. OK GNU C++17 (64) TESTS 12 93 20889600
221725367 Hackerzoe C Sept. 3, 2023, 4:56 p.m. OK GNU C++17 (64) TESTS 12 108 17715200
221710628 __now__or__never__ the_dragon_emperor Asif17r C Sept. 3, 2023, 3:11 p.m. OK GNU C++17 (64) TESTS 12 108 20480000
221740404 wwdd C Sept. 3, 2023, 7:05 p.m. OK GNU C++17 (64) TESTS 12 108 22835200
221695909 keatsli C Sept. 3, 2023, 1:47 p.m. OK GNU C++17 (64) TESTS 12 108 23244800
221707329 arpeggio John_zyj hylhyl C Sept. 3, 2023, 2:50 p.m. OK GNU C++17 (64) TESTS 12 108 24883200
221695215 maspy C Sept. 3, 2023, 1:44 p.m. OK GNU C++20 (64) TESTS 12 62 18636800
221767949 tsatuei C Sept. 4, 2023, 3:52 a.m. OK GNU C++20 (64) TESTS 12 62 20070400
221767442 tsatuei C Sept. 4, 2023, 3:43 a.m. OK GNU C++20 (64) TESTS 12 62 21606400
221767376 tsatuei C Sept. 4, 2023, 3:42 a.m. OK GNU C++20 (64) TESTS 12 62 21606400
221715903 adriancm C Sept. 3, 2023, 3:47 p.m. OK GNU C++20 (64) TESTS 12 62 73932800
221711129 magga islingr C Sept. 3, 2023, 3:14 p.m. OK GNU C++20 (64) TESTS 12 78 16486400
221749895 Gamal74 C Sept. 3, 2023, 8:49 p.m. OK GNU C++20 (64) TESTS 12 78 16588800
221761354 ItzDesert C Sept. 4, 2023, 1:37 a.m. OK GNU C++20 (64) TESTS 12 78 18022400
221763720 EthanZYF C Sept. 4, 2023, 2:34 a.m. OK GNU C++20 (64) TESTS 12 78 18124800
221730071 EthanZYF C Sept. 3, 2023, 5:34 p.m. OK GNU C++20 (64) TESTS 12 78 18124800
221751645 k1rill_fedoseev C Sept. 3, 2023, 9:21 p.m. OK Go TESTS 12 156 81715200
221731412 vaibhav_1710 C Sept. 3, 2023, 5:47 p.m. OK Java 17 TESTS 12 436 51609600
221709638 shinghalrishabh C Sept. 3, 2023, 3:05 p.m. OK Java 8 TESTS 12 390 57139200
221702191 wry9852022 C Sept. 3, 2023, 2:20 p.m. OK MS C++ 2017 TESTS 12 358 8499200
221724418 raideva rahul_shrestha isheoran C Sept. 3, 2023, 4:49 p.m. OK PyPy 3-64 TESTS 12 1154 110080000
221698698 hanbro0112 C Sept. 3, 2023, 2:02 p.m. OK Python 3 TESTS 12 936 57753600
221727389 0npata C Sept. 3, 2023, 5:10 p.m. OK Rust 2021 TESTS 12 93 22630400
221698492 andrey.m paletskih C Sept. 3, 2023, 2:01 p.m. OK Rust 2021 TESTS 12 93 28876800

remove filters

Back to search problems