結果

問題 No.35 タイパー高橋
ユーザー furonfuron
提出日時 2023-06-17 16:44:13
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 4 ms / 5,000 ms
コード長 1,090 bytes
コンパイル時間 1,075 ms
コンパイル使用メモリ 121,696 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-09-07 12:57:23
合計ジャッジ時間 1,654 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include <iostream>
#include <iomanip>
#include <vector>
#include <algorithm>
#include <functional>
#include <cmath>
#include <string>
#include <queue>
#include <map>
#include <bitset>
#include <set>
#include <stack>
#include <numeric>
#include <unordered_map>
#include <random>

using namespace std;

using ll = long long;
using vi = vector<int>;
using vvi = vector<vi>;
using vl = vector<ll>;
using vvl = vector<vl>;
using vb = vector<bool>;
using vvb = vector<vb>;
using vd = vector<double>;
using vs = vector<string>;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
using pdd = pair<double, double>;
using vpii = vector<pii>;
using vpll = vector<pll>;
using vpdd = vector<pdd>;
const int inf = (1 << 30) - 1;
const ll INF = 1LL << 60;
//const int MOD = 1000000007;
const int MOD = 998244353;


int main() {
	int n;
	cin >> n;
	int ans1 = 0;
	int ans2 = 0;
	for (int i = 0; i < n; i++) {
		int t;
		string s;
		cin >> t >> s;
		int x = t * 12 / 1000;
		int len = s.length();
		x = min(x, len);
		ans1 += x;
		ans2 += len - x;
	}
	cout << ans1 << " " << ans2 << endl;

	return 0;
}
0