結果
| 問題 | 
                            No.35 タイパー高橋
                             | 
                    
| コンテスト | |
| ユーザー | 
                             atn112323
                         | 
                    
| 提出日時 | 2016-05-08 08:52:29 | 
| 言語 | C++11(廃止可能性あり)  (gcc 13.3.0)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                            (最新)
                                AC
                                 
                             
                            (最初)
                            
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 355 bytes | 
| コンパイル時間 | 403 ms | 
| コンパイル使用メモリ | 57,972 KB | 
| 実行使用メモリ | 6,824 KB | 
| 最終ジャッジ日時 | 2024-10-05 10:37:26 | 
| 合計ジャッジ時間 | 805 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge5 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | WA * 4 | 
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:20:27: warning: ‘cnt[0]’ may be used uninitialized in this function [-Wmaybe-uninitialized]
   20 |         cout << cnt[0] << " " << cnt[1] << endl;
      |                           ^~~
main.cpp:20:39: warning: ‘cnt[1]’ may be used uninitialized in this function [-Wmaybe-uninitialized]
   20 |         cout << cnt[0] << " " << cnt[1] << endl;
      |                                       ^
            
            ソースコード
#include <algorithm>
#include <iostream>
#include <string>
using namespace std;
int N;
int T;
string S;
int main() {
	cin >> N;
	int cnt[2];
	for (int i = 0; i < N; i++) {
		cin >> T >> S;
		int ma = T * 12 / 1000;
		cnt[0] += min(ma, (int)S.length());
		cnt[1] += max(0, (int)S.length() - ma);
	}
	cout << cnt[0] << " " << cnt[1] << endl;
	return 0;
}
            
            
            
        
            
atn112323