In a class of moderate size, there were 2 problems assigned for the written math test, and every student solved at least one of them.
- Those who solved only one problem were one less than twice as many as those who solved both problems.
- Those who solved both problems were given 1 new problem to solve for the next class, those who only managed to solve the harder problem were given 4 new problems, and those who only managed to solve the easier problem were given 1 harder, new problem to solve at home. Thus, the first two groups together submitted as many solutions as the second group.
How many students are in the class?
Let the class size be $x$ students, the number of students who solved both problems be $m$, and the number of students who only solved the harder problem be $n$, then

$$
x=m+(2 m-1)=3 m-1
$$

the number of students who only solved the easier problem is $2 m-1-n$, and thus from the number of submitted homework assignments

$$
m+4 n=2 m-1-n
$$

From this, we get $m=5 n+1$, substituting this into (1)

$$
x=15 n+2
$$

Substituting the first few possible values of $n$, 0, 1, 2, 3, into this, we get $x=2,17,32,47$. The first two are too small, the fourth is quite large for a class size, while $x=32$ can be considered moderate.

For $n=2$, we get 11 students for $m$, so $2 \cdot 11-1=21$ students solved only one problem, of which 19 solved the easier problem. In this case, in the next class, the first group also submitted $11+4 \cdot 2=19$ homework assignments.