Codeforces Round 561 (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
1166 Codeforces Round 561 (Div. 2) FINISHED False 7200 179333687 May 17, 2019, 3:05 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 738 ) F Vicky's Delivery Service PROGRAMMING data structures ds graphs hashing 2800

B'In a magical land there are n cities conveniently numbered 1, 2, ... , n . Some pairs of these cities are connected by magical colored roads. Magic is unstable, so at any time, new roads may appear between two cities. Vicky the witch has been tasked with performing deliveries between some pairs of cities. However, Vicky is a beginner, so she can only complete a delivery if she can move from her starting city to her destination city through a double rainbow. A double rainbow is a sequence of cities c_1, c_2, ... , c_k satisfying the following properties: For example if k = 5 , the road between c_1 and c_2 must be the same color as the road between c_2 and c_3 , and the road between c_3 and c_4 must be the same color as the road between c_4 and c_5 . Vicky has a list of events in chronological order, where each event is either a delivery she must perform, or appearance of a new road. Help her determine which of her deliveries she will be able to complete. The first line contains four integers n , m , c , and q ( 2 <= n <= 10^5 , 1 <= m, c, q <= 10^5 ), denoting respectively the number of cities, the number of roads initially present, the number of different colors the roads can take, and the number of events. Each of the following m lines contains three integers x , y , and z ( 1 <= x, y <= n , 1 <= z <= c ), describing that there initially exists a bidirectional road with color z between cities x and y . Then q lines follow, describing the events. Each event is one of the following two types: It is guaranteed that at any moment, there is at most one road connecting any pair of cities, and that no road connects a city to itself. It is guaranteed that the input contains at least one event of the second type. For each event of the second type, print a single line containing "Yes" (without quotes) if '...

Tutorials

