there is a task to find the value of a function

enter image description here

for an unordered set of 128 bit numbers Ak each of which is represented as

Ak = 2^96 * a1k + 2^64 * a2k + 2^32 * a3k + 2^0 * a4k ,

Where

0 <= aik <= 2^32 - 1

and log10(X) is the integer part of the decimal logarithm of X ,

and we will assume that log10(0) = 0

and N <= 5000

example:

 2 // N - кол-во чисел этого набора 0 0 0 2324 // коеффициенты aik для текущего Ak 0 2332 0 0 

Amount value - 44

Questions:

  1. How did 44 turn out in this example ??
  2. What does an unordered set of numbers mean in this context?
  3. It is not clear how indexation takes place in the sum - I understand that k != j ?? as if it were equal then what sense would you say to a number with yourself, because it would give 0 and the logarithm from zero would also be 0

actually, for this example, I got the following

  A0 - 0 0 0 2324 A1 - 0 2332 0 0 A0 XOR A1 = 0 2332 0 2324 тогда X = 2^96*0 + 2^64+2332 + 2^32*0 + 2^0+2324 = 4.301780718×10²² но отсюда log10(X) != 44 

what am I doing wrong ?

What is the correct algorithm that would produce 44?

  • @RedHairOnMyHead what do you say? well, in this problem we assume that the logarithm is from zero 0 - ampawd
  • one
    I remembered, "in wartime, pi may reach four." - insolor

1 answer 1

It should be:

A0 XOR A0

A0 XOR A1

A1 XOR A0

A1 XOR A1

The first and last, as you have already noticed, are zero. And the second and third are equal to each other, therefore what you find (22) must be multiplied by 2 and you will get 44.

  • one
    is this double the amount coming out? - ampawd
  • Yes, this amount can be written as a double - ThePyzhov
  • just once a sigma mark is somehow not very intuitive to assume that there is actually a double amount. - ampawd