結果

問題 No.35 タイパー高橋
ユーザー wightou
提出日時 2025-06-17 05:02:32
言語 C++23
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 4 ms / 5,000 ms
コード長 772 bytes
コンパイル時間 2,881 ms
コンパイル使用メモリ 279,200 KB
実行使用メモリ 7,844 KB
最終ジャッジ日時 2025-06-17 05:02:36
合計ジャッジ時間 3,714 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 4
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

/////////////////// メイン ///////////////////

int main () {
  
  //////////////////// 入力 ////////////////////

  int n;
  cin >> n;

  vector<int> t(n);
  vector<string> s(n);
  for (int i=0; i<n; i++) {
    cin >> t.at(i) >> s.at(i);
  }

  //////////////// 出力変数定義 ////////////////

  int result1 = 0;
  int result2 = 0;

  //////////////////// 処理 ////////////////////

  for (int i=0; i<n; i++) {
    int limit = min(t.at(i)*12/1000,static_cast<int>(s.at(i).size()));
    result1 += limit;
    result2 += s.at(i).size()-limit;
  }  

  //////////////////// 出力 ////////////////////

  cout << result1 << " " << result2 << endl;

  //////////////////// 終了 ////////////////////

  return 0;

}
0