SWERC 2021-2022 - 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
1662 SWERC 2021-2022 - Online Mirror (Unrated, ICPC Rules, Teams Preferred) FINISHED False 18000 86468063 April 24, 2022, 11:05 a.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 245 ) J Training Camp PROGRAMMING flows graphs

B"You are organizing a training camp to teach algorithms to young kids. There are n^2 kids, organized in an n by n grid. Each kid is between 1 and n years old (inclusive) and any two kids who are in the same row or in the same column have different ages. You want to select exactly n kids for a programming competition, with exactly one kid from each row and one kid from each column. Moreover, kids who are not selected must be either older than both kids selected in their row and column, or younger than both kids selected in their row and column (otherwise they will complain). Notice that it is always possible to select n kids satisfying these requirements (for example by selecting n kids who have the same age). During the training camp, you observed that some kids are good at programming, and the others are not. What is the maximum number of kids good at programming that you can select while satisfying all the requirements? The first line contains n ( 1 <= q n <= q 128 ) -- the size of the grid. The following n lines describe the ages of the kids. Specifically, the i -th line contains n integers a_{i,1}, , a_{i,2}, , ... , , a_{i, n} ( 1 <= a_{i,j} <= n ) -- where a_{i,j} is the age of the kid in the i -th row and j -th column. It is guaranteed that two kids on the same row or column have different ages, i.e., a_{i,j} ne a_{i,j'} for any 1 <= i <= n , 1 <= j < j' <= n , and a_{i,j} ne a_{i',j} for any 1 <= i < i' <= n , 1 <= j <= n . The following n lines describe the programming skills of the kids. Specifically, the i -th line contains n integers c_{i,1}, , c_{i,2}, , ... , , c_{i, n} ( c_{i,j} in {0, , 1 } ) -- where c_{i,j}=1 if the kid in the i -th row and j -th column is good at programming and c_{i,j}=0 otherwise. Print the maximum number of kids good at pr"...

Tutorials

102042

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
154862300 djq_cpp hehezhou MiracleFaFa J April 24, 2022, 2:27 p.m. OK GNU C++14 TESTS 25 187 23449600
154862539 Merkurev KAN Um_nik J April 24, 2022, 2:29 p.m. OK GNU C++17 TESTS 25 234 8396800
154863985 tourist ksun48 J April 24, 2022, 2:46 p.m. OK GNU C++20 (64) TESTS 25 62 5324800
154866994 jiangly J April 24, 2022, 3:19 p.m. OK GNU C++20 (64) TESTS 25 171 5939200

remove filters

Back to search problems