結果

問題 No.35 タイパー高橋
ユーザー mizakuramizakura
提出日時 2017-04-10 00:03:55
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 4 ms / 5,000 ms
コード長 506 bytes
コンパイル時間 628 ms
コンパイル使用メモリ 73,308 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-09-25 01:33:10
合計ジャッジ時間 1,237 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 3 ms
4,376 KB
testcase_01 AC 3 ms
4,380 KB
testcase_02 AC 4 ms
4,380 KB
testcase_03 AC 4 ms
4,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#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