Chef And Closure

medium
https://www.codechef.com/COOK132B/problems/CLOSCHEF

Input Format

Check Link

Output Format

Check Link

Constraints

Check Link

Example

Input
3
3
1 0 3
3
1 -1 -1
3
1 3 3
Output
1
1
0
Previous
About Bacteria
Next
Remove One Element

Related Questions