Nu exista diferente intre titluri.
Diferente intre continut:
Interactive problems aren't very popular in coding contests because they involve additional effort from the problem writers. But they are usually pretty creative. I've made a shortlist below. Have fun solving them in the comments section!
Interactive problems are somewhat rarely seen at coding contests because they involve additional effort from the problem writers. But usually they are very creative. I've made a list below. Hope you have fun solving them!
# (CLRS, agora scholarships 2004) You are given two arrays A and B of n and m elements. The elements in each array are sorted and distinct. Find the kth element in the union of two arrays using as few comparisons as possible.
# (CLRS, interview question) You are given a matrix A with n rows and m columns. The elements in each row and each column are distinct and sorted. One query is what’s the value of A[i][j]. Find out if element x is in the matrix using as few queries as possible.
** Chip A says: B is bad, Chip B says: A is bad, Conclusion: at least one is bad
# (martin gardner, romanian ioi team selection 98) On the bottom floor of a building there are 11 wire ends. On the top floor there are the other 11 ends of the wires. An electrician has to figure out which end above matches with which end below. To accomplish this he can do two things: 1) tie any two ends together on the same floor. 2) test for a closed circuit by applying a device to two ends. What’s a method that minimizes the number of times the electrician needs to climb the stairs.
When I ask for the minimum number of queries I'm talking about worse case behavior.
When I ask for the minimum number of queries I'm talking about worse case behavior. Please discuss in the comments.
Nu exista diferente intre securitate.
Topicul de forum nu a fost schimbat.