Codeforces Round #561 (Div. 2) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
54623276 Big_black_jujube F May 25, 2019, 1:19 p.m. OK GNU C++11 TESTS 56 156 26214400 2800
54623057 Big_black_jujube F May 25, 2019, 1:12 p.m. OK GNU C++11 TESTS 56 156 26214400 2800
55610847 ReaLNero1 F June 16, 2019, 5:37 a.m. OK GNU C++11 TESTS 56 218 26214400 2800
54825606 SoiMae F May 30, 2019, 6:16 a.m. OK GNU C++11 TESTS 56 234 33177600 2800
54875378 SoiMae F May 31, 2019, 11:33 a.m. OK GNU C++11 TESTS 56 249 32256000 2800
54572352 arthur.nascimento F May 24, 2019, 8:10 p.m. OK GNU C++11 TESTS 56 249 36249600 2800
54873798 SoiMae F May 31, 2019, 10:46 a.m. OK GNU C++11 TESTS 56 264 30924800 2800
54325883 lzoilxy F May 18, 2019, 2:38 a.m. OK GNU C++11 TESTS 56 264 30924800 2800
54905666 justin_cao F June 1, 2019, 8:41 a.m. OK GNU C++11 TESTS 56 265 31334400 2800
54875579 SoiMae F May 31, 2019, 11:39 a.m. OK GNU C++11 TESTS 56 265 31539200 2800
62600085 jakedavis F Oct. 15, 2019, 5 a.m. OK GNU C++14 TESTS 56 248 28262400 2800
62600616 jakedavis F Oct. 15, 2019, 5:20 a.m. OK GNU C++14 TESTS 56 249 28262400 2800
62768370 jakedavis F Oct. 17, 2019, 9:24 a.m. OK GNU C++14 TESTS 56 264 28262400 2800
62600649 jakedavis F Oct. 15, 2019, 5:22 a.m. OK GNU C++14 TESTS 56 264 28262400 2800
62768442 jakedavis F Oct. 17, 2019, 9:26 a.m. OK GNU C++14 TESTS 56 265 28262400 2800
54323503 agtxdy_orz F May 18, 2019, 12:10 a.m. OK GNU C++14 TESTS 56 296 40652800 2800
54323528 agtxdy_orz F May 18, 2019, 12:12 a.m. OK GNU C++14 TESTS 56 311 47513600 2800
54395737 abeker F May 19, 2019, 7:54 p.m. OK GNU C++14 TESTS 56 326 102297600 2800
57639952 luogu_bot2 F July 24, 2019, 12:16 p.m. OK GNU C++14 TESTS 56 327 31027200 2800
54314798 Strikeskids F May 17, 2019, 5:58 p.m. OK GNU C++14 TESTS 56 327 31436800 2800
54352585 seiko.iwasawa F May 18, 2019, 3:43 p.m. OK GNU C++17 TESTS 56 295 23859200 2800
54475581 Nots0fast F May 22, 2019, 8:15 a.m. OK GNU C++17 TESTS 56 311 44646400 2800
54516148 tuwuna F May 23, 2019, 9:57 a.m. OK GNU C++17 TESTS 56 326 32358400 2800
56273249 supremeyu F June 29, 2019, 1 p.m. OK GNU C++17 TESTS 56 327 31027200 2800
54454836 shibaider F May 21, 2019, 3:15 p.m. OK GNU C++17 TESTS 56 327 31027200 2800
54321544 Antoine F May 17, 2019, 9:42 p.m. OK GNU C++17 TESTS 56 327 31436800 2800
54337498 AnimeshSinha1309 F May 18, 2019, 8:48 a.m. OK GNU C++17 TESTS 56 327 32256000 2800
54318308 abolf F May 17, 2019, 7:27 p.m. OK GNU C++17 TESTS 56 327 32358400 2800
54415548 sebi110 F May 20, 2019, 12:22 p.m. OK GNU C++17 TESTS 56 327 40345600 2800
54342054 yan-zp F May 18, 2019, 10:48 a.m. OK GNU C++17 TESTS 56 342 31027200 2800
54448610 dalt F May 21, 2019, 12:31 p.m. OK Java 8 TESTS 56 654 78336000 2800
54372419 xodiac F May 19, 2019, 7:12 a.m. OK Java 8 TESTS 56 779 117248000 2800
54344518 Nutella3000 F May 18, 2019, 11:49 a.m. OK Java 8 TESTS 56 795 73932800 2800
54365031 SpargelTarzan F May 19, 2019, 1:41 a.m. OK Java 8 TESTS 56 842 73625600 2800
54307941 uwi F May 17, 2019, 4:46 p.m. OK Java 8 TESTS 56 842 96153600 2800
54303419 Dukkha F May 17, 2019, 4:22 p.m. OK Java 8 TESTS 56 888 72192000 2800
54471845 forsenE F May 22, 2019, 5:59 a.m. OK Java 8 TESTS 56 1123 124620800 2800
54471866 forsenE F May 22, 2019, 6 a.m. OK Java 8 TESTS 56 1154 124928000 2800
54533062 zhishou F May 23, 2019, 6:11 p.m. OK Java 8 TESTS 56 1169 143564800 2800
54533043 zhishou F May 23, 2019, 6:10 p.m. OK Java 8 TESTS 56 1247 156262400 2800
54527654 armoking F May 23, 2019, 3:20 p.m. OK Kotlin TESTS 56 1106 167833600 2800
54527474 armoking F May 23, 2019, 3:14 p.m. OK Kotlin TESTS 56 1294 154112000 2800
54664864 camypaper F May 26, 2019, 12:45 p.m. OK Mono C# TESTS 56 951 119398400 2800
54420771 hld67890 F May 20, 2019, 3:18 p.m. OK MS C++ 2017 TESTS 56 701 37683200 2800
57359968 0-jij-0 F July 20, 2019, 7:25 a.m. OK MS C++ 2017 TESTS 56 998 34611200 2800
67853149 Letmecry F Dec. 29, 2019, 4:41 a.m. OK Rust TESTS 56 1294 83046400 2800
67853091 Letmecry F Dec. 29, 2019, 4:38 a.m. OK Rust TESTS 56 1699 83046400 2800

remove filters

Back to search problems