結果
問題 |
No.35 タイパー高橋
|
ユーザー |
|
提出日時 | 2025-09-22 19:27:05 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 889 bytes |
コンパイル時間 | 2,880 ms |
コンパイル使用メモリ | 278,520 KB |
実行使用メモリ | 7,716 KB |
最終ジャッジ日時 | 2025-09-22 19:27:09 |
合計ジャッジ時間 | 3,756 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 4 |
ソースコード
#include <bits/stdc++.h> [[nodiscard]] static inline constexpr std::pair<uint_fast32_t, uint_fast32_t> solve([[maybe_unused]] const uint_fast32_t N, const std::vector<std::pair<uint_least16_t, std::string>>& tasks) noexcept { uint_fast32_t count_typed = 0, count_total = 0; for (const auto& [t, s] : tasks) count_total += s.size(), count_typed += std::min<uint_fast32_t>(t * 12 / 1000, s.size()); return std::make_pair(count_typed, count_total - count_typed); } static inline void output(const std::pair<uint_fast32_t, uint_fast32_t>& ans) noexcept { std::cout << ans.first << ' ' << ans.second << '\n'; } int main() { std::cin.tie(nullptr); std::ios::sync_with_stdio(false); uint_fast32_t N; std::cin >> N; std::vector<std::pair<uint_least16_t, std::string>> tasks(N); for (auto& [t, s] : tasks) s.reserve(100), std::cin >> t >> s; output(solve(N, tasks)); return 0; }