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 |
---|---|---|---|---|---|---|
1835 | Codeforces Round 880 (Div. 1) | FINISHED | False | 7200 | 50081063 | June 18, 2023, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 178 ) | F | Good Graph | PROGRAMMING | bitmasks graph matchings graphs implementation |
B'You are given a bipartite graph G with the vertex set in the left part L , in the right part R , and m edges connecting these two sets. We know that |L| = |R| = n . For any subset S subseteq L , let N(S) denote the set of all neighbors of vertices in S . We say that a subset S subseteq L in graph G is tight if |S| = |N(S)| . We say that graph G is good if forall_{S subseteq L}, |S| <= q |N(S)| . Your task is to verify whether the graph is good and, if so, to optimize it. If the graph is not good, find a subset S subseteq L such that |S| > |N(S)| . However, if the graph is good, your task is to find a good bipartite graph G ' with the same set of vertices L cup R , in which forall_{S subseteq L} , S is tight in G if and only if S is tight in G ' . If there are multiple such graphs, choose one with the smallest possible number of edges. If there are still multiple such graphs, print any. The first line of the input contains two integers n and m ( 1 <= q n <= q 10^3 , 0 <= q m <= q n^2 ), separated by a single space. The number n denotes the number of vertices in each of the sets L and R , and the number m denotes the number of edges between them. The following m lines describe the edges. Each of them contains two integers l and r ( 1 <= q l <= q n , n+1 <= q r <= q 2 cdot n ), separated by a single space, indicating that there is an edge from vertex l in L to vertex r in R . If the graph G given in the input is not good, output one word "NO" in the first line of the output. In the second line of the output, output the number k , and in the third line, output k numbers l_1, l_2, ... , l_k , separated by single spaces. These numbers should indicate that for the set S = {l_1, l_2, ... , l_k } , |S| > |N(S)| . However, '... |
Codeforces Round 880 Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
210149813 | rainboy | F | June 18, 2023, 3:52 p.m. | OK | GNU C11 | TESTS | 84 | 358 | 27136000 | ||
210179696 | call_me_pandit | F | June 18, 2023, 7:23 p.m. | OK | GNU C++14 | TESTS | 84 | 233 | 27443200 | ||
210194880 | luogu_bot4 | F | June 19, 2023, 2:19 a.m. | OK | GNU C++14 | TESTS | 84 | 1013 | 24064000 | ||
210161299 | Um_nik | F | June 18, 2023, 4:25 p.m. | OK | GNU C++17 | TESTS | 84 | 1575 | 11776000 | ||
210184854 | rainboy | F | June 18, 2023, 9 p.m. | OK | GNU C++17 (64) | TESTS | 84 | 202 | 26828800 | ||
210168915 | 244mhq | F | June 18, 2023, 5:15 p.m. | OK | GNU C++17 (64) | TESTS | 84 | 374 | 69836800 | ||
210187355 | icecuber | F | June 18, 2023, 10:15 p.m. | OK | GNU C++17 (64) | TESTS | 84 | 826 | 15155200 | ||
210202108 | Kubic | F | June 19, 2023, 4:48 a.m. | OK | GNU C++17 (64) | TESTS | 84 | 888 | 819200 | ||
210200486 | ecnerwala | F | June 19, 2023, 4:12 a.m. | OK | GNU C++20 (64) | TESTS | 84 | 187 | 12492800 | ||
210194865 | cnnfls_csy | F | June 19, 2023, 2:19 a.m. | OK | GNU C++20 (64) | TESTS | 84 | 889 | 23654400 | ||
210198395 | Hritik12 | F | June 19, 2023, 3:37 a.m. | OK | GNU C++20 (64) | TESTS | 84 | 919 | 23654400 | ||
210195863 | Lynkcat | F | June 19, 2023, 2:42 a.m. | OK | GNU C++20 (64) | TESTS | 84 | 951 | 21196800 | ||
210195840 | Lynkcat | F | June 19, 2023, 2:41 a.m. | OK | GNU C++20 (64) | TESTS | 84 | 967 | 21196800 | ||
210152027 | -0.5 | F | June 18, 2023, 3:58 p.m. | OK | GNU C++20 (64) | TESTS | 84 | 1435 | 11366400 | ||
210168905 | ko_osaga | F | June 18, 2023, 5:15 p.m. | OK | GNU C++20 (64) | TESTS | 84 | 1591 | 21094400 |
Back to search problems