public void Solve() { V = new SegmentManager(); H = new SegmentManager(); input = Console.ReadLine().Split(' '); w = int.Parse(input[0]); h = int.Parse(input[1]); n = int.Parse(input[2]); s = new Segment(0, h); V.Add(s); s = new Segment(0, w); H.Add(s); for (int step = 0; step < n; ++step) { input = Console.ReadLine().Split(' '); var sm = input[0] == "V" ? H : V; sm.Slice(int.Parse(input[1])); Console.WriteLine(V.MaxWidth * H.MaxWidth); } }