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 |
---|---|---|---|---|---|---|
1989 | Educational Codeforces Round 167 (Rated for Div. 2) | FINISHED | False | 7200 | 12324299 | June 27, 2024, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 451 ) | F | Simultaneous Coloring | PROGRAMMING | dfs and similar divide and conquer graphs |
B"You are given a matrix, consisting of n rows and m columns. You can perform two types of actions on it: Note that you cannot choose which color to paint the row or column. In one second, you can perform either one action or multiple actions at the same time. If you perform one action, it will be free. If you perform k > 1 actions at the same time, it will cost k^2 coins. When multiple actions are performed at the same time, for each cell affected by actions of both types, the color can be chosen independently. You are asked to process q queries. Before each query, all cells become colorless. Initially, there are no restrictions on the color of any cells. In the i -th query, a restriction of the following form is added: Thus, after i queries, there are i restrictions on the required colors of the matrix cells. After each query, output the minimum cost of painting the matrix according to the restrictions. The first line contains three integers n, m and q ( 1 <= n, m, q <= 2 cdot 10^5 ) -- the size of the matrix and the number of queries. In the i -th of the next q lines, two integers x_i, y_i and a character c_i ( 1 <= x_i <= n ; 1 <= y_i <= m ; c_i in {'R', 'B'}, where 'R' means red, and 'B' means blue) -- description of the i -th restriction. The cells in all queries are pairwise distinct. Print q integers -- after each query, output the minimum cost of painting the matrix according to the restrictions. "... |
Educational Codeforces Round 167 Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
267830595 | Heheta | F | June 28, 2024, 9:10 a.m. | OK | C++14 (GCC 6-32) | TESTS | 49 | 1093 | 36659200 | ||
267887473 | Rohith_32432 | F | June 28, 2024, 4:05 p.m. | OK | C++17 (GCC 7-32) | TESTS | 49 | 843 | 160256000 | ||
267836561 | pp_orange | F | June 28, 2024, 9:53 a.m. | OK | C++17 (GCC 7-32) | TESTS | 49 | 843 | 160256000 | ||
267854523 | regain0001 | F | June 28, 2024, 12:12 p.m. | OK | C++17 (GCC 7-32) | TESTS | 49 | 952 | 80281600 | ||
267822214 | Shayan86 | F | June 28, 2024, 8:10 a.m. | OK | C++17 (GCC 7-32) | TESTS | 49 | 1187 | 149811200 | ||
267827108 | Shayan86 | F | June 28, 2024, 8:46 a.m. | OK | C++17 (GCC 7-32) | TESTS | 49 | 1218 | 149811200 | ||
267798069 | Tobo | F | June 28, 2024, 3:26 a.m. | OK | C++17 (GCC 7-32) | TESTS | 49 | 1343 | 72294400 | ||
267854343 | Sparkle_Twilight | F | June 28, 2024, 12:11 p.m. | OK | C++17 (GCC 7-32) | TESTS | 49 | 2593 | 279859200 | ||
267830844 | 2100030468 | F | June 28, 2024, 9:12 a.m. | OK | C++17 (GCC 7-32) | TESTS | 49 | 3967 | 459366400 | ||
267837879 | mohamedelsadek | F | June 28, 2024, 10:03 a.m. | OK | C++17 (GCC 7-32) | TESTS | 49 | 4015 | 457830400 | ||
267883030 | fahimcp495 | F | June 28, 2024, 3:34 p.m. | OK | C++17 (GCC 7-32) | TESTS | 49 | 4937 | 49459200 | ||
267917741 | warner1129 | F | June 28, 2024, 8:26 p.m. | OK | C++20 (GCC 13-64) | TESTS | 49 | 593 | 46080000 | ||
267848075 | lprdsb | F | June 28, 2024, 11:21 a.m. | OK | C++20 (GCC 13-64) | TESTS | 49 | 812 | 144691200 | ||
267854784 | RED_INSIDE | F | June 28, 2024, 12:14 p.m. | OK | C++20 (GCC 13-64) | TESTS | 49 | 874 | 155852800 | ||
267831549 | SkyHappy | F | June 28, 2024, 9:17 a.m. | OK | C++20 (GCC 13-64) | TESTS | 49 | 889 | 106086400 | ||
267872415 | gyydp123_LIM | F | June 28, 2024, 2:24 p.m. | OK | C++20 (GCC 13-64) | TESTS | 49 | 937 | 144691200 | ||
267871083 | gyydp123_LIM | F | June 28, 2024, 2:15 p.m. | OK | C++20 (GCC 13-64) | TESTS | 49 | 983 | 168857600 | ||
267873668 | gyydp123_LIM | F | June 28, 2024, 2:33 p.m. | OK | C++20 (GCC 13-64) | TESTS | 49 | 1015 | 128819200 | ||
267922451 | camc | F | June 28, 2024, 9:33 p.m. | OK | C++20 (GCC 13-64) | TESTS | 49 | 1171 | 43315200 | ||
267901398 | camc | F | June 28, 2024, 5:49 p.m. | OK | C++20 (GCC 13-64) | TESTS | 49 | 1187 | 339456000 | ||
267932623 | kevin | F | June 29, 2024, 1:09 a.m. | OK | C++20 (GCC 13-64) | TESTS | 49 | 1202 | 111718400 | ||
267925473 | dzhi | F | June 28, 2024, 10:28 p.m. | OK | Java 21 | TESTS | 49 | 3218 | 174387200 | ||
267951921 | BetterThanNobita | F | June 29, 2024, 6 a.m. | OK | Rust 2021 | TESTS | 49 | 3312 | 90828800 |
Back to search problems