# Overlay layers

Two raster images of the same size are given, the colors of which pixels are specified in the RGB color space with a color depth of 8 bits for each color coordinate: The original image 2 was pasted on top of the original image 1 in a graphics editor that supports various blending modes. After that, four different layer blending modes were set for the layer with the original image 2. As a result, the following four images were obtained: It is known that the layer blending modes listed below were used. When each of these modes is used, the values ​​of the color coordinates R, G and B in the resulting image are calculated independently for each coordinate using the same formulas. In formulas, C1 stands for the value of the corresponding color coordinate in the source image 1, C2 is the value of this color coordinate in the source image 2, and Cr is the value of this color coordinate in the resulting image. Determine which of the layer blending modes was used to obtain each of the above resulting images. In the answer specify four numbers in a row without spaces. First, the number in the list of the layer blending mode, which is applied to obtain the first resulting image, then the mode number used to obtain the second image, then the third and the fourth, respectively. Note: the values ​​of some colors on the images may differ from those obtained by the above formulas by several units.

Questions:

1. How is the color coordinate value calculated in the image? (in the task it is C1, C2)
2. How to argue in such tasks? (otherwise they constantly cause difficulty, I cannot navigate at all in these pixels, RGB ...)

• I want to note that the question does not imply a solution to the problem for the author. Helping the author on these two questions is not a solution to the task for the vehicle. Anxiety is superfluous. - ReinRaus
• Obviously the easiest method to test these blending equations is to view the places in the pictures where simple colors are mixed. For example, if you multiply Red (255,0,0) with Cyan (0,255,255), you get zero, that is black from this we conclude that Multiply is Var2_CR1.bmp. Not a very difficult task - igumnov
• to my mind, 0 is black - Eugene536
• Yes confused black with white fixed. The 10th task on this list is awesome. So I imagine a pack of unfortunate schoolchildren unfamiliar with regular expressions and mercilessly trying to solve it with another crutch. - igumnov
• @igumnov Tell me, please, how to solve the 10th problem with regular expressions. Although I am a supporter of parsing text with regular expressions, but in option 1, I only think of a byte address scan with an error counter. Thank you in advance. - ReinRaus