結果
| 問題 |
No.35 タイパー高橋
|
| コンテスト | |
| ユーザー |
sora410_t
|
| 提出日時 | 2020-04-02 18:17:30 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 4 ms / 5,000 ms |
| コード長 | 669 bytes |
| コンパイル時間 | 681 ms |
| コンパイル使用メモリ | 77,792 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-06-28 15:15:27 |
| 合計ジャッジ時間 | 1,282 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 4 |
ソースコード
#include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <climits>
#include <numeric>
#include <iterator>
#include <cmath>
#include <set>
#include <bitset>
#include <cassert>
#include <cstdlib>
using namespace std;
inline int can(const int m) noexcept {
return floor(12 * m / 1000);
}
void solve() {
int N;
cin >> N;
int cnt {0};
int wcnt {0};
for (int i = 0; i < N; ++i) {
string s;
int t;
cin >> t >> s;
const auto length {s.size()};
if (can(t) >= length) {
cnt += length;
} else {
cnt += can(t);
wcnt += length - can(t);
}
}
cout << cnt << ' ' << wcnt << endl;
}
int main() {
solve();
return 0;
}
sora410_t