#include using namespace std; /////////////////// メイン /////////////////// int main () { //////////////////// 入力 //////////////////// int n; cin >> n; vector t(n); vector s(n); for (int i=0; i> t.at(i) >> s.at(i); } //////////////// 出力変数定義 //////////////// int result1 = 0; int result2 = 0; //////////////////// 処理 //////////////////// for (int i=0; i(s.at(i).size())); result1 += limit; result2 += s.at(i).size()-limit; } //////////////////// 出力 //////////////////// cout << result1 << " " << result2 << endl; //////////////////// 終了 //////////////////// return 0; }