func_code_string: #include <bits/stdc++.h>   using namespace std;   string s, h1, m1;   int h[10000], m[10000];   bool a[10000];   int main() {     int n;     cin >> n;     cin.ignore();     for (__typeof(n) i = (1); i <= (n); i++) {       getline(cin, s);       h1 = s.substr(1, 2);       m1 = s.substr(4, 2);       if (s[7] ==  a )         a[i] = true;       else         a[i] = false;       stringstream sh, sm;       sh.flush();       sm.flush();       sh.clear();       sm.clear();       sh << h1;       sm << m1;       sh >> h[i];       sm >> m[i];       h[i] %= 12;       if (!a[i]) h[i] += 12;     }     int ans = 1;     int k = 0;     for (__typeof(n - 1) i = (1); i <= (n - 1); i++) {       int t1 = h[i] * 10000 + m[i];       int t2 = h[i + 1] * 10000 + m[i + 1];       if (t1 == t2)         k++;       else         k = 0;       if (k == 10) {         k = 0;         ans++;         continue;       }       if (!(a[i]) && a[i + 1]) {         ans++;         continue;       }       if (t1 > t2) {         ans++;       }     }     cout << ans << endl;     return 0;   }   