結果

問題 No.35 タイパー高橋
コンテスト
ユーザー eyeSharp
提出日時 2019-10-10 00:23:59
言語 C++11
(gcc 15.3.0 + boost 1.92.0)
コンパイル:
g++-15 -O2 -lm -std=gnu++11 -Wuninitialized -DONLINE_JUDGE -o a.out _filename_
実行:
./a.out
結果
AC  
実行時間 1 ms / 5,000 ms
+ 489µs
コード長 658 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 794 ms
コンパイル使用メモリ 175,996 KB
実行使用メモリ 9,820 KB
最終ジャッジ日時 2026-10-11 05:22:04
合計ジャッジ時間 1,710 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge1_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 5
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

/*
    No.35 タイパー高橋
    https://yukicoder.me/problems/no/35
*/
#include <bits/stdc++.h>
using namespace std;

int main() {
    ios::sync_with_stdio(0);
    cin.tie(0);

    int n;
    cin >> n;

    int correct = 0;
    int missing = 0;
    for (int i = 0; i < n; i++) {
        int time;
        string str;
        cin >> time >> str;

        int type_char = floor(12 * time / 1000);
        if (type_char >= (int)str.length()) {
            correct += (int)str.length();
        } else {
            correct += type_char;
            missing += ((int)str.length() - type_char);
        }
    }
    cout << correct << " " << missing << endl;
}
0