You have m workers numbered 1 through m, and you have n tasks that must be completed. You know which tasks can be performed by each of the workers. If worker i completes t different tasks, he must be paid cost[i]*t^{2}. You would like to minimize the total cost of completing all the tasks.
You will be given a String[] can describing the capabilities of your workers. The ith element describes worker i and contains n characters. The jth character is 'Y' if the worker can perform the jth task, and 'N' if he can't. You will also be given a int[] cost. The ith element of cost is the cost of worker i (as used in the formula above). All indices are 1based. Return the minimal total cost required to complete all the tasks, or 1 if all the tasks cannot be completed.
