CC Wing Selection Contest 2026

Revision en12, by vishwas_16.0, 2026-08-12 13:08:37

Editorial — CC Wing Selection Contest 2026

CC-Wing Trial GeekHaven 2026

Problem A : Terms and Conditions
Author : vishwas_16.0

Hint 1
Solution
Code

Problem B: Guess the Permutation

Hint 1
Hint 2
Solution
Code

Problem C : ZYW with his score

Hint 1
Hint 2
Solution
Code

Problem D: KIT KAT

Solution
Code

Problem E : Evenly Separable

Hint 1
Hint 2
Solution
Code

Problem F: Stop Routes

Solution
Code

Problem G: Rings And Towers

Solution
Code

Problem I : Hardest Problem

"Suppose the energy cost cannot exceed x, meaning the maximum slab number that can be moved is x. To move all slabs out of the rectangular range, two conditions must be satisfied:

  1. No slab with a number exceeding x lies within the rectangle. Otherwise those slabs would be stuck inside the rectangle.
  2. Slabs with numbers exceeding x divide the garden into connected components, and if condition (1) holds, the rectangle belongs entirely to one connected component. Within the connected component containing the rectangle, the size of the rectangle cannot exceed the number of empty cells in that component. Otherwise, no matter how you move things, some slab will always remain inside the rectangle.

Condition (1) can be checked just by looking at the slab numbers inside the rectangle. Condition (2) can be checked via DFS / BFS / Disjoint Set Union, comparing the size of the connected component containing (u1,v1) against the number of empty cells in it.

Using binary search, we can find the minimum x satisfying both conditions above, with time complexity O(nm log k). Special attention should be paid to the cases where the answer is 0, -1, or k."

Hint 1
Hint 2
Solution
Code

Problem J : Easiest Problem

Hint 1
Hint 2
Solution
Code

Problem K: Second Last problem
Author: dheeraj.dontha

Hint 1
Hint 2
Hint 3
Solution
Code

Problem L : Gifts for Her
Author: zonedout

Hint 1
Hint 2
Solution
Code

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en25 English vishwas_16.0 2026-08-12 17:02:36 0 (published)
en24 English vishwas_16.0 2026-08-12 17:02:13 2 Tiny change: ' \n</br>\n[Problem' -> ' \n</br>\n\n[Problem'
en23 English vishwas_16.0 2026-08-12 17:01:52 265 (saved to drafts)
en22 English vishwas_16.0 2026-08-12 16:57:20 0 Tiny change: 're given $a+b$ and $a\&b$ directly' -> 're given $$ a+b $$ and $$a\&b$$ directly' (published)
en21 English vishwas_16.0 2026-08-12 16:55:57 1655 Tiny change: 're given $a+b$ and $a\&b$ directly' -> 're given $$ a+b $$ and $$a\&b$$ directly'
en20 English vishwas_16.0 2026-08-12 16:54:45 46 Tiny change: 're given $a+b$ and $a\&b$ directly' -> 're given $$ a+b $$ and $$a\&b$$ directly'
en19 English vishwas_16.0 2026-08-12 16:53:57 6 Tiny change: 're given $a+b$ and $a\&b$ directly' -> 're given $$ a+b $$ and $$a\&b$$ directly'
en18 English vishwas_16.0 2026-08-12 16:52:37 4
en17 English vishwas_16.0 2026-08-12 13:26:34 1 Tiny change: '") and $a \& b$ (the ' -> '") and $a & b$ (the '
en16 English vishwas_16.0 2026-08-12 13:20:16 8 Tiny change: 'Editorial &mdash; CC Wing S' -> 'Editorial CC Wing S'
en15 English vishwas_16.0 2026-08-12 13:16:29 2 Tiny change: 'Editorial &mdash; CC Wing S' -> 'Editorial - CC Wing S'
en14 English vishwas_16.0 2026-08-12 13:15:55 3482
en13 English vishwas_16.0 2026-08-12 13:09:37 1172
en12 English vishwas_16.0 2026-08-12 13:08:37 5946
en11 English vishwas_16.0 2026-08-12 12:52:18 3499
en10 English vishwas_16.0 2026-08-12 12:48:20 7030
en9 English vishwas_16.0 2026-08-12 12:47:49 3433
en8 English vishwas_16.0 2026-08-12 12:47:10 4887
en7 English vishwas_16.0 2026-08-12 12:46:23 10400
en6 English vishwas_16.0 2026-08-12 12:41:59 0
en5 English vishwas_16.0 2026-08-12 12:41:59 0
en4 English vishwas_16.0 2026-08-12 12:41:59 16235
en3 English vishwas_16.0 2026-08-12 09:59:11 3020
en2 English vishwas_16.0 2026-08-12 09:54:52 6475
en1 English vishwas_16.0 2026-08-12 09:46:08 29176 Initial revision (saved to drafts)