Seating Arrangements (hard version)
1566D21600· expert1s256 MB⌨ stdin/stdout
Examples
Sample 1of 1
Input
71 21 23 21 1 2 2 3 33 33 4 4 1 1 1 1 1 22 21 1 2 14 250 50 50 50 3 50 50 504 26 6 6 6 2 2 9 62 91 3 3 3 3 3 1 1 3 1 3 1 1 3 3 1 1 3
Output
1040001
58%
1566D2.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)