luogu#P4932. 浏览器
浏览器
Background
When playing Slay the Spire on Edge, __stdcall often finds that the mouse stops working, which makes her very upset. Therefore, she decided to let you experience the pain caused by Edge as well.
Problem Description
__stdcall gives you points. The -th point has weight . For two points and , if the result of has an odd number of 's in its binary representation, then connect an Edge between and . Now __stdcall wants you to find how many Edges there are in total.
If you fail to complete the task, then __stdcall will make you suffer a bit, and you will get no score for this test case.
Input Format
One line with six integers: , , , , , .
is the number of points. The weight of each point needs to be generated in the following way.
You need to use , , , , and to generate an array x. The generation method is:
is the weight of the -th point. The point indices are from to .
Output Format
Output one integer, representing the total number of Edges.
8 98 24 20 100 44
12
1000 952537 601907 686180 1000000 673601
249711
Hint
Let denote the maximum value among the weights.
For the first of the data, .
For the first of the data, .
For the first of the data, .
For the first of the data, .
For the first of the data, .
For of the data, .
It is guaranteed that , , , , and are all non-negative integers within int.
Translated by ChatGPT 5