시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
---|---|---|---|---|---|
1 초 | 512 MB | 116 | 72 | 51 | 56.044% |
A Big Bang has happened at coordinate (0,0,0) at time T = 0.Specifically, a “Fixed Velocity Lattice Big Bang” had happened. Just before the Big Bang, every particle was at (0,0,0) with zero volume and infinite density. After the Big Bang the particles propagate in a Cartesian 3D space. The movements of particles follow the following rules:
Now if sensors are placed in all lattice points that have strictly positive x, y and z values not exceeding a positive integer N, and measures are taken up to Nth microseconds after bigbang, maximum how many distinct particles can be detected? For example the particle that is detected at (1,1,1) after 1 microsecond of Big-bang and the at (2,2,2) after 2 microsecond after Big-bang are basically the same particle as both have same direction and speed.
The input contains 5 positive integers as input. All these are possible values of N: First four integers do not exceed 20 000. The last line contains the integer 80 000.
For each integer in the input produce one line of output which denotes the maximum number of distinct particles that can be detected.
1 1 10000 10000 80000
1 1 9239427676877311 9239427676877311 ????????????????????
The output of 5th case is not shown for obvious reasons. ‘?’ denotes a single digit
ICPC > Regionals > Asia Pacific > Thailand > 2016 ACM-ICPC Asia-Bangkok Regional Contest C번