#P7433. [THUPC 2017] 老司机
[THUPC 2017] 老司机
Problem Description
There are few pedestrians on the 4th Ring Road, and car gods often compete there.
The road is still here today, but the experienced drivers of those years are nowhere to be seen.
When Mr. B is in a bad mood, he likes to speed on the 4th Ring Road. Watching the scenery flying past the window, Mr. B thinks of Mr. R and Mr. G from the past; of YJQ and FLZ of the present; of the vastness of the universe and the infinity of space-time; and also of this problem.
Given , it is guaranteed that is an integer power of , is an integer power of , and is an integer power of , and that , .
You are given four arrays of length : ().
For each , count how many solutions there are.
They must satisfy that for all , $a_i \le x_i, b_i \le y_i, c_i \le z_i, r_i \ge x_i - a_i + y_i - b_i + z_i - c_i$.
And
Let the number of solutions be .
Output
$$\operatorname*{xor}_{0\le u< X,0\le v<Y,0\le w<Z}((uYZ+vZ+w)\times(F(u,v,w)\bmod466560001))$$Input Format
The first line contains .
The next lines each contain four integers .
Output Format
Output one integer in one line as the answer.
3 2 3 1
0 0 0 1
0 0 0 2
0 0 0 3
573
3 2 3 5
0 0 0 1
0 0 0 2
0 0 0 3
253
Hint
Copyright Information
From THUPC (THU Programming Contest, Tsinghua University Programming Contest) 2017.
Translated by ChatGPT 5