Construct an Array (Hard Version)
2245D24s1024 MB⌨ stdin/stdout
Examples
Sample 1of 1multi-test • hover to link
Input
101 11 1 11 12 1 12 31 1 11 1 21 2 22 31 1 11 2 22 1 23 61 1 11 1 21 1 32 2 22 2 32 3 33 62 1 11 1 22 2 31 3 31 2 22 1 32 12 1 23 41 1 21 2 32 1 32 2 24 07 71 1 22 2 31 3 42 4 51 5 62 6 71 7 7
Output
YES0YES-1YES0 0NOYES1 -1 -1NOYES-1 -1NOYES0 0 0 0YES6 -6 4 -4 2 -2 0
58%
2245D2.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)
loading graph engine…