Delete the least number of integers from a given set of integers so that the product of the remaining integers in the set is a perfect square. In case there is more than one solution then find the solution that gives the largest perfect square. Assume that each integer contains five or less number of digits. The total number of integers in the given set is twenty or less.
First line will be number of test cases
The input may contain multiple test cases.
For each test case there is a single input line. The line contains the given set of integers.
For each test case there is only one output line. The line simply prints the integers to be deleted in ascending order. There are two special cases; print output for these cases as indicated below.
Case 1: No integer is to be deleted: Print 0 as output.
Case 2: All integers are to be deleted: Print all integers in ascending order.
I am a MFC developer, my mission is porting from MFC to QT application. But I can not find the easy way to porting, it's so hard and maybe i lose my mission.
Can any know how to porting from MFC to QT. Please help me.
As others have eluded, I don't think there is an "easy way" to port the code over. You'll have to basically start re-writing things and solve problems as they come up. Having written things in both MFC and Qt, you may end up doing a lot of re-design since the frameworks can vary quite a bit with some things.
If you're looking for something that may be easier to port so that it works in other platforms (i.e.Linux), WxWidgets may be an easier port.
hello everyone, i made a tic tac toe in C language, using the minimax algorithm but i have some problem when i try to play with larger matrix more than 3x3 for example 4x4 and my program go out of memory.
So i search in the net and i discover the aplpha-beta pruning that reduce the computional coast and so i can play with 4x4 matrix whiteout problems but i have not idea to implement this algorithm to my minimax.
if there is a person who want to help me i would be grateful.
sorry for my bad english but i am italian
i can post my code if you want
Without actually trying this out.... you should be able to take the pointer to the first element and load it with whatever data you want. Assuming your data matches the size of the structure, there should be no issue, be ware of data packing/memory alignment though. Read this before you get yourself into trouble.[^]