GnitGnit
ContestsProblemsBlogSubmit a ProblemMy PageSign In

© 2026 Gnit. All rights reserved.

Terms of ServicePrivacy PolicyThird-Party SoftwareContactOfficial X
Contests/Gnit Sunday Open 003 (GSO003)/Problem 1 Laser Trajectory in a Fully Mirrored Room
Problem 1

Laser Trajectory in a Fully Mirrored Room

Finished
100 ptsLv.1 BeginnerWaves
2026/04/05 19:30〜2026/04/05 21:00
Author: admin

Problem Statement

A square room sits on a flat floor. Define the floor as the xxx-yyy coordinate plane.

The four walls of the room stand along the following line segments, and all inner surfaces are ideal mirrors that reflect light perfectly.

  • South wall: y=0y = 0y=0 (for 0≤x≤W0 \le x \le W0≤x≤W)
  • North wall: y=Dy = Dy=D (for 0≤x≤W0 \le x \le W0≤x≤W)
  • West wall: x=0x = 0x=0 (for 0≤y≤D0 \le y \le D0≤y≤D)
  • East wall: x=Wx = Wx=W (for 0≤y≤D0 \le y \le D0≤y≤D)

A single, extremely narrow laser beam is fired into the room through a tiny gap at the southwest corner, the origin (0,0)(0, 0)(0,0).

The light travels in a straight line through the uniform space and reflects off walls following the law of reflection (angle of incidence equals angle of reflection) exactly.

The laser beam reflects first off the north wall, then off the east wall, and finally hits a tiny light-absorbing sensor embedded exactly at the midpoint of the south wall, (W/2,0)(W/2, 0)(W/2,0), where it is absorbed.

Find the total distance LLL traveled by the laser beam from the origin (0,0)(0, 0)(0,0) until it hits the sensor.

Constraints

  • W=36 mW = 36\,\text{m}W=36m
  • D=36 mD = 36\,\text{m}D=36m

Input Format

Find the total travel distance LLL in m\text{m}m and give the answer as a positive integer.

Submit Answer

Please sign in to submit an answer

Sign In

Calculator

0
View Scoreboard
12345678910
Read Solution Blog