Description We know that if a phone number A is another phone number B’s prefix, B is not able to be called. For an example, A is 123 while B is 12345, after pressing 123, we call A, and not able to call B. Given N phone numbers, your task is to find…
Description Both Saya and Kudo like balloons. One day, they heard that in the central park, there will be thousands of people fly balloons to pattern a big image. They were very interested about this event, and also curious about the image. Since the…
1352: New Sorting Algorithm Time Limit: 1 Sec Memory Limit: 128 MB Description We are trying to use a new sorting algorithm to sort a sequence with distinct integers. This algorithm will be end if the sequence is already in increasing order from…
1350: To Add Which? Time Limit: 1 Sec Memory Limit: 128 MB Description There is an integer sequence with N integers. You can use 1 unit of cost to increase any integer in the sequence by 1. Could you tell us the least units of cost to achieve tha…