func_code_string: #include <bits/stdc++.h>   using namespace std;   int W, H, N, num;   char ch;   multiset<int> maxHorSize, maxVertSize;   set<int> horiz, vert;   long long max_area;   long long find_max(set<int> &setCut, char cut) {     auto med = setCut.find(num);     auto big = med;     auto sml = med;     ++big;     --sml;     if (cut ==  h ) {       maxHorSize.erase(maxHorSize.find(*big - *sml));       maxHorSize.insert(*med - *sml);       maxHorSize.insert(*big - *med);     } else if (cut ==  v ) {       maxVertSize.erase(maxVertSize.find(*big - *sml));       maxVertSize.insert(*med - *sml);       maxVertSize.insert(*big - *med);     }     return (long long)(*maxHorSize.rbegin()) * (long long)(*maxVertSize.rbegin());   }   int main() {     scanf( %d%d%d , &W, &H, &N);     horiz = {0, H};     vert = {0, W};     maxHorSize = {H};     maxVertSize = {W};     for (auto i = 1; i != N + 1 - 2 * (1 > N); i += 1 - 2 * (1 > N)) {       cin >> ch >> num;       if (ch ==  H ) {         horiz.insert(num);         max_area = find_max(horiz,  h );       } else if (ch ==  V ) {         vert.insert(num);         max_area = find_max(vert,  v );       }       printf( %I64d n , max_area);     }     return 0;   }   