結果
| 問題 | No.35 タイパー高橋 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-04-10 00:03:55 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 5 ms / 5,000 ms |
| コード長 | 506 bytes |
| コンパイル時間 | 626 ms |
| コンパイル使用メモリ | 73,472 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-07-18 01:39:52 |
| 合計ジャッジ時間 | 1,064 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 4 |
ソースコード
#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;
}