Ad
  • Default User Avatar

    Why does this always work? could you explain?

  • Custom User Avatar

    Till means counter or cashier. I'll draw them here
    example:
    int customers2[] = {10, 2, 3, 3}; //each clients with different duration of transaction
    int customers2_length = 4; //number of clients
    int n2 = 2; //number of tills

          SUPERMARKET TILL
         =====================
         | till1  |  till2  |
         |========|=========|
         |  10    |    2    |
         |        |         |
         |                  | 
         |        3         |
         |                  |
                  3
    

    there are 2 tills or cashiers and there are 4 clients so this is my illustration
    the first two clients 10, 2 are on the till/counter and the other clients 3,3 is waiting for their turn.

    now you must solve the time consumed in order for all of them to finish the transaction.
    in this example the output should be 10.
    because 2 will be finished in 2 minutes and then next is 3 after 3 minutes the last client 3 will follow. 2 + 2 + 3 = 7 minutes
    on the other hand the client 10 is not finished yet and still on the counter so the time consumed for them to finish is 10 minutes.
    I hope you understand. GL!

  • Default User Avatar

    Think about yourself being at the supermarket where there are n self-service check-outs, and a line of customers, where you know how long time it takes for each customer. How long time does it take in total for all customers to check out? That's it.

  • Default User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Default User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Default User Avatar

    It even says product in the snippet you gave us. The notes explain everything.

  • Default User Avatar

    But where in the problem does it state that ? "each Two integers product " seems rather ambiguous tbh
    But maybe I'm just not used to code war problems

  • Default User Avatar

    Perhaps because the tasks aren´t that hard (python). Just copy the code and run it line by line with printing each new part. Best practice would be with a comment.

  • Default User Avatar

    Why does nobody comment on their solutions at all?

  • Custom User Avatar

    Read the instructions again, it's not 5 + 4 + 2 + 3 what you have to do, where are the products there?

    Given an array of integers , Find the minimum sum which is obtained from summing each Two integers product .

  • Default User Avatar

    This comment is hidden because it contains spoiler information about the solution