Heating or cooling one-dimensional inviscid compressible flow can be modeled by the Euler equations with energy sources. A tricky situation is the sudden appearance of a single-point energy source term. This source is discontinuous in both the time and space directions, and results in multiple discontinuous waves in the solution. We establish a mathematical model of the generalized Riemann problem of the Euler equations with source term. Based on the double CRPs coupling method proposed by the authors, we determine the wave patterns of the solution. Theoretically, we prove the existence and uniqueness of solutions to both "heat removal" problem and "heat addition" problem. Our results provide a theoretical explanation for the effect of instantaneous addition or removal of heat on the fluid.