Hello everyone, how to count all the squares in the figure in C or C++. The program should load the following data from the standard input: 1. The first line of input contains an integer N (1 ≤ N ≤ 100) - the number of squares. 2. Each of the following N lines contains three integers Xi, Yi (1 ≤ Xi, Yi ≤ 10000000) and Li (1 ≤ Li ≤ 10000000) - Xi, Yi are the coordinates of the lower left corner of the i-th square, Li is the length of the page i-th square. The program should print to standard output exactly one integer - the number of squares that can be seen on the figure.
©