This problem is in Contest(s) below:
Contest 1018:类的小综合(一)
Contest 1014:运算符的重载