func_code_string: #include <bits/stdc++.h>   using namespace std;   inline long long sqr(long long x) { return x * x; }   mt19937 Random((int)time(0));   inline long long rnd(long long x) { return Random() % x; }   const long long INF = (long long)1e9 + 2018;   const long long MOD = (long long)1e9 + 7;   const long double PI = acos(-1.0);   pair<int, int> cnt(int n) {     if (n & 1) {       return {sqr(n / 2 + 1) + sqr(n / 2), n * n - sqr(n / 2 + 1) - sqr(n / 2)};     } else {       return {n * n / 2, n * n / 2};     }   }   void $main() {     int n;     cin >> n;     int a = 0, b = 0;     for (int i = 0; i < n; i++) {       string s;       cin >> s >> s;       a += s ==  hard ;       b += s ==  soft ;     }     for (int i = 1;; i++) {       pair<int, int> res = cnt(i);       if ((res.first >= a && res.second >= b) ||           (res.second >= a && res.first >= b)) {         cout << i;         return;       }     }   }   int main() {     ios::sync_with_stdio(0);     cin.tie(0);     cout.tie(0);     cout.setf(ios_base::fixed, ios_base::floatfield);     cout.precision(10);     $main();   }   