410807: GYM104118 I Item Crafting
Memory Limit:256 MB
Time Limit:2 S
Judge Style:Text Compare
Creator:
Submit:0
Solved:0
Description
I. Item Craftingtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputExamplesInput
2 6 2 3 4 3 4 5 6 0 1 0 1 0 1 0 1Output
1Input
2 6 2 3 4 3 4 5 6 0 1 0 2 0 1 0 1Output
2Input
1 5 2 2 3 2 3 4 2 4 5 0 3 0 2Output
1Input
1 4 3 2 3 4 0 2 1 4 0 1Output
0