結果

問題 No.35 タイパー高橋
ユーザー ilplrrilplrr
提出日時 2017-07-16 20:46:03
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 5 ms / 5,000 ms
コード長 464 bytes
コンパイル時間 440 ms
コンパイル使用メモリ 59,556 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-04-16 22:37:05
合計ジャッジ時間 815 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include <iostream>
#include <string>
#include <algorithm>

using namespace std;

int main()
{
    int n, t[1000];
    string s[1000];
    cin >> n;
    for(int i=0; i<n; i++) cin >> t[i] >> s[i];

    int pos = 0, imp = 0;
    for(int i=0; i<n; i++){
        int lim = 12 * t[i] / 1000;
        int len = s[i].length();
        pos += len < lim ? len : lim;
        imp += len < lim ? 0 : len - lim;
    }

    cout << pos << " " << imp << endl;

    return 0;
}
0