Take one vertex of the cube as origin and establish 3D coordinates along the cube's edges.
Define a beam as $x-dir$ if its long edge is parallel to x-axis. Similarly for $y-dir$ and $z-dir$ .
Define a beam's location as (direction, ( $1 \times 1$ face's location in 2D coordinate).
For example, (y, 2, 4) indicates the beam with vertex (1, 0, 3) and (2, 2020, 4)
Apparently $x$ beam needs the other $x$ or $y$ beams to touch its $xy$ faces, $x$ or $z$ beams to touch its $xz$ faces. Similarly for $y$ and $z$ beam.
If there are only 1-dir or 2-dirs beams, it is easy to approve that $2020 \times 2020$ is the minimal number beams.
(for example, if only use $x-dir$ and $y-dir$ beams, all the $x-dir$ beams's xz faces can only be touched by $x-dir$ beams. In the other word, $2020 x-dir$ beams will be stacked to meet xz faces touch requirements in that xz layer)
Consider cases with all $3-dirs$ beams.
WLOG there is a $x-dir$ beam and it needs $x-dir$ or $y-dir$ beams to touch its $xy$ faces (unless it touches the cube surface).
And this $y-dir$ beam also needs a $x-dir$ or $y-dir$ to touch it's $xy$ faces. And so on until one which touches cube surface. So from $xy$ face perspective, it needs $2020$ beams.
Similarly from $xz$ and $yz$ face perspective, it also needs $2020$ and $2020$ beams.
Consider one beam has four $1 \times 2020$ faces and it can be counted twice. So there should be at least $2020 \times 3 \div 2=3030$ beams.
Here is one solution with 3030 beams.
$(x, 1, 1),\ (y, 1, 2),\ (z, 2, 2),$ 
$\cdots ,$ 
$(x, (2n+1), (2n+1)),\ (y, (2n+1), (2n+2)),\ (z, (2n+2), (2n+2)),$ 
$\cdots ,$ 
$(x, (2019, 2019)),\ (y, 2019, 2020),\ (z, 2020, 2020)$ 
  2020 USAMO ( Problems • Resources )   Preceded by Problem 1   Followed by Problem 3    1  •  2  •  3  •  4  •  5  •  6    All USAMO Problems and Solutions 
The problems on this page are copyrighted by the Mathematical Association of America 's American Mathematics Competitions .  

An empty $2020 \times 2020 \times 2020$ cube is given, and a $2020 \times 2020$ grid of square unit cells is drawn on each of its six faces. A beam is a $1 \times 1 \times 2020$ rectangular prism. Several beams are placed inside the cube subject to the following conditions:
The two faces of each beam coincide with unit cells lying on opposite faces of the cube. (Hence, there are possible positions for a beam.)  No two beams have intersecting interiors.  The interiors of each of the four faces of each beam touch either a face of the cube or the interior of the face of another beam.
What is the smallest positive number of beams that can be placed to satisfy these conditions?