結果

問題 No.35 タイパー高橋
ユーザー kyuridenamidakyuridenamida
提出日時 2016-02-11 10:48:21
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 4 ms / 5,000 ms
コード長 591 bytes
コンパイル時間 1,111 ms
コンパイル使用メモリ 160,676 KB
実行使用メモリ 4,348 KB
最終ジャッジ日時 2023-10-21 22:54:05
合計ジャッジ時間 1,877 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int (i) = 0 ; (i) < (int)(n) ; (i)++)
#define REP(i,a,b) for(int (i) = a ; (int)(i) <= (int)(b) ; (i)++)
#define all(n) (n).begin(),(n).end()
typedef vector<int> Vi;
typedef vector<Vi> VVi;
typedef pair<long long,long long> Pii;
typedef vector<Pii> VPii;


int main(){
	int can = 0, cannot = 0;
	int N;
	cin >> N;
	for(int i = 0 ; i < N ; i++){
		int t; string s;
		cin >> t >> s;
		int ca = t * 12 / 1000;
		int ok = min((int)s.size(),ca);
		can += ok;
		cannot += s.size() - ok;
	}
	cout << can << " " << cannot << endl;
}
0