SHARE
TWEET

Untitled

a guest Jan 21st, 2020 56 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <bits/stdc++.h>
  2. typedef long long ll;
  3. using namespace std;
  4.  
  5. int main(){
  6.     string s;
  7.     bool f = false;
  8.     bool add = false;
  9.     int cnt = 0;
  10.     string tmp;
  11.     vector<string> ans;
  12.     while(getline(cin, s)){
  13.         if (f){
  14.             if (s == "<tr>") {
  15.                 if (add && tmp.size() > 0){
  16.                     ans.push_back(tmp);
  17.                 }
  18.                 cnt = 0;
  19.                 tmp = s;
  20.                 add = false;
  21.             }
  22.             else cnt++;
  23.             if (cnt == 2 && s.substr(s.find(','), 4) == ", 10") add = true;
  24.             tmp += s;
  25.         }
  26.         if (!f) ans.push_back(s);
  27.         if (s == "<tbody>") f = true;
  28.         if (s == "</tbody>") {
  29.             f = false;
  30.             ans.push_back(s);
  31.         }
  32.     }
  33.     for (string &s : ans) cout << s << '\n';
  34.     return 0;
  35. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top