結果

問題 No.35 タイパー高橋
コンテスト
ユーザー mizakura
提出日時 2017-04-10 00:03:55
言語 C++14
(gcc 15.3.0 + boost 1.92.0 + ACL)
コンパイル:
g++-15 -O2 -lm -std=c++14 -Wuninitialized -DONLINE_JUDGE -o a.out _filename_
実行:
./a.out
結果
AC  
実行時間 2 ms / 5,000 ms
+ 834µs
コード長 506 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 364 ms
コンパイル使用メモリ 89,892 KB
実行使用メモリ 9,920 KB
最終ジャッジ日時 2026-10-11 04:34:09
合計ジャッジ時間 1,229 ms
ジャッジサーバーID
(参考情報)
judge4_0 / judge1_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 5
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#include <iostream>
#include <vector>
#include <string>
#include <algorithm>

int main() {
  int n;
  int typed = 0;
  int strsum = 0;
  std::cin >> n;
  std::vector<int> t(n);
  std::vector<std::string> s(n);
  for (int i = 0; i < n; i++) {
    std::cin >> t[i] >> s[i];
  }
  
  for (int i = 0; i < n; i++) {
    int a = 12 * t[i] / 1000;
    typed += std::min(a, static_cast<int>(s[i].length()));
    strsum += s[i].length();
  }
  std::cout << typed << ' ' << strsum - typed << std::endl;
  return 0;
}
0