UVa 11080 - Place the Guards

Problem Number - Problem Name

 * [Problem Link]

Summary
Its a simple bipartite graph Problem...like as UVA 10004.

Explanation
If Its not BiGraph print -1;

Implementations
Notes/Hints on actual implementation here.

Optimizations
Optimizations here.

Input
5 5 1 0 1 5 0 1 0 4 2 0 1 2 3 5 5 0 1 1 2 2 3 0 4 3 4

Output
4 5 1 2 -